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/how-express-relay-works.mdx
+16-15Lines changed: 16 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,39 +6,40 @@ For example, borrow-lending protocols provide bonuses to searchers for liquidati
6
6
Searchers compete for these bonuses by tipping the chain's miners or validators.
7
7
The validators capture most of the value of the liquidation bonus via these tips, so the liquidation bonus is in essence a transfer of wealth from the protocol's users to the validators.
8
8
9
-
Express Relay solves the problem of MEV by providing protocol developers with an auction primitive that they can use to prioritize access to permissionless operations.
9
+
Express Relay solves the problem of MEV by providing protocol developers with an auction primitive that they can use to prioritize access to valuable protocol operations.
10
10
Developers specify a set of operations in their protocol that must be accessed through Express Relay.
11
11
Searchers then participate in an off-chain auction to access these operations.
12
-
Their bids in the auction determine the priority of their transactions, i.e., the order in which their transactions will be executed.
13
-
The winners transactions are forwarded to the blockchain, which both pays their bid and executes the operation.
12
+
Their bids in the auction are used to determine the priority of their transactions, i.e., the order in which their transactions will be executed.
13
+
The winners' transactions are forwarded to the blockchain, which both pays their bid and executes the operation.
14
14
The profits of the auction are then split between the integrated protocol and other participants in Express Relay.
FIXME: update this diagram with the designers' version
19
+
18
20
The diagram above shows how Express Relay changes the MEV landscape for a liquidation.
19
-
In the status quo (left), Searchers tip miners in order to guarantee that their liquidation transaction lands on-chain.
20
-
Their transaction directly interacts with the protocol exposing the liquidation opportunity, and the liquidation bonus flows back to the Searcher.
21
+
In the status quo (left), Searchers tip miners in order to guarantee that their liquidation transaction lands on-chain, and their transaction directly interacts with the protocol exposing the liquidation opportunity.
21
22
With Express Relay (right), Searchers submit bids for their transaction to the Express Relay auction.
22
-
The auction submits the winning bids to the blockchain, where the transactions are processed by the Express Relay Entrypoint before being forwarded on to the integrated protocol.
23
-
The Express Relay Entrypoint collects payment from the Searchers and forwards a share of the revenue back to the integrated protocol.
23
+
After the auction, the winning bids are relayed to the blockchain, where the transactions are processed by the Express Relay smart contract before being forwarded on to the integrated protocol.
24
+
The Express Relay contract collects payment from the Searchers and forwards a share of the revenue back to the integrated protocol.
24
25
25
26
FIXME: I think the diagram is wrong (specifically the liquidation bonus going back to express relay)
26
27
27
28
## Which protocols can use Express Relay?
28
29
29
-
Any protocol with permissionless and valuable operations can use Express Relay.
30
-
These operations generate MEV, as the validators control which searchers can access them.
31
-
Express Relay enables protocols to auction access instead, thereby ensuring the operation is competitively priced.
30
+
Any protocol with valuable operations can use Express Relay.
31
+
These operations generate MEV, as the validators control which searchers have the right to access them.
32
+
Express Relay enables protocols to auction access instead of the validators.
32
33
Lending, perps, and derivatives protocols with liquidation mechanisms are clear candidates that can benefit from integration with Express Relay.
33
34
34
-
Aside from eliminating MEV, protocols that need a stable set of searchers may choose to use Express Relay.
35
+
Aside from eliminating MEV, protocols that need a stable set of searchers would benefit from using Express Relay.
35
36
Express Relay provides access to a robust network of searchers who are already active in the Express Relay ecosystem.
36
37
37
38
## Participants in Express Relay
38
39
39
40
There are four types of participants in the Express Relay protocol:
40
41
41
-
- The Relayer runs the off-chain auction and forwards winning transactions onto the blockchain. There is a single Relayer chosen by the Pyth DAO.
42
-
- Protocol developers integrate their protocol with Express Relay in order to eliminate MEV.
43
-
- Searchers participate in auctions to access liquidations and other on-chain opportunities.
44
-
- The Pyth DAO owns and governs the Express Relay system
42
+
- The Relayer runs the off-chain auction and forwards winning transactions onto the blockchain.
43
+
- Protocol developers integrate their protocol with Express Relay in order to eliminate MEV and gain access to searchers.
44
+
- Searchers participate in auctions to access on-chain opportunities such as liquidations.
45
+
- The Pyth DAO owns and governs the Express Relay system.
The auction in Express Relay is held off-chain at the auction server.
4
-
Liquidation bids arrive at the auction server and compete against other bids, vying for the same [permission key](./permissioning.mdx).
5
-
A [relayer](./relayer.mdx) selected by governance serves as the auctioneer and determines the auction in line with the criterion of maximizing the revenue shared back to the protocol that generated this opportunity. That means the auctioneer is expected to forward the subset of bids that maximizes the revenue back to the protocol.
4
+
Bids arrive at the auction server and compete against other bids, vying for the same [permission key](./permissioning.mdx).
5
+
A [relayer](./relayer.mdx) selected by governance serves as the auctioneer and determines the auction in line with the criterion of maximizing the revenue shared back to the protocol that generated this opportunity. That means the auctioneer is expected to forward on-chain the subset of bids that maximizes the revenue back to the protocol.
6
6
7
-
Thus, the Express Relay auction is analogous to a sealed-bid auction, i.e., participants in the auction will not have the contents of their bid disclosed publicly unless they are forwarded on-chain.
7
+
Thus, the Express Relay auction is analogous to a sealed-bid auction, i.e., participants in the auction will not have the contents of their bid disclosed publicly unless they win the auction and are forwarded on-chain.
8
8
9
9
The forwarded subset of transactions is submitted on-chain and first processed by the [`ExpressRelay`](https://github.com/pyth-network/per/blob/main/contracts/src/express-relay/ExpressRelay.sol) contract before individual searchers' submissions are routed to their corresponding `targetContract`s.
10
10
@@ -14,7 +14,7 @@ The `ExpressRelay` contract extracts the payment of the specified bid amount onl
14
14
Hence, the Express Relay auction can be seen as a generalization of a [first-price sealed-bid auction](https://en.wikipedia.org/wiki/First-price_sealed-bid_auction), in that multiple bids can win and pay their first price.
15
15
16
16
The revenue from the auction is shared amongst relevant stakeholders in the Express Relay system. These stakeholders include:
17
-
- the protocol that generated the relevant opportunity
18
-
- the relayer, which handled running the off-chain components of the system
17
+
- the protocol that generates the relevant opportunity
18
+
- the relayer, which handles running the off-chain components of the system
19
19
20
20
The Express Relay contract enforces the exact revenue splits and is subject to change based on governance decisions.
0 commit comments