Skip to main content
LI.FI Composer bundles protocol interactions (deposits, staking, lending) into a single flow across any EVM chain. Instead of navigating multiple protocols and signing multiple transactions, your users complete DeFi workflows in one click.
No custom integration required. If you already use the LI.FI API, SDK, or Widget, you already have Composer. Set toToken to a supported protocol’s token address and Composer activates automatically.

Who Is Composer For?

Offer users sophisticated onchain actions directly in your app. Composer reduces user friction while expanding the breadth of DeFi operations your platform supports. Create campaigns for user engagement, such as “deposit into new protocol” promotions.
Enable 1-click deposits into your protocol. Users can deposit from any integrated wallet or dApp without leaving their current app, including from any other EVM chain.
Get your protocol integrated as a Composer target to expand user accessibility and adoption. Partner protocols can be invited to the Composer backend codebase. See For Protocol Teams.

Why Use Composer?

For your business

  • Reduce integration costs. Support deposits into 20+ DeFi protocols through a single API integration instead of building custom integrations for each protocol individually.
  • Expand your product offering. Add an earn, yield, or staking section to your wallet or dApp. Composer gives your users access to lending, liquid staking, and vault strategies without building protocol-specific logic.
  • Increase user engagement. One-click deposits reduce friction and drop-off. Users who would otherwise leave your app to access another protocol can now complete the full flow in your product.
  • Simple integration. If you already use the LI.FI API, SDK, or Widget, Composer is already available. Set toToken to a supported protocol’s token address and it activates automatically.

Technical advantages

  • Single transaction execution. Multiple actions completed in one transaction. Users sign once, pay gas once.
  • Lower gas costs. Batching actions eliminates per-step transaction fees.
  • Simulated before execution. The entire execution path is simulated before submitting onchain, preventing failed transactions and giving users certainty about outcomes.
  • Atomic execution. Compositions execute atomically. All steps succeed or none do.
  • Works everywhere. Available through the API, SDK, and Widget with zero additional integration.

How It Works

Composer uses two core components:
  1. Onchain VM (Execution Engine). A smart contract that can call any other onchain protocol or series of them, handling all execution without requiring users to understand blockchain interactions.
  2. eDSL and Compiler. A purpose-built domain-specific language to express contract interactions in TypeScript. This gets compiled to bytecode for the VM to execute onchain.
When you request a quote with a vault token as the toToken, LI.FI’s routing engine automatically identifies the optimal path (swap, bridge, or both), compiles the Composer instructions, simulates the full execution path, and returns a ready-to-sign transaction. No dedicated endpoint or extra parameters are needed — the standard GET /quote and POST /advanced/routes endpoints work as-is. This applies equally to same-chain and cross-chain flows: to deposit across chains, just set fromChain and toChain to different values.

Deep dive into Composer architecture

Learn about the Onchain VM, eDSL compiler, dynamic calldata injection, and the full transaction lifecycle.

Supported Protocols & Chains

Composer supports 20+ protocols across 20+ EVM chains. The team is open to integration requests based on technical feasibility and community feedback.

Supported protocols and chains

Live reference: protocols, supported actions, and supported chains. Always up to date.

Try It Out

Deposit 1 USDC into a Morpho vault on Base with a single API call:
curl -X GET 'https://li.quest/v1/quote?fromChain=8453&toChain=8453&fromToken=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&toToken=0x7BfA7C4f149E7415b73bdeDfe609237e29CBF34A&fromAddress=YOUR_WALLET_ADDRESS&toAddress=YOUR_WALLET_ADDRESS&fromAmount=1000000'

Run your first Composer transaction

Follow the step-by-step quickstart to execute your first Composer transaction in under 5 minutes.

Choose Your Integration Path

API

Direct REST API integration for full control over the Composer flow.

SDK

Use the LI.FI TypeScript SDK for managed execution, status tracking, and error handling.

Widget

Drop-in UI component. Composer works automatically with zero additional code.

Current Limitations

  • EVM chains only. Cross-chain deposits are supported across EVM chains. Solana and other non-EVM chains are not yet supported.
  • Tokenised positions only. Composer targets must return a token (e.g., vault tokens, LP tokens, LSTs).

Security

All LI.FI smart contracts, including the Composer onchain VM, undergo independent security audits before production deployment. LI.FI maintains a $1,000,000 USD bug bounty program and real-time contract monitoring.

Security and Audits

Audit reports, bug bounty program, and monitoring details.

Next Steps

Quickstart

Execute your first Composer transaction in under 5 minutes

API Integration

Step-by-step REST API integration walkthrough

How It Works

Onchain VM, eDSL compiler, and transaction lifecycle

Recipes

Copy-paste recipes for vault, staking, and lending deposits

Cross-Chain Compose

Bridge + deposit patterns across EVM chains

Withdrawals

Withdraw from protocol positions via Composer