Skip to main content

What is intent-based execution in DeFi?

Intent-based execution means you state the desired outcome and an execution layer finds or composes the path. Enso turns that intent into signer-ready transaction data.

J
Written by Javier Diaz

Intent-based execution means your product states the desired outcome — for example, end in this token or position — and an execution layer finds or composes the path, instead of your app hard-coding every protocol call. Enso is built around that model: it turns product intent into signer-ready transaction data.

Definition

A traditional integration is imperative: the app chooses each contract, function, and intermediate token. An intent is a requested outcome. The execution layer is responsible for producing a transaction that realizes it, within the constraints you set, such as slippage.

How it works

  1. The app (or user) specifies what should be true after execution: source asset, amount, destination asset or position, and limits such as slippage.

  2. For a single destination, a router can select the path. For a custom sequence, the app lists the actions in order.

  3. The layer simulates the result and returns transaction data to sign.

  4. The user or the product’s signer submits that transaction. Cross-chain outcomes are completed in a later destination stage.

How Enso does this

Enso’s Route API takes the outcome (the tokenIn to tokenOut path, including an optional destinationChainId) and returns one transaction. The Bundle API is for when your product must declare the exact action list. In both cases, submit the returned tx as-is. See Get Started.

FAQ

Is a bundle still intent-based?

A bundle is more prescriptive: you choose the actions, and Enso still constructs and simulates the transaction. Use Route when you want Enso to choose the path.

Does the user still sign the transaction?

Yes. Enso does not take custody. The user, or your existing signer stack, signs and submits the returned transaction.

Related articles

  • What is Enso?

  • What is a DeFi routing and execution layer?

  • How do I add cross-chain swaps to my app?

  • How do I bundle multiple DeFi actions into one transaction?

  • How do I add a one-click zap into a vault?

Sources

Did this answer your question?