You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/express-relay/index.mdx
+12-13Lines changed: 12 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,23 +11,22 @@ Express Relay is a priority auction that enables protocols to eliminate maximal
11
11
12
12
13
13
-**For Protocol Developers:** Express Relay allows protocols to recapture MEV and access a network of searchers.
14
-
With Express Relay, protocols don't need to spend time and energy bootstrapping the protocol-specific searcher network.
14
+
With Express Relay, protocols don't need to spend time and energy bootstrapping a protocol-specific searcher network.
15
+
16
+
<Card
17
+
icon={<ContractIcon />}
18
+
title="Integrate with Express Relay as a protocol"
19
+
href="./express-relay/integrate-as-protocol"
20
+
/>
15
21
16
22
-**For Searchers:** Express Relay provides easy and unified access by aggregating liquidation and other MEV opportunities across integrated DeFi protocols.
17
23
Searchers integrate once and gain access to all existing and future opportunities.
18
24
19
-
<Cards>
20
-
<Card
21
-
icon={<ContractIcon />}
22
-
title="Integrate with Express Relay as a protocol"
23
-
href="./express-relay/integrate-as-protocol"
24
-
/>
25
-
<Card
26
-
icon={<SearchIcon />}
27
-
title="Integrate with Express Relay as a searcher"
28
-
href="./express-relay/integrate-as-searcher"
29
-
/>
30
-
</Cards>
25
+
<Card
26
+
icon={<SearchIcon />}
27
+
title="Integrate with Express Relay as a searcher"
28
+
href="./express-relay/integrate-as-searcher"
29
+
/>
31
30
32
31
To learn more about Express Relay's design and how it eliminates MEV, please see [How Express Relay Works](/express-relay/how-express-relay-works).
Copy file name to clipboardExpand all lines: pages/express-relay/integrate-as-protocol.mdx
+16-8Lines changed: 16 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ Integrating with Express Relay involves two main steps:
9
9
-**Update** your DeFi protocol's contract.
10
10
-**Expose** opportunities to searchers for auction.
11
11
12
-
## Update your defi Protocol's Contract
12
+
## Update your DeFi Protocol's Contract
13
13
14
14
To integrate with Express Relay, your protocol's contract must check if Express Relay has permissioned the current transaction.
15
15
@@ -43,17 +43,17 @@ Then add the following line to `remappings.txt` file:
43
43
</Tabs.Tab>
44
44
</Tabs>
45
45
46
-
### Modifying the Protocol's Contract
46
+
### Modify the Protocol's Contract
47
47
48
-
The following steps show how to modify your protocol's contract to verify if the current transaction is permissioned by Express Relay and to receive the auction proceedings.
48
+
The following steps show how to modify your protocol's contract to verify if the current transaction is permissioned by Express Relay and to receive the auction proceeds.
49
49
50
50
1. Call the [`isPermissioned`](https://github.com/pyth-network/pyth-crosschain/blob/main/express_relay/sdk/solidity/IExpressRelay.sol#L10C14-L10C28) method from `IExpressRelay` interface to make sure the current transaction is permissioned by Express Relay.
51
-
1. Implement the [`IExpressRelayFeeReceiver`](https://github.com/pyth-network/pyth-crosschain/blob/main/express_relay/sdk/solidity/IExpressRelayFeeReceiver.sol#L4) interface to **receive** auction proceedings.
51
+
1. Implement the [`IExpressRelayFeeReceiver`](https://github.com/pyth-network/pyth-crosschain/blob/main/express_relay/sdk/solidity/IExpressRelayFeeReceiver.sol#L4) interface to **receive** auction proceeds.
52
52
53
53
#### 1. Verify Permissioning
54
54
55
55
The `isPermissioned` function takes two arguments:
56
-
1.`protocolFeeReceiver`: The address to receive the protocol's share of auction proceedings.
56
+
1.`protocolFeeReceiver`: The address to receive the protocol's share of auction proceeds.
57
57
1.`permissionId`: A unique identifier for the opportunity.
58
58
59
59
```solidity copy
@@ -80,7 +80,7 @@ require(
80
80
</Callout>
81
81
82
82
#### 2. Set up Fee Receiver
83
-
Express Relay will call the `receiveAuctionProceedings` method present in `IExpressRelayFeeReceiver`. The call will transfer the protocol's share of the auction proceeding to the `protocolFeeReceiver` address.
83
+
Express Relay will call the `receiveAuctionProceedings` method present in `IExpressRelayFeeReceiver`. The call will transfer the protocol's share of the auction proceeds to the `protocolFeeReceiver` address.
* @param vaultParams: params of the vault to be created
124
+
*/
125
+
function createVault(VaultParams memory vaultParams) public {
126
+
..
127
+
}
128
+
121
129
/**
122
130
* @notice liquidate function - liquidates a vault
123
131
* @param vaultID: ID of the vault to be liquidated
@@ -163,7 +171,7 @@ contract EasyLend is IExpressRelayFeeReceiver {
163
171
164
172
## Expose Opportunities to Searchers
165
173
166
-
DeFi protocols must fetch opportunities and expose them to Express Relay for auction.
174
+
DeFi protocols should fetch opportunities and expose them to Express Relay for auction.
167
175
168
176
Express Relay provides a **POST** method, [`/v1/opportunities`](https://per-staging.dourolabs.app/redoc#tag/opportunity/operation/post_opportunity), which accepts a JSON payload containing the details of the opportunity.
0 commit comments