Learn about the Relay Protocol
The Relay Protocol is a cross-chain payments system that connects users to relayers willing to perform onchain actions on their behalf. Relay’s design minimizes gas costs, enables rapid chain expansion, and maximizes capital efficiency all while remaining open and trustless. Such a system is particularly well-suited for low-value, high frequency cross-chain actions such as those expected in a world of chain abstraction.
In its current state, the Relay API is similar to other “intent-based” protocols like Across, where liquidity providers known as Relayers use their own capital to “fast fill” user requests to move between chains, and then rebalance using slow, expensive bridges under the hood.
This design has two key advantages over typical bridging:
The typical flow for intent-based protocols is as follows:
Each of these steps has a cost, which different protocols minimize in different ways. Across, which pioneered this design, reduces the cost of settlement with two optimizations:
As a result, the vast majority of the remaining cost comes from the Deposit (~77,000 gas) and Fill (~120,000 gas). This is where Relay is able to achieve significant improvements:
The Relay protocol is designed to minimize the cost of deposits and fills by using a novel architecture that separates the concerns of deposit, market making, liquidity providing and intent filling on the destination chain. We design the protocol with the goal of supressing any need for trusted intermediaries, including the need to prove and settle fills.
This overview was designed to give a high level summary, and did not go into technical detail or discuss how adversarial scenarios are handled. These will be addressed in a future whitepaper.
The protocol will eventually be made of various components which can work independently or together. As of today, some of these components are already implemented and in use, while others are still in development. The ones that are currently implemented include:
These components will also evolve over time to support the overall protocol architecture and their current implementation may not reflect the final design, but rather provide a good intermediate state that enables use to evolve from a simple intent filling API to a fully trustless cross-chain payments system.
You can interact with the Relay Protocol through our Relay app, which provides a reference UI. You can also find the source code for all the components of the Relay Protocol on GitHub.
Alice sends her funds to the Depository contract on the origin chain. The Relayer fills Alice’s request on the destination chain. The Hub keeps track of that deposit. The Relayer can then trigger the Oracle to verify that the intent was correctly filled. If so, the Relayer can then settle the payment and access their user’s deposited funds.
In order to fill on multiple chains, the Relayer needs to keep balances on every supported network. The Vaults are used to rebalance the Relayer’s balances across chains.