title

Relay enables instant bridging (deposits & withdrawals) on supported chains. Learn more about how it works, how to integrate Relay, and how to get your chain supported below.

How it Works

Relay’s instant bridging is powered by cross-chain relaying. This model results in low-cost, low-latency (1-10 seconds) cross-chain transactions. When a user wishes to bridge, they recieve a quote from Relay that describes the time and cost of bridging. When they accept the quote, the order is validated and they submit a transfer directly to the relayer. The relayer then fulfills the bridge on the destination chian.

While the Relay Protocol is still in development, users rely on Reservoir for order validation and relaying. Applications trust Reservoir to perform cross-chain relaying, and refund money in the case of disputes. The team will be releasing a fully decentralized and trustless protocol shortly, which you can learn more about in the Relay Protocol Documentation

Integrating Instant Bridging

The Relay SDK facilitates interacting with the underlying Relay API. To get started make sure that you install and configure the Relay SDK.Ensure that everything is configured properly before moving on to implementing the call action.

Instant Bridge

import { getClient, Execute } from "@reservoir0x/relay-sdk";
import { createWalletClient, http } from 'viem'

...

wallet = createWalletClient({
  account: address,
  transport: http()
})

//A simple bridge requires no data, so 0x (null data) is provided
//In this example we're bridging from zora to base

getClient().actions.call({
  chainId: 7777777, //This is not required as the call action will use the active configured chain
  toChainId: 8453,
  txs: [{
    to: "0x03508bB71268BBA25ECaCC8F620e01866650532c",
   	value: "1000000",
    data: "0x"
  }],
  wallet: wallet,
  onProgress: (steps) => {
    console.log(steps)
  },
})

Adding Relay to Your Chain

Relay can easily be added to any EVM-chain, such as OP stack rollups, Arbitrum Orbit chains, or more. Please feel free to Reach Out to discuss getting you chain supported today!