Skip to main content

How do I let users deposit into yield from another chain?

Request a cross-chain Route from the token the user holds into the yield position on the destination chain, then track delivery separately. Enso’s Route API does this with destinationChainId.

J
Written by Javier Diaz

To let a user deposit into yield from another chain, request a cross-chain Route from the token they hold into the destination yield position, then track delivery as a separate stage. Enso’s Route API does this when you set destinationChainId. Your product still chooses which destinations to show.

Definition

This is a zap into a yield position that also crosses a chain. The user should not have to bridge first and then deposit in a second manual step. The outcome is the position on the destination chain, not only the bridged asset.

How it works

  1. Build a catalog of yield destinations from token and protocol data, filtered to what you are willing to offer.

  2. Request a route from the user’s source token and chain into the destination position on the destination chain, with slippage protection.

  3. Show the quote, collect any required approval, and submit the source-chain transaction as-is.

  4. Track destination delivery with a status API. Do not treat a source receipt as a completed deposit.

  5. Refresh balances and destination metadata after delivery (or after a documented failure or refund).

Use a bundle if you need a specific bridge or a custom post-bridge action sequence.

How Enso does this

Create a key in the Developer Portal. Populate the catalog with GET https://api.enso.build/api/v1/tokens, then call POST https://api.enso.build/api/v1/shortcuts/route with tokenIn, tokenOut (the position token), amountIn, slippage, and destinationChainId. Track completion with bridge status. See Enso Earn and Crosschain Routing.

FAQ

Is this the same as a same-chain yield deposit?

The destination is the same kind of position token. The difference is the extra destination-chain stage you must track.

Does Enso choose which vaults appear in my app?

No. Enso provides destination data and execution. Your product owns the catalog, policy, and UX.

Related articles

  • How do I let users deposit into yield from any token?

  • How do I track a cross-chain transaction after the user signs?

  • What is a zap in DeFi?

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

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

Sources

Did this answer your question?