-
Notifications
You must be signed in to change notification settings - Fork 35
Suggested edits #360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggested edits #360
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,44 @@ | ||
# Design Overview | ||
# How Express Relay Works | ||
|
||
Express Relay allows protocols to eliminate miner-extractable value (MEV). | ||
Many protocols generate MEV on a regular basis. | ||
For example, borrow-lending protocols provide bonuses to searchers for liquidating undercollateralized loans. | ||
Searchers compete for these bonuses by tipping the chain's miners or validators. | ||
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. | ||
|
||
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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same comment as below, on the use of "permissionless" |
||
Developers specify a set of operations in their protocol that must be accessed through Express Relay. | ||
Searchers then participate in an off-chain auction to access these operations. | ||
Their bids in the auction determine the priority of their transactions, i.e., the order in which their transactions will be executed. | ||
The winners transactions are forwarded to the blockchain, which both pays their bid and executes the operation. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe something like "The winners' txs are forwarded to the blockchain, being first routed through an Express Relay entrypoint smart contract that enforces the payment of the bid." |
||
The profits of the auction are then split between the integrated protocol and other participants in Express Relay. | ||
|
||
 | ||
|
||
The diagram above shows how Express Relay changes the MEV landscape for a liquidation. | ||
In the status quo (left), Searchers tip miners in order to guarantee that their liquidation transaction lands on-chain. | ||
Their transaction directly interacts with the protocol exposing the liquidation opportunity, and the liquidation bonus flows back to the Searcher. | ||
With Express Relay (right), Searchers submit bids for their transaction to the Express Relay auction. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This feels a bit repetitive to the above para, maybe just put the image above that one and combine the two paras? |
||
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. | ||
The Express Relay Entrypoint collects payment from the Searchers and forwards a share of the revenue back to the integrated protocol. | ||
|
||
FIXME: I think the diagram is wrong (specifically the liquidation bonus going back to express relay) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the diagram is wrong, good catch. we should correct this in the final version |
||
|
||
## Which protocols can use Express Relay? | ||
|
||
Any protocol with permissionless and valuable operations can use Express Relay. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same point about "permissionless" |
||
These operations generate MEV, as the validators control which searchers can access them. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These two sentences can be rewritten as "Any protocol exposing valuable operations that generate MEV "opportunities" can use Express Relay |
||
Express Relay enables protocols to auction access instead, thereby ensuring the operation is competitively priced. | ||
Lending, perps, and derivatives protocols with liquidation mechanisms are clear candidates that can benefit from integration with Express Relay. | ||
|
||
Aside from eliminating MEV, protocols that need a stable set of searchers may choose to use Express Relay. | ||
Express Relay provides access to a robust network of searchers who are already active in the Express Relay ecosystem. | ||
|
||
## Participants in Express Relay | ||
|
||
There are four types of participants in the Express Relay protocol: | ||
|
||
- The Relayer runs the off-chain auction and forwards winning transactions onto the blockchain. There is a single Relayer chosen by the Pyth DAO. | ||
- Protocol developers integrate their protocol with Express Relay in order to eliminate MEV. | ||
- Searchers participate in auctions to access liquidations and other on-chain opportunities. | ||
- The Pyth DAO owns and governs the Express Relay system |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
{ | ||
"Auction": "auction", | ||
"Opportunities": "opportunities", | ||
"Permissioning": "permissioning", | ||
"Relayer": "relayer", | ||
"error codes": { | ||
"title": "Error Codes ↗", | ||
"href": "https://www.notion.so/pyth-network/Error-codes-explanation-c90c375eb9a4430494578a713a0d7e68?pvs=4" | ||
} | ||
} | ||
"auction": "Auction", | ||
"opportunities": "Opportunities", | ||
"permissioning": "Permissioning", | ||
"relayer": "Relayer" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Relayer | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this can be eliminated i think |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,16 @@ | ||
# Introduction | ||
|
||
Many protocols generate MEV on a regular basis. Borrow-lending protocols for example expose lucrative liquidation bonuses that searchers compete for on tips made to the chain's miners or validators. Most of the value in the liquidation opportunity is captured by the validators, so the liquidation bonus is in essence a transfer of wealth from the protocol to the validators. | ||
Express Relay is a priority auction that enables protocols to eliminate miner-extractable value (MEV). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In general, i like that there's less content here. more of the deep content can be reserved for other pages, but this is good as a way to 1. attract people's interest by focusing on the most important points, 2. focus on the 2 integration paths and help the 2 relevant parties navigate to the content they need. |
||
|
||
Express Relay enables protocols to recapture the MEV they currently leak to validators. By integrating with Express Relay, a protocol internalizes the auction for priority on its lucrative transactions (e.g. liquidations). It also taps into an existing set of searchers already integrated into and actively performing liquidations through Express Relay, reducing the need for the protocol to boostrap and maintain or incentivize its own set of liquidators. | ||
**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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Technically, the operations become permissioned now, maybe just drop the permissionless and replace with "lucrative"? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO, this statement bit overkill for intro page. @anihamde |
||
A network of established searchers compete in the auctions, allowing you to avoid spending time and energy bootstrapping your own protocol-specific searcher network. | ||
Learn how to [Integrate with Express Relay as a protocol](/express-relay/integrate-as-protocol). | ||
|
||
 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think some image on the first landing page would be nice. It's a good way to pull in anyone who otherwise sees a big block of text with jargon and gets demotivated. |
||
FIXME: This link above and the ones below should be big buttons | ||
|
||
## What is Express Relay? | ||
**For Searchers:** Express Relay aggregates liquidation and other MEV opportunities across integrated DeFi protocols, providing easy and unified access. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm curious for others' takes here, but i think "MEV opportunities" isn't the best phrase to use since the term "opportunity" in the Express Relay context relates to getting rid of MEV. I don't know what the alternative is here since "opportunity" hasn't yet been defined so it'd be a bit weird to use. Maybe we could just say "opportunities" and link to the page on Opportunities? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Linking to opportunities page will be sufficient. |
||
Learn how to [Integrate with Express Relay as a searcher](/express-relay/integrate-as-searcher). | ||
|
||
### How does Express Relay work? | ||
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). | ||
|
||
Express Relay features an off-chain auction (run by a third-party entity, the "relayer") where searchers bid on priority rights to transact on a protocol position or opportunity. Once an auction is concluded, the relayer will forward the winning parties' transactions onto the blockchain, where they will pass through the Express Relay entrypoint smart contract before being processed at the end protocol. The entrypoint contract handles permissioning and disbursement of fees to the relevant entities in the system. | ||
|
||
### Different types of actors in Express Relay | ||
|
||
There are four imporant agents in the Express Relay pipeline: | ||
|
||
- Relayer: runs the off-chain auction according to an agreement with the Pyth DAO and forwards winning transactions onto the blockchain | ||
- Protocol DAO/owner: integrates protocol with Express Relay in order to recapture leaked MEV, which can then be shared with protocol stakeholders | ||
- Searcher: participates in the Express Relay auction to capture value from lucrative opportunities such as liquidation bonuses | ||
- Pyth DAO: owner and governing authority of the Express Relay system, designates the relayer to run the off-chain components of the system | ||
|
||
### Which protocols can integrate with Express Relay? | ||
|
||
Protocols that currently leak MEV to validators because the validators control the ordering of lucrative transactions on the protocol can integrate with Express Relay. By doing so, such a protocol internalizes control over the ordering of these lucrative transactions, which means it does not need to surrender value to the validators. | ||
|
||
Apart from recapturing MEV, protocols that are in need of a stable set of searchers that can p . Integrating with Express Relay gives a protocol access to the robust searcher network already active in the Express Relay ecosystem. This means | ||
|
||
Lending, perps, and derivatives protocols that use liquidations are an obvious source of MEV and could benefit from integration with Express Relay. In addition, | ||
|
||
## Links to other pages | ||
## Useful Links |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could note explicitly that this transfer is unnecessary: most of the value dangled by the protocol goes not to the parties that provide an active service (searchers doing liqs) but rather to the passive miners who just control the ordering of txs