Relay
SupportGet in TouchTry Relay
Relay PlatformAPI ReferenceRelayKitRelay ProtocolChangelog

Getting Started

What is Relay?How Relay Works

Solutions

Payment Service ProvidersWallets & Wallet ProvidersMultichain AppsChainsCommerce & Payments

Use Cases

Bridging & OnboardingSwapsCall Execution

Features

App FeesFee SponsorshipDeposit AddressesGas Top-UpGasless ExecutionFast FillGasless SwapsPrice StabilizationRouting Integration Models

Security

Transaction ScreeningUnsupported ExchangesBug Bounty ProgramMEV protectionCommunity SupportContract Audits

Resources

Supported ChainsIntegrating using AISupportBrand Assets

API Reference

API OverviewQuickstartApps, API keys, and Rate LimitsAccess TokensUnderstanding Step ExecutionWallet DetectionCost & Fee StructureRefundsInput ValidationTrade TypesSurplus & ShortageHandling Quote ErrorsHandling Rate LimitsHandling Execution ErrorsContract CompatibilityBridging Integration GuideCall Execution Integration GuideTransaction IndexingBase Builder CodesSmart Accounts in RelayTestnet SupportSolana SupportBitcoin SupportHyperliquid SupportLighter SupportDeep LinkingWebsocketsWebhooksMigrating to Requests v3Migrating to Currencies v2Migrating to Token Price v2Supported ChainsContract AddressesSupported Tokens & RoutesTroubleshootingGet QuoteSubmit PermitGet StatusGet RequestsGet Published RequestsGet ChainsGet Chains LiquidityGet CurrenciesGet Currency ClassificationsGet Token PriceTransactions IndexTransactions SingleDeposit Address ReindexGet App Fee BalancesGet Balance EventsClaim App FeesGet UsageFast FillGet Swap SourcesCreate Access TokenExecute Gasless TxsAttest DepositGet Recovery BalancesRequest WithdrawalGet Withdrawal StatusGet Requests (v2)Get PriceGet ConfigGet Execution StatusGet Currencies (v1)Get Token Price (v1)Get Quote

RelayKit

OverviewInstallationcreateClientgetQuoteexecutegetAppFeesclaimAppFeesfastFillexecuteGaslessBatchAdaptersTypescript API TypingsChain UtilsInstallationuseQuoteuseRelayChainsuseRequestsuseTokenListuseTokenPriceuseExecutionStatusInstallationRelayKitProviderSwapWidgetThemingTroubleshooting

Protocol

Relay ProtocolHow It WorksThe Relay ChainDepositoryDeposit AddressesOracleHubAllocatorSecurity CouncilSecurity & AuditsFor AppsProgrammatic WithdrawalsWithdrawing with a SafeOperate a Third-Party Relay OracleAddressesEVM Depository ReferenceSVM Depository ReferenceOverviewArchitectureSecurityRelay Vaults BackendBridgingInteracting with Relay VaultsWithdrawing from Relay VaultsRelayPoolFactoryRelayPoolRelayPoolNativeGatewayRelayBridgeFactoryRelayBridge

Changelog

Changelog
## Documentation Index Fetch the complete documentation index at: https://docs.relay.link/llms.txt Use this file to discover all available pages before exploring further.
## Agent Instructions To quote bridges and swaps, look up chains and tokens, or track Relay transactions from an agent, use the Relay MCP server: npx -y @relayprotocol/relay-mcp. It is read-only and does not sign or broadcast transactions. Setup: https://docs.relay.link/resources/developing-with-ai.md For Relay Protocol's trust model, security architecture, and audits, see https://docs.relay.link/references/protocol/security.md. For address screening, see https://docs.relay.link/security/transaction-screening.md.

RelayPoolFactory

Solidity API

RelayPoolTimelock

Interface for initializing timelock contracts

*Used to initialize cloned timelock instances with proper access control*

initialize

function initialize(uint256 minDelay, address[] proposers, address[] executors, address admin) external

Initializes a timelock contract with the specified parameters

Parameters

NameTypeDescription
minDelayuint256The minimum delay in seconds for timelock operations
proposersaddress\[]Array of addresses that can propose operations
executorsaddress\[]Array of addresses that can execute operations
adminaddressThe admin address (use address(0) for no admin)

RelayPoolFactory

Factory contract for deploying RelayPool instances with associated timelocks

*Deploys pools with timelock governance and tracks pools by asset*

HYPERLANE\_MAILBOX

address HYPERLANE_MAILBOX

The Hyperlane mailbox address used by all deployed pools

*Immutable to ensure consistency across all pools*

WETH

address WETH

The WETH contract address for native currency pools

*Used when creating pools that handle native currency*

TIMELOCK\_TEMPLATE

address TIMELOCK_TEMPLATE

The timelock template contract to be cloned

*Each pool gets its own timelock instance cloned from this template*

MIN\_TIMELOCK\_DELAY

uint256 MIN_TIMELOCK_DELAY

The minimum timelock delay enforced for non-owner deployments

*Owner can deploy with shorter delays for testing/special cases*

poolsByAsset

mapping(address => address[]) poolsByAsset

Mapping from asset address to array of deployed pool addresses

*Multiple pools can exist for the same asset*

UnauthorizedCaller

error UnauthorizedCaller(address sender)

Error when unauthorized address attempts restricted operation

Parameters

NameTypeDescription
senderaddressThe address that attempted the unauthorized action

InsufficientInitialDeposit

error InsufficientInitialDeposit(uint256 deposit)

Error when initial deposit is insufficient

Parameters

NameTypeDescription
deposituint256The insufficient deposit amount provided

InsufficientTimelockDelay

error InsufficientTimelockDelay(uint256 delay)

Error when timelock delay is below minimum requirement

Parameters

NameTypeDescription
delayuint256The insufficient delay provided

PoolDeployed

event PoolDeployed(address pool, address creator, address asset, string name, string symbol, address thirdPartyPool, address timelock)

Emitted when a new pool is deployed

Parameters

NameTypeDescription
pooladdressThe address of the deployed RelayPool
creatoraddressThe address that deployed the pool
assetaddressThe underlying asset of the pool
namestringThe name of the pool's share token
symbolstringThe symbol of the pool's share token
thirdPartyPooladdressThe yield pool where assets will be deposited
timelockaddressThe timelock contract governing the pool

constructor

constructor(address hMailbox, address weth, address timelock, uint256 minTimelockDelay) public

Initializes the factory with required infrastructure addresses

Parameters

NameTypeDescription
hMailboxaddressThe Hyperlane mailbox contract address
wethaddressThe WETH contract address
timelockaddressThe timelock template to be cloned for each pool
minTimelockDelayuint256The minimum delay for timelock operations

deployPool

function deployPool(contract ERC20 asset, string name, string symbol, address thirdPartyPool, uint256 timelockDelay, uint256 initialDeposit, address curator) public returns (address)

Deploys a new RelayPool with associated timelock governance

*Requires initial deposit to prevent inflation attacks, creates dedicated timelock*

Parameters

NameTypeDescription
assetcontract ERC20The ERC20 asset for the pool
namestringThe name for the pool's share token
symbolstringThe symbol for the pool's share token
thirdPartyPooladdressThe yield pool where idle assets will be deposited
timelockDelayuint256The delay in seconds for timelock operations
initialDeposituint256The initial deposit amount (must be at least 1 unit of asset)
curatoraddressThe address that will control the pool through the timelock

Return Values

NameTypeDescription
\[0]addressThe address of the newly deployed RelayPool

This documentation is built and hosted on Mintlify, a developer documentation platform.

PreviousWithdrawing from Relay VaultsNextRelayPool
Relay© 2026 Uneven Labs, Inc. All rights reserved.XGitHubSupport