The intents bridge: How Across optimizes for gas efficiency

dreamsofdefi
across.to

--

Tldr; Across is the cross-chain ecosystem’s most gas-efficient bridge because it uses an intents-based architecture powered by UMA’s optimistic oracle. This results in significant fee savings for users.

Key takeaways:

  • Across makes gas optimizations on order deposits, fills, and settlements, which helps users save on fees.
  • Across’ intents-based optimistic system is the key to its gas efficiency.
  • We can look at the minimum theoretical gas expenditure for cross-chain transfers to show how Across beats its competitors.

Across is the cross-chain ecosystem’s optimal bridge design. Since launching at the start of crypto winter, Across has consistently proven itself as the fastest and cheapest bridge. As a result, its market share has steadily climbed throughout 2023.

Across offers users significant benefits because it optimizes for capital efficiency. Most notably, Across consumes far less gas than its competitors. This helps users make substantial fee savings.

The key to this competitive lead is Across’ intents-based design. Unlike other solutions, Across is an intents bridge that uses independent relayers to settle orders. It also leverages UMA’s optimistic oracle to verify order fills. This means it’s extremely fast and gas-efficient, offering the ecosystem’s best user experience for cross-chain transfers.

Across is gas-optimized throughout its system. The bridging process can be broken down into three stages: a deposit on the destination chain, an order fill on the origin chain, and the relayer’s repayment. Across’ contracts are meticulously engineered to make gas savings at every stage. In this feature, we detail Across’ gas efficiency and introduce a metric to analyze its performance against other solutions.

Depositing at the origin

Across is a liquidity network that uses canonical assets to fulfill user requests, holding LP capital in a single pool on Ethereum mainnet. When a user wants to transfer their funds, they make a deposit at the origin, while relayers compete to fill the order at the destination.

The user’s deposit requires gas for an ERC-20 token transfer, which costs approximately 45,000 units of gas. When a user makes a deposit, they must also pay a destination gas fee and an additional fee to incentivize the relayer to front their capital. The destination gas fee represents a fraction of an ERC-20 token transfer as relayers receive repayments in batches, amortizing the gas cost over many deposits.

Users cover the relayer’s fill fee plus a small fee to incentivize them to front their capital.

When a user wants to make a transfer, they make a deposit that uses a minimal amount of gas and pay small fees on top.

Using relayers to fill orders

In addition to the deposit on the origin chain, there’s a gas fee associated with the fill on the destination chain.

Relayers compete to front their capital at the destination. The transaction required to fill an order is very close to a simple ERC-20 token transfer, which requires minimal gas. The protocol then uses UMA to verify that the relayer sent the funds. Importantly, this mechanism does not require any expensive onchain validation to confirm that a deposit was made at the origin. As relayers front orders on behalf of users, the fee they charge represents an interest rate on the assets they lend out.

As relayers front their assets to fulfill user requests, order fills require only a simple token transfer, which saves on gas costs.

Settling repayments in bundles

Once an Across relayer fills an order, the system must settle their repayments.

Across uses a batch settlement system, where UMA optimistically verifies relayer repayments in bundles. This improves the system’s gas efficiency. As repayments are bundled, the gas cost for one ERC-20 token transfer covers many fills. Each fill repayment equates to fractions of a single ERC-20 transfer, and the cost falls when the relayer makes more transactions.

A relayer can front many orders in the time window between each repayment. This means the user’s share of the gas fee is very small. Across relayers receive repayments after a two-hour challenge period, and they effectively charge the user an interest rate to cover the two-hour window in which they lend out their assets.

Across uses offchain liquidity and bundled verification, resulting in improved gas efficiency, lower fees, and a better user experience.

Across’ system, where relayers front offchain liquidity and settlements are bundled, offers significant gas savings over alternative solutions. The popular alternative to Across’ system is using onchain liquidity for delivery-vs-payment (DvP). In DvP bridging, orders are individually verified with messages before they are settled, leading to high gas costs. DvP bridges can’t feasibly bundle verifications, as users would suffer from extremely long waiting times for orders to get filled. This highlights the advantages of using intents and offchain liquidity.

The intents-based auction protocol UniswapX shares some similarities with Across. But in UniswapX, the lender fronts their assets for a shorter time period (5 minutes vs. Across’ 120 minutes). This means their risk is lower, so their loan costs should be slightly lower. However, the loan costs for both UniswapX and Across users are still small. But as Across makes significant gas savings on bundling verifications, the savings for the end user negate the loan costs.

In summary, bundling relayer repayments reduces Across’ gas expenditure on settlement costs. This approach improves on DvP systems and other intents designs.

The intents bridge

Across is an intents bridge.

It adopts an intents system to fill orders, where relayers front their own liquidity to fulfill the user’s intent.

Using intents, offchain liquidity, and bundled settlement is different from DvP bridging, where onchain liquidity fills orders. DvP bridges require onchain validation with messages to confirm each deposit was made at the origin (i.e. a delivery) before each order gets filled at the destination (i.e. a payment).

In short, using intents and offchain liquidity is much more gas-efficient than DvP bridging.

Introducing the Minimal Theoretical Gas score

To understand how Across ranks on gas efficiency against other protocols, we can use a scale to analyze the amount of gas they spend against the minimum possible expenditure.

Bridge transfers require at least two transactions: a deposit on the origin and a fill on the destination. By calculating the ratio they spend on transfers against the minimum expenditure for a transfer, we can get an idea of their gas efficiency. We refer to this as the Minimal Theoretical Gas (MTG) score.

MTG = (deposit gas expenditure + fill gas expenditure) ÷ (minimum deposit gas expenditure + minimum fill gas expenditure)

We looked at the MTG for Across and other solutions for USDC transfers. A single USDC transfer costs 45,000 units, meaning a bridge needs a minimum of 90,000 units. The below table shows how Across and other bridges ranked.

The Minimal Theoretical Gas Score by bridge for USDC transfers. In this example, Across has the best MTG score. The solution with the highest MTG score, Stargate, uses 3x more gas than Across.

In this example, a perfect MTG score of 1.00 could be attained if a protocol spent only 90,000 units (though it would have no onchain contracts, making bridging impossible).

Across ranks top with a total gas expenditure of 172,111 units, giving an MTG score of 1.91. In this example, Hop trails Across with a score of 2.62, while Stargate uses over 3x as much gas as Across.

Across is already the most gas-efficient bridge, evidenced by its MTG score of 1.91. But in the future, further optimizations could be introduced to bring the score closer to 1.00.

Across and an intents-based future

Across is the cross-chain ecosystem’s most gas-efficient bridge. The system has been carefully engineered to save on gas at every step of the bridging process, from the moment the user makes a deposit to the moment the relayer gets a bundled repayment. Our analysis of the numbers shows how Across ranks on gas spending against its competitors.

Across’ focus on gas optimization hints at why its market share is growing. It also speaks to the potential of intents and optimistic frameworks. Across saves on gas because it adopts an intents model with optimistic verification. As crypto grows and user experience becomes increasingly important, intents could gain significant adoption across the crypto ecosystem by helping users save on gas fees and simplifying the user experience. In the meantime, Across has proven that intents will be key to enabling seamless cross-chain interoperability.

This piece was compiled with contributions and editing from Ryan Carman, Across Product Lead.

--

--

dreamsofdefi
across.to

Class of 2017 alum, writer, occasional JPEG speculator