Relayer Extractable Value

0xjim
Coinmonks
15 min readSep 19, 2023

--

Relayers are the heroes of interoperability.

Over the past year, we’ve seen the unveiling of new chains and L2s, rollup frameworks, and Rollups-as-a-Service solutions. We now know that one thing is certain: the future will have an ever-increasing number of chains.

As this accelerates, the role of cross-chain interoperability protocols (e.g., IBC, Wormhole, etc.) becomes more and more critical.

In practice, interoperability protocols are just an agreement for two chains to speak to each other in a structured and cryptographically verifiable way (e.g., “mint X tokens to Y”). The less sexy part of cross-chain is relayers, off-chain entities that monitor chains for protocol-specific messages and deliver them to destination chains. Without them, interop protocols would not be able to function.

Relayers are truly the unsung heroes of interoperability.

Sadly, while relayers are instrumental in enabling cross-chain communication, they can be costly to operate and maintain–especially at scale. Historically, running relayers has been either under-incentivised or not incentivised at all, resulting in few entities willing to take on the role.

Often, the responsibility of running relayers falls on interop protocols’ core teams, protocol foundations, or third-party entities that receive grants to manage them. Running relayers is generally seen as a loss leader for other parts of an entity’s business (e.g., marketing for a wallet, delegation leads for validators).

REV as relayer monetisation

Since it has historically not been possible to run a relayer profitably, a new opportunity for value capture has emerged for relayers in the cross-chain transaction process. We can call this opportunity Relayer Extractable Value (REV).

We define REV as “the maximum value that a relayer can extract from being a privileged actor in the cross-chain transaction flow”.

Relayers not only have visibility into the incoming messages onto a destination chain, they also have the ability to choose when to submit a transaction for execution. Said differently, relayers have the privileged role of being a “transaction initiator” on the destination chain.

As such, relayers can order the transactions into a bundle before delivering it into the destination chain. In this worldview, relayers shift from being “dumb” entities that naively move messages to an intelligent combined relayer-searcher entity.

As the multi-chain ecosystem matures and continues to proliferate, the importance of REV will grow, becoming an increasingly relevant opportunity for relayers. At Catalyst, we believe that–much like the concept of Maximum Extractable Value (MEV) broadly–REV must be comprehensively understood, measured, and distributed within the REV supply chain.

Just as existing MEV solutions are designed to minimise “malicious MEV”, similar considerations should be applied to REV that could be harmful to end-users.

It’s important to note that, while REV can be seen as a subset of cross-domain MEV as a whole, its scope is much more narrow.

Cross-domain MEV are MEV opportunities that span multiple domains. A popular example is arbitrage of asset prices across two chains. To date, cross-domain MEV research has focused on how to extract cross-domain MEV–whether through holding inventory on two chains to perform the stat arb, or being a validator for both chains every N blocks.

Source: blocknative

In contrast, REV focuses purely on cross-chain transactions–i.e., transactions that require a relayer to pass messages between domains (e.g., bridging, cross-chain liquidity networks, cross-chain DEXes, cross-chain lending).

The REV supply chain

Before diving into the details of REV, let’s go over the domains involved in cross-chain interactions and the key actors associated in each.

Three domains:

  1. Origin chain: The chain where the cross-chain message originated.
  2. Cross-chain communication protocol: The protocol where the cross-chain message is communicated.
  3. Destination chain: The chain for which the cross-chain message is destined (lol).

The origin chain

The origin chain is subject to the MEV supply chain that we all know and love. Users have intents and submit transactions to the mempool via their wallet of choice. Searchers combine transactions into bundles that are then submitted (alongside bids) to validators for inclusion, where validators are incentivised to choose the bundles with the highest bids. For Ethereum and other PBS-employing blockchains, a builder entity can sit between the searchers and validators.

Source: Flashbots

Currently, any cross-chain transaction must first be executed on the origin chain before being queued up and relayed to the destination chain via the interoperability protocol (e.g., message is placed into an “Outbox” contract of the interoperability protocol before being picked up by a relayer).

As a result, cross-chain transactions may be subject to vanilla MEV extraction on the origin chain, even before the cross-chain communication begins. This MEV opportunity is outside of the scope of this post.

The interoperability protocol

Here, the messages are en route to the destination chain–with relayers carrying messages from one domain to another.

Interoperability protocols may have their own MEV mitigation mechanisms. IBC has the concept of “ordered channels” where packets have a canonical ordering. LayerZero also has enforced ordering baked into its protocol. Some protocols are looking into the implementation of threshold encryption in order to obfuscate the contents of a message.

With that said, the majority of protocols do not have payload encryption nor canonical ordering and therefore messages can be seen and re-ordered by relayers as they see fit.

The destination chain

Finally, the messages are delivered to the mempool of the destination chain (plus gas to execute them–supplied by the relayer).

A savvy relayer will order the messages into a bundle before delivering it into the mempool, such that there is no additional MEV to be extracted.

If that doesn’t take place, then the MEV supply chain mirrors that of the origin chain (e.g., searchers, builders, validators, etc.). However, in the context of REV and the existence of informed relayers, that should rarely happen–as the arriving bundle should have no additional MEV to be extracted.

As such, the domains can be simplified to the origin chain MEV supply chain, and then the cross-chain MEV supply chain. Said differently, relayers are a subset of searchers in the destination chain’s MEV supply chain.

Now, let’s examine a few illustrative examples of REV in the real world.

Relayer Sandwiching Users

  1. User wants to swap 1 ETH from OP Mainnet for MATIC on Polygon PoS via Catalyst.
  2. User initiates a cross-chain swap with specified parameters, including a slippage tolerance.
  3. Relayer picks up the user’s OP Mainnet message to deliver to Polygon PoS, seeing their desired swap and slippage tolerance.
  4. Before delivering the user’s message onto the target chain, the relayer submits a bundle of transactions, sandwiching the user’s incoming transaction.
  5. This tactic involves front-running the user’s swap until the slippage tolerance is reached, after which the relayer backruns the swap as well.

Just-In-Time Liquidity Providing (JIT LPing)

  1. Alice is a big money spender and wants to swap 100 ETH from OP Mainnet for MATIC on Polygon PoS via Catalyst.
  2. Relayer picks up her OP Mainnet message to deliver to Polygon PoS and sees her large incoming swap.
  3. By leveraging flash loans, Relayer can quickly deposit a large amount of ETH and MATIC into the relevant Catalyst vaults–effectively becoming a significant LP for this incoming high-value swap.
  4. Relayer delivers Alice’s message onto Polygon PoS, and earns an outsized portion of the pool’s liquidity fees.
  5. Afterwards, Relayer withdraws its assets and returns the flash loan, having made risk-free money from Alice’s swap.
  6. Recall that steps 3–5 can all be bundled into one block on the destination chain.

Withholding Messages for Ransom

Although relayers can’t alter the contents of a cross-chain message, they may hold the power to withhold message delivery, exploiting the urgency of certain transactions and thus extracting additional value.

  1. User holds a collateral on a lending protocol on Arbitrum, but has bridged the debt to Scroll.
  2. Markets have shifted and now the user faces potential liquidation of their assets on Arbitrum.
  3. User wants to bridge back to Arbitrum in order to top up their collateral position and stave off liquidation.
  4. The time-sensitive nature of the transaction may also force them to offer higher fees for faster relaying.
  5. Seeing this, relayers can opt to withhold the relaying of the message, forcing the user to keep increasing their fees in order for the message to be relayed.

Designing Systems to Capture REV

At Catalyst, we believe in the notion of “sovereign MEV”. This entails capturing the MEV generated within a system and having the ability to distribute it for the benefit of the system (e.g., through funding public goods, rewarding liquidity providers).

Eventually, we envision capturing the REV that is generated in cross-chain swaps on Catalyst.

Relayers essentially play the privileged role of a “transaction initiator” on the destination chain. In order to effectively capture REV, a temporary monopoly can be created (with enforced principles like timely delivery) and given to a relayer in order to relay and execute the cross-chain message.

Three potential approaches emerge:

Relayer Order Flow Auction (ROFA): OFA for the “right to relay”.

Relayers bid for the exclusive right to relay cross-chain transactions. This can be for all swaps within a specified timeframe or simply for each swap. This auction-based system ensures that the most competitive relayers gain the privilege of relaying.

Here’s how the ROFA would work:

  1. Auction Setup: At the start of each auction cycle, a set of cross-chain transactions that are ready to be relayed is identified. These transactions could include swaps, transfers, or any other cross-chain message.
  2. Bidding: Relayers who wish to participate in the auction submit their bids. These bids represent the fee that the relayer is willing to pay in exchange for the right to relay specific transaction(s).
  3. Auction Period: The auction runs for a predetermined period of time, during which relayers have the opportunity to submit their bids. This ensures that there is enough time for relayers to analyse the available transactions and simulate how much REV that they can extract, thus informing their bid amount.
  4. Bid Evaluation: At the end of the auction period, the bids are evaluated based on a set of criteria, including bid amount and other factors. The winning bid is the one that aligns best with the transaction’s requirements while offering competitive terms.
  5. Transaction Submission: The relayer with the winning bid is granted the temporary monopoly to order and submit the specific transaction(s) alongside any bundle of transactions that they choose to include with it. They are responsible for ensuring that the transaction is submitted within the agreed-upon timeframe and parameters.
  6. Value Distribution: The fee paid by the winning relayer is captured by the system. Afterwards, it may be distributed among various stakeholders, which could include liquidity providers, validators, protocol governance, etc.

This happens in Connext, where a “sequencer” entity decides which “routers” can execute the swap. Multiple routers send bids to the Connext sequencer, where routers are bidding to execute one specific transaction and charging the least amount of fee to the end user.

By allowing relayers to participate in an auction, the mechanism promotes fair competition where relayers have the opportunity to submit bids based on their capabilities and resources.

With that said, ROFA introduces a centralisation vector if the bidding process consistently favours a single entity that can extract the most REV.

If one relayer wins most of the bids, it could lead to a de facto monopoly over the submission of cross-chain transactions. This forms a positive feedback loop where other relayers are discouraged from participating in the auction because a dominant entity can always outbid them.

Leader Selection Mechanism: top-down selection of relayer

Drawing inspiration from leader selection in blockchain networks, where validators are temporarily entrusted to generate new blocks, a similar concept can be applied to relayers.

There could be a relayer leader selection mechanism that decides which relayer can submit a batch of transactions. In this option, the selection mechanism will capture a predetermined portion of the REV with the relayer getting the remaining.

This approach allows the system to regulate the frequency and timing of relays, which is relevant in scenarios where timing is critical–such as capturing arbitrage. It also can more evenly distribute value capture among various relayers over time, preventing a single entity from continuously monopolising value extraction like in ROFA.

However, it’s important to implement this leader selection mechanism in a transparent manner. The selection process should involve fair criteria, such as a merit-based system that considers a relayer’s performance and reputation. The selection process needs to be accessible to all relayers so that the system can prevent centralisation.

Relayer-Searcher Separation (RSS): keeping relayers decentralised

This design optimises for keeping relayers decentralised and to not be subjected to the centralisation vectors of ROFA and relayer leader selection.

Like PBS, we could call this RSS (Relayer-Searcher Separation) where relayers are chosen in a round-robin selection mechanism in a predetermined cadence (e.g., via Tendermint). In parallel, bundles are being solicited from searchers who are compiling the best execution of relayer order flow in order to maximise value extraction–alongside their bids. Relayers then would sign commitments with the highest paying searchers, confirming their agreement to include the specified bundles.

This offloads the searcher workload to other entities–allowing relayers to remain “dumb” and therefore decentralised. Relayers will only focus on naively relaying messages, as directed by the top-paying searcher.

However, it’s important to note that relayer cannot guarantee inclusion on the destination for searchers–which we’ll go into more detail on how to address in the next section. This proposal only works if relayers can guarantee bundle inclusion in order to incentivise searcher participation.

Additional Considerations in Designing an REV System

This is a preliminary glimpse into (and also a gross oversimplification of) the world of REV. By discussing REV out in the open, we hope that additional open discussions are stimulated to not only increase our understanding of REV but also inspire deeper explorations into its mechanisms and the potential design of systems to harness its benefits and mitigate its drawbacks.

With that in mind, we turn our attention to additional considerations that warrant research to further our comprehension of REV:

Enforcement Mechanisms

A critical aspect of any REV framework is ensuring that winning relayers actually submit the relayed transactions. Without proper enforcement, the temporary monopoly granted to relayers might not translate into actual message submission.

A robust relayer system should incentivise and enforce timely submission. Cross-chain transactions are oftentimes time-sensitive, and thus demand quick relaying.

One option is to penalise relayers (via bonding and slashing, or proof-of-governance style removal from an allowlist) who fail to submit transactions. Another option is to incentivise submission from relayers–such as a conditional payment mechanism in which relayers are only paid after a message is delivered within a specified time period.

Souce: Modular Summit 2023

Catalyst is actively working on an incentive scheme that showcases the power of conditional payments, encouraging timely transaction submission while ensuring a fair compensation structure for relayers.

Guaranteed Transaction Inclusion

Since oftentimes relayers are not the block proposer/validator of the destination chain, they don’t have guaranteed assurance that their bundle will be included into the destination chain block. As such, there is no foolproof mechanism to ensure timely inclusion of cross-chain messages (and thus no guarantee that they will capture the MEV).

To make matters worse, validators can see relayer bundles in the mempool and frontrun them by including their own bundle with the relayed messages. As a result, they can steal REV at will.

Some options to guarantee relayer bundle inclusion:

  1. Make validators responsible for relaying. In the relayer leader selection approach, relayers should only be validators/block proposers on the destination chain. A validator is selected to relay messages for its incoming slot. This is conceptually very similar to cross-chain MEV in an Interchain Scheduler.
  2. Separate relayers and validators. To prevent increasing validator overhead, we can also choose PBS-type mechanisms like mev-boost in which relayers can directly communicate with the destination chain validator/block proposer. In this model, relayers continue to act as searchers that submit bundles to block builders (or just straight to a validator/block proposer in a mev-geth type implementation). This way, validators remain “dumb” to the contents of a block and leave the block building to other entities.
  3. Force inclusion during consensus. Using ABCI++ or creating a Protocol-Owned Builder module to enforce relayer bundle inclusion. In this case, a relayer “lane” is created within a block that guarantees messages will be included as they were ordered by the relayer. This only works in the context of Cosmos SDK chains.

With all that said, block space doesn’t appear to be competitive for most chains/domains outside of Ethereum and some select others, so it’s possible that relayers’ bundles will be naively included without these aforementioned mechanisms in place.

Permissioned vs. Permissionless Relayer Systems

In a permissioned setting, permissioned relayers hold much more power. They control the timing of delivering messages to the destination chain, which in turn determines when swaps and transactions execute. As a result, permissioned relayers gain the ability to front-run transactions and capture value through optimal timing and execution.

This closely resembles the role of solver networks, where solvers front liquidity on behalf of users. Because solvers are fronting the liquidity and know precisely when the transaction will execute, they are in a better position to extract MEV.

Due to the public nature of the origin blockchain, anyone with the necessary tools and knowledge can identify and act upon cross-chain MEV opportunities. In a permissionless setting, relayers need to heavily compete with one another to deliver a message as optimally as possible (e.g., fast, cheap, etc.), thus making the timing of the execution of a cross-chain message less predictable. As a result, relayers now operate without these exclusive privileges.

That being said, although certain relayer systems are designed to be permissionless, in practice there is a scarcity in active relayers. This is even more pronounced particularly for specific routes — especially those involving less commonly used chains. As a result, permissionless systems may yield the same amount of relayers as permissioned ones.

Handling Non-REV Generating Transactions

Balancing the treatment of REV-generating transactions with those that don’t generate any is essential for user fairness. Defining requirements for relayers to include all transactions within a specified timeframe prevents non-REV generating users from being dismissed by relayers.

Another way to combat this is through self-relaying. This concept is similar to the notion of forced inclusion for roll-ups onto settlement layers. Incorporating no-code or easily accessible options for users to self-relay messages can ensure message inclusion and exemplify user sovereignty (e.g., a wallet plug-in for self relay).

Source: Modular Summit 2023

Native Cross-Domain MEV Solutions

Exploring solutions like SUAVE that address cross-domain intents presents opportunities for relayers to act as solvers. In this world, relayers can also play roles as block builders, proposers, or validators in both origin and destination chains that contribute to the seamless execution of cross-chain transactions.

Looking Forward

Throughout this intro to REV, we dove into the supply chain of cross-chain transactions, relayers’ pivotal roles in it, and the extractable opportunities that emerge from their access to privileged information.

By shedding light on the mechanisms and potential solutions to REV, we hope to foster further discussions on this little-known topic. We want to collaborate with the broader crypto community to design systems that harness REV’s value generation while addressing and mitigating its harmful effects.

As the crypto space continues to expand with new chains and cross-chain transactions become more and more complicated, the importance of creating robust and thoughtful relayer systems becomes increasingly apparent. Balancing economic incentives, minimising malicious actions, and fostering a decentralised and resilient network of relayers are just some of the challenges we face going forward.

Let’s work together to refine our understanding of REV and to craft solutions that enhance the integrity and fairness in our cross-chain economies.

Acknowledgements

Thank you to Vaibhav from Socket, the Skip team (Keefer & Mag) and the IBC team (Susannah & Charly) for many conversations on this niche topic.

Thank you to Bo from Polymer and Tina from EigenLayer for reviewing the piece.

Resources

Hop REV discussion by Socket

MEV Supply Chain

Order Flow Auction Design Space

A Formalization of Cross-Domain Maximal Extractable Value

SoK: Cross-Domain MEV

The Fundamentals of Cross-Chain MEV

--

--

0xjim
Coinmonks

Product manager, DAO contributor, crypto enthusiast