Skip to main content

How do I set refundReceiver on a cross-chain route?

Set refundReceiver to the address that should receive a refund when a refund path applies. On Solana destinations it is a required source-chain EVM address. Confirm destinations in quote metadata.

J
Written by Javier Diaz

Set refundReceiver to the address that should receive a refund when a refund path applies. On Solana destinations it is a required, nonzero source-chain EVM address. Confirm the expected refund destinations in the quote’s metadata.bridgeRefundAssets.

Definition

refundReceiver is not the same as receiver. receiver gets a successful tokenOut delivery. refundReceiver gets recoverable funds when the route does not complete as quoted.

How it works

  • On a Route request, include refundReceiver when you want an explicit refund address rather than a default.

  • On an intent route, a destination refund goes to refundReceiver, or to receiver if you omit it.

  • On Solana destination routes, set a case-sensitive Solana receiver and a separate EVM refundReceiver on the source chain. Do not reuse the Solana address as refundReceiver.

  • In a Bundle, refundReceiver is not a generic bridge action argument. Route-level refund fields depend on the selected endpoint and provider.

  • After submission, confirm an actual refund from status fields such as refundDetails, not only from the quote metadata.

How Enso does this

See Crosschain Routing and Solana routing. Always read the current quote rather than assuming refunds always return to the source chain.

FAQ

Can I change refundReceiver after I get the quote?

Request a new quote with the address you need. Do not edit the returned tx.

What if I omit it on a non-Solana intent route?

The intent-route docs send the destination refund to receiver when refundReceiver is not set.

Related articles

  • What is the difference between receiver and refundReceiver?

  • What is bridgeRefundAssets?

  • Why was my bridged token refunded on the destination chain?

  • Can I route assets to Solana with Enso?

  • How do I send a cross-chain output to a different receiver?

Sources

Did this answer your question?