Skip to main content
Every Composer deposit, into a vault, staking protocol or lending market, uses the same GET /quote request with toToken set to the protocol’s position token. This page shows the full flow once, then lists the parameters for each protocol. The same toToken addresses work with POST /advanced/routes and the LI.FI SDK. The routing engine may return a DEX route into the same token instead of Composer; either way, the user receives the requested token.

Deposit flow

This script deposits 1 USDC into the Spark-curated Morpho USDC vault on Base: quote, approve, send, and poll status when the route is cross-chain. To use another protocol, replace the quote parameters with a row from Protocol parameters and set chain to the viem chain of fromChain.
For cross-chain status values and PARTIAL handling, see Cross-chain deposits.

Protocol parameters

Replace fromChain, toChain, fromToken, toToken and fromAmount in the script with a row below. For every supported position token, see Supported Protocols & Chains. For the cross-chain rows, use slippage 0.01 and set chain to mainnet. The ETH row needs no approval. For both, the route bridges to Base, then deposits through Composer or buys the vault token on a DEX if that is cheaper; includedSteps shows which. GET /quote returns a one-transaction route in which the bridge runs the deposit on Base.

Maple (syrupUSDC)

syrupUSDC is a permissioned pool: Maple must authorize the depositing address. See Permissioned Products & Compliance for how Composer handles the authorization. This applies when the quote uses Composer; a DEX route into syrupUSDC needs no authorization.

Pendle yield tokens

Composer supports Pendle deposits and withdrawals. Pendle PT and YT tokens expire, so take a current market token from Supported Protocols & Chains (filter by pendle) and use it as toToken, with fromChain and toChain set to the market’s chain.

Depositing on behalf of another address

Set toAddress to the recipient. The sender pays from fromAddress; the position tokens go to toAddress.
For cross-chain deposits with a different toAddress, LI.FI by default only returns routes where the bridge runs the deposit as a destination call (one transaction). Two-transaction routes are not offered in this case.

Deposit-only protocols

Some protocols, for example Ethena (sUSDe), Kinetiq and Maple, support deposits but not withdrawals through Composer. In Supported Protocols & Chains, a protocol with enter-position edges but no exit-position edges is deposit-only.

Next steps

Withdrawals

Withdraw from protocol positions via Composer

Cross-chain deposits

Route shapes, status polling and partial failure handling