Relaybridge refunds

Last updated ·

Relay can return funds on the origin chain when a bridge or swap cannot complete. Automatic refunds require refundTo in the quote, enough refundable funds to cover gas, and route checks that permit the return. Screening failures and other execution errors can prevent an automatic payout. A failed request alone does not confirm that money was returned.

Refund recipient and timing

Automatic refunds go to the quote’s refundTo address on the origin chain. If refundTo is absent, automatic refunds are disabled. Do not assume that the destination recipient is also the refund recipient.

Relay Settlement’s fast-refund flow allows a solver to return funds on the origin chain when it cannot complete the destination fill. The protocol verifies that return and settles it through the same accounting mechanism used for fills. This solver-driven refund does not require waiting for an expiry window, but platform refund conditions still apply, and completion depends on the origin chain.


Failures that can lead to refund handling

Relay documents several reasons that a bridge or swap may fail:

  • The transaction reverts after the quote was simulated, including when execution is delayed or conditions change.
  • The depositing address differs from the wallet address for which the quote was issued, such as after switching wallets before signing.
  • The deposited amount is lower than the amount requested.
  • The destination chain becomes unavailable, including through an RPC outage or a large chain reorganization.
  • Deposits reuse the same request ID in their calldata, or omit the required request ID.
  • Quote regeneration produces a lower currencyOut.minimumAmount than the preceding quote. This field specifies the minimum destination amount that the user will receive.

Whether an automatic return can proceed also depends on the refund address, gas coverage, and execution checks described above.


Refund amount and currency

Relay deducts the gas cost of processing a refund from the returned funds. If the refundable amount cannot cover that gas, Relay marks the bridge or swap as failed and sends no refund.

The refund currency depends on the route. Relay attempts to return the original currency, but an origin swap can change the asset and amount available for return.

Deposit without an origin swap
The refundable deposited funds provide the amount basis, with processing gas deducted. The return currency remains subject to the route.
Deposit with an origin swap
The amount basis is what the Depository actually received after the swap, with processing gas deducted. The refund does not restore the balance that existed before the origin swap.

Does a refund reverse an origin swap?

Consider a failed route with these hypothetical conditions: an origin swap has already deposited 68.43 USDC into the Depository, the refund gas deduction is 0.26 USDC, and the quote specifies the intended origin-chain refund recipient in refundTo . Assume that route and screening checks permit a solver refund.

The calculated return is 68.43 USDC - 0.26 USDC = 68.17 USDC . This is an origin-chain USDC refund from the post-swap deposit; it does not reverse the sale of the original input token. A different deposited amount or gas deduction changes the result. If the refundable balance cannot cover gas, or the required checks prevent the return, the automatic payout does not proceed.

Destination delivery and refund evidence

Completed destination fill
A fill performs the requested action on the destination chain. The destination transaction provides evidence of that action, including the recipient, asset, and amount delivered.
Completed solver refund
A refund returns funds on the origin chain when the destination action cannot complete. The origin-chain refund transfer provides evidence of the recipient, asset, and amount returned.

The original deposit transaction records funds entering the route. It does not establish that either destination delivery or a refund has completed. To confirm a return, inspect the refund transaction on the origin chain and its transfer to refundTo ; the quoted destination output is not proof of the amount refunded.

Illustration: Destination delivery and refund evidence (Relaybridge refunds)

View image file

Common questions about Relaybridge refunds

Will closing the swap page stop my Relay transaction?

No. Once a Relay transaction has been submitted, it continues after you leave the swap page.