Relay strives for 100% successful bridges & swaps. Occassionally, due to a variety of possible circumstances, a bridge or swap might be refunded instead of completed. Learn more about Relay’s refund logic and how it works.

What is a refund?

A refund is returned funds to a user due to a failed swap or bridge. Relay will refund the user’s their funds on the destination chain. If the destination chain is unavailable, Relay will refund the user’s funds on the deposit chain. The destination chain might be unavaible for a variety of reasons like a network outage.

What causes refunds to happen?

A refund is triggered when the swap or bridge fails to complete. A failure can occur for a variety of reasons including but not exclusive to:

  • Transactions Reverting: Before giving a quote, we simulate the transaction to insure it will succeed. Between the time the quote is given and the user accepts & deposits funds, the transaction could revert. Transactions reverting could be caused by if there is a contested mint or execution was delayed.
  • User’s Wallet Address is Different Than Transaction Depositing Address: This happens when the user switches wallets right before signing the transaction. Users must execute the transaction with the wallet address that received the quote.
  • User Deposits Too Little: There are two cases for how this can happen.
    1. The user explicitly deposits a lower amount than Relay requested.
    2. The user sent the deposit we requested but did so delayed so the original quote is no longer valid. Quotes expire after 1 minute then a new quote is generated.
  • Destination Chain is Unavailable: Occasionally, the destination chain will have a network outage beyond our control. An example could be an RPC that is down or the chain is experiencing a large reorginization.
  • User Sends Deposits With the Same Request ID in the Calldata Multiple Times
  • User Send Deposits Without a Request ID in the Calldata

When is there no refund given?

If the refund amount is not enough to cover the cost of gas, Relay will mark the bridge or swap as failed & no refund will be sent.

What currency is used for refunds?

For bridges, Relay will refund the user in the original currency they sent.
For swaps, Relay will refund users in the default currency of the chain. You can determine the default currency of a chain by looking at the fee currency. For example, if a chain’s default currency is ETH than ETH will be refunded. We have a few chains that their native currency is not ETH: Avalanche uses USDC, Polygon uses USDC, Xai uses Xai, and Degen uses Degen.

Are refunds automatic & instant?

Yes, refunds happen automatically when swaps or bridges fail to complete. If a failure occurs, Relay will refund the user’s funds almost instantly. Please remember no refund is given if the refund amount cannot cover the cost of gas.