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/integrate-as-protocol.mdx
+24-19Lines changed: 24 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -1,33 +1,36 @@
1
1
import { Steps } from'nextra/components'
2
+
import { Tabs } from'nextra/components'
3
+
2
4
3
5
# How to Integrate Express Relay as a Protocol
4
6
5
-
This guide explains how to integrate Express Relay as a protocol.
6
-
To integrate Express Relay as a protocol, you need to:
7
+
Protocol developers can **permissionlessly** integrate with Express Relay to recapture MEV and access a network of searchers.
8
+
9
+
Integrating with Express Relay involves two main steps:
7
10
8
-
- Update the protocol's contract to **permission** Express Relay transactions.
11
+
- Update the Protocol's contract to **permission** Express Relay transactions.
9
12
- Write a script to **expose** liquidation opportunities to Searchers for auction.
10
13
11
14
## Update the Protocol's Contract
12
15
13
-
Express Relay requires the protocol's contract to permit Express Relay to access liquidation.
16
+
The Protocol's contract must permit Express Relay to access liquidation opportunities.
14
17
15
18
<Steps>
16
19
### Install the Express Relay SDK
17
20
18
-
Pyth provides a [Solidity SDK](https://www.npmjs.com/package/@pythnetwork/express-relay-sdk-solidity) to help you integrate Express Relay into your protocol.
19
-
The SDK exposes `IExpressRelay` and `IExpressRelayFeeReceiver` interfaces to interact with Express Relay.
21
+
Pyth provides a [Solidity SDK](https://www.npmjs.com/package/@pythnetwork/express-relay-sdk-solidity) to help developers integrate Express Relay into your Protocol.
22
+
The SDK exposes [`IExpressRelay`](https://github.com/pyth-network/pyth-crosschain/blob/main/express_relay/sdk/solidity/IExpressRelay.sol) and [`IExpressRelayFeeReceiver`](https://github.com/pyth-network/pyth-crosschain/blob/main/express_relay/sdk/solidity/IExpressRelayFeeReceiver.sol) interfaces to interact with Express Relay.
20
23
21
-
#### Truffle/Hardhat
22
-
23
-
If you are using Truffle or Hardhat, you can install the SDK using npm:
24
+
<Tabsitems={['Hardhat', 'Foundry']}>
25
+
<Tabs.Tab>
26
+
If you are using Hardhat, you can install the SDK using npm:
The `IExpressRelayFeeReceiver` interface requires the protocol's contract to implement the `receiveAuctionProceedings` function. The Express Relay server calls this function to send funds to the protocol's contract.
80
+
The `IExpressRelayFeeReceiver` interface requires the Protocol's contract to implement the `receiveAuctionProceedings` function. The Express Relay server calls this function to send funds to the protocol's contract.
0 commit comments