Skip to content

Commit 56d8802

Browse files
committed
WIP-protocol-guide-refactor
1 parent 6901e48 commit 56d8802

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

pages/express-relay/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import ContractIcon from "../../components/icons/ContractIcon";
88

99
Express Relay is a priority auction that enables protocols to eliminate maximal extractable value (MEV).
1010

11-
**For Protocol Developers:** Express Relay’s auction primitive allows your protocol to prioritize access to permissionless operations, eliminating the extractive role of miners in ordering transactions.
11+
- **For Protocol Developers:** Express Relay’s auction primitive allows your protocol to prioritize access to permissionless operations, eliminating the extractive role of miners in ordering transactions.
1212
A network of established searchers compete in the auctions, allowing you to avoid spending time and energy bootstrapping your own protocol-specific searcher network.
1313

14-
**For Searchers:** Express Relay aggregates liquidation and other MEV opportunities across integrated DeFi protocols, providing easy and unified access.
14+
- **For Searchers:** Express Relay aggregates liquidation and other MEV opportunities across integrated DeFi protocols, providing easy and unified access.
1515

1616
<Cards>
1717
<Card

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

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ Defi protocols can **permissionlessly** integrate with Express Relay to recaptur
66

77
Integrating with Express Relay involves two main steps:
88

9-
- Update your defi protocol's contract to **permission** Express Relay transactions.
10-
- Write a script to **expose** liquidation opportunities to Searchers for auction.
9+
- Update your defi protocol's contract to **permit** Express Relay transactions.
10+
- Write a script to **expose** opportunities to searchers for auction.
1111

1212
## Update your defi Protocol's Contract
1313

14-
To integrate with Express Relay, your protocol's contract must permit Express Relay to access liquidation opportunities.
14+
To integrate with Express Relay, your protocol's contract must permit Express Relay to access opportunities.
1515

1616
<Steps>
1717
### Install the Express Relay SDK
@@ -50,17 +50,17 @@ The following steps show how to modify your protocol's contract to permit Expres
5050
1. Utilize [`isPermissioned`](https://github.com/pyth-network/pyth-crosschain/blob/main/express_relay/sdk/solidity/IExpressRelay.sol#L10C14-L10C28) method from `IExpressRelay` interface to **permit** Express Relay transactions.
5151
1. Implement the [`IExpressRelayFeeReceiver`](https://github.com/pyth-network/pyth-crosschain/blob/main/express_relay/sdk/solidity/IExpressRelayFeeReceiver.sol#L4) interface to **receive** funds from Express Relay.
5252

53-
#### 1. Permission Express Relay Transactions
53+
#### 1. Permit Express Relay Transactions
5454

5555
The `isPermissioned` function takes two arguments:
5656
1. `protocolFeeReceiver`: The contract address that will receive the protocol fee from the winning searcher after a successful auction.
57-
1. `permissionId`: A unique identifier of a vault or position eligible for liquidation.
57+
1. `permissionId`: A unique identifier of a vault or position eligible to expose as an opportunity.
5858

5959
```solidity copy
6060
import "@pythnetwork/express-relay-sdk-solidity/IExpressRelay.sol";
6161
6262
// Express Relay contract address on Optimism Sepolia
63-
// Check {INSERT CONTRACT ADDRESS PAGE LINK} for the address deployed on other networks
63+
// Check https://docs.pyth.network/express-relay/contract-addresses for the address deployed on other networks
6464
address expressRelay = 0xD6e417287b875A3932c1Ff5dcB26D4D2C8b90B40;
6565
6666
require(
@@ -90,7 +90,7 @@ interface IExpressRelayFeeReceiver {
9090
```
9191

9292

93-
The following code snippet shows a sample liquidation method via Express Relay.
93+
The following code snippet shows a sample liquidation opportunity via Express Relay.
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
@@ -110,12 +110,12 @@ contract EasyLend is IExpressRelayFeeReceiver {
110110
address public immutable expressRelay;
111111
112112
constructor(
113-
address expressRelayAddress,
113+
address expressRelayAddress,
114114
bool allowUndercollateralized
115115
){
116-
_nVaults = 0;
117-
expressRelay = expressRelayAddress;
118-
_allowUndercollateralized = allowUndercollateralized;
116+
_nVaults = 0;
117+
expressRelay = expressRelayAddress;
118+
_allowUndercollateralized = allowUndercollateralized;
119119
}
120120
121121
/**
@@ -161,11 +161,11 @@ contract EasyLend is IExpressRelayFeeReceiver {
161161
</Steps>
162162

163163

164-
## Expose Liquidation Opportunities to Searchers
164+
## Expose Opportunities to Searchers
165165

166-
Your defi protocol should fetch vaults and positions eligible for liquidation and expose them to Express Relay for auction.
166+
Your defi protocol should fetch vaults and positions eligible as opportunites and expose them to Express Relay for auction.
167167

168-
The Express Relay auction server provides a **POST** method, `/v1/opportunities`, which accepts a JSON payload containing the details of the liquidation opportunity.
168+
The Express Relay auction server provides a **POST** method, `/v1/opportunities`, which accepts a JSON payload containing the details of the opportunity.
169169

170170
The JSON payload should contain liquidation opportunities in the following format:
171171

@@ -196,7 +196,7 @@ The JSON payload should contain liquidation opportunities in the following forma
196196
Each protocol integrated with Express Relay must evaluate every position's health using the latest Oracle prices before exposing them to Express Relay.
197197
You can do this by indexing the chain, listening to protocol events, or querying open positions through an RPC provider.
198198

199-
Check the [`monitor.ts`]() script, which fetches liquidation opportunities for the below-mentioned [Easy Lend](https://github.com/pyth-network/pyth-crosschain/tree/main/express_relay/examples/easy_lend) example and exposes them to Express Relay for auction.
199+
Check the [`monitor.ts`](https://github.com/pyth-network/pyth-crosschain/blob/main/express_relay/examples/easy_lend/src/monitor.ts) script, which fetches liquidation opportunities for the below-mentioned [Easy Lend](https://github.com/pyth-network/pyth-crosschain/tree/main/express_relay/examples/easy_lend) example and exposes them to Express Relay for auction.
200200

201201

202202
## Additional Resources
@@ -215,4 +215,4 @@ The [Contract Address](./contract-addresses.mdx) page lists the addresses of Exp
215215

216216
### API Reference
217217

218-
The [API Reference](https://per-staging.dourolabs.app/docs/) provides detailed information on the Express Relay APIs for submitting liquidation opportunities.
218+
The [API Reference](https://per-staging.dourolabs.app/redoc/) provides detailed information on the Express Relay APIs for submitting opportunities.

0 commit comments

Comments
 (0)