Skip to main content

What is an intent route in Enso?

An intent route is a cross-chain Route flow that bridges an ERC-20 to a one-time intent address so an Enso keeper can run the destination swap or deposit and send tokenOut to the receiver.

J
Written by Javier Diaz

An intent route is a cross-chain Route flow that bridges an ERC-20 to a one-time intent address on the destination chain, publishes the encrypted intent, and lets an Enso keeper run the destination swap or deposit and send tokenOut to receiver.

Definition

When a Route needs execution after the bridge — not only a delivery of tokenOut — Enso can use an intent route instead of a bridge callback you specified. Native tokens are never the bridge token on an intent route.

How it works

  • Intents are used when useIntentAddress is omitted and the keeper supports both chains. A candidate that already delivers tokenOut directly stays a plain bridge transfer.

  • The Route response includes an intent object with address and data. Destination steps appear as a single enso route hop. metadata.bridgeFees includes an intentExecution keeper fee, and amountOut is net of that fee.

  • The keeper enforces minAmountOut on the destination chain.

  • If the bridge delivers less than the intent’s trigger amount, or the keeper cannot deliver at least minAmountOut before the deadline, the bridged token is refunded on the destination chain to refundReceiver, or to receiver when refundReceiver is not set.

  • Track the route with GET /api/v1/bridge/route. That endpoint reports delivered only after the keeper executes.

How Enso does this

See Crosschain Routing and Bridge Transaction Status. Set useIntentAddress to false when you need a callback route instead. Setting it to true with options an intent cannot encode returns HTTP 400.

FAQ

Does the user sign on the destination chain?

No. The user signs the source-chain transaction. The keeper runs the destination route.

Is every cross-chain Route an intent route?

No. Same-chain routes ignore useIntentAddress, and a candidate that delivers tokenOut directly can stay a plain bridge transfer. Some request options force a callback route.

Related articles

  • What is useIntentAddress?

  • Intent route vs bridge callback: which should I use?

  • Why is bridge status still inflight after the tokens arrived at the intent address?

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

  • What is a bridge callback?

Sources

Did this answer your question?