Skip to content

Commit fb63c4e

Browse files
committed
some minor changes
1 parent e24d4b6 commit fb63c4e

File tree

2 files changed

+28
-21
lines changed

2 files changed

+28
-21
lines changed

pages/express-relay/index.mdx

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,22 @@ Express Relay is a priority auction that enables protocols to eliminate maximal
1111

1212

1313
- **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+
/>
1521

1622
- **For Searchers:** Express Relay provides easy and unified access by aggregating liquidation and other MEV opportunities across integrated DeFi protocols.
1723
Searchers integrate once and gain access to all existing and future opportunities.
1824

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+
/>
3130

3231
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).
3332

pages/express-relay/integrate-as-protocol.mdx

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Integrating with Express Relay involves two main steps:
99
- **Update** your DeFi protocol's contract.
1010
- **Expose** opportunities to searchers for auction.
1111

12-
## Update your defi Protocol's Contract
12+
## Update your DeFi Protocol's Contract
1313

1414
To integrate with Express Relay, your protocol's contract must check if Express Relay has permissioned the current transaction.
1515

@@ -43,17 +43,17 @@ Then add the following line to `remappings.txt` file:
4343
</Tabs.Tab>
4444
</Tabs>
4545

46-
### Modifying the Protocol's Contract
46+
### Modify the Protocol's Contract
4747

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.
4949

5050
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.
5252

5353
#### 1. Verify Permissioning
5454

5555
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.
5757
1. `permissionId`: A unique identifier for the opportunity.
5858

5959
```solidity copy
@@ -80,7 +80,7 @@ require(
8080
</Callout>
8181

8282
#### 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.
8484

8585
```solidity copy
8686
interface IExpressRelayFeeReceiver {
@@ -90,7 +90,7 @@ interface IExpressRelayFeeReceiver {
9090
}
9191
```
9292

93-
The following code snippet shows a sample liquidation opportunity via Express Relay.
93+
The following code snippet shows a sample Express Relay-integrated contract that performs liquidation.
9494
Note: The highlighted lines show the contract's relevant additions for Express Relay integration.
9595

9696
```solidity showLineNumbers {1,2,12,14,21,38-42, 57-61} copy
@@ -118,6 +118,14 @@ contract EasyLend is IExpressRelayFeeReceiver {
118118
_allowUndercollateralized = allowUndercollateralized;
119119
}
120120
121+
/**
122+
* @notice createVault function - creates a vault
123+
* @param vaultParams: params of the vault to be created
124+
*/
125+
function createVault(VaultParams memory vaultParams) public {
126+
..
127+
}
128+
121129
/**
122130
* @notice liquidate function - liquidates a vault
123131
* @param vaultID: ID of the vault to be liquidated
@@ -163,7 +171,7 @@ contract EasyLend is IExpressRelayFeeReceiver {
163171

164172
## Expose Opportunities to Searchers
165173

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.
167175

168176
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.
169177

0 commit comments

Comments
 (0)