# LI.FI Composer templates

> Onchain flows built with LI.FI Composer. Each template shows what runs, in order; a live one carries the code to build it with `@lifi/composer-sdk` or `POST /compose`.

Status: `live` templates compile on Composer today and carry a working module; `coming` ones are in build; `vision` ones are concepts whose missing steps do not exist yet.

## Trade

- [Fund a perps account from any token](https://composer-experiences.li.quest/templates/perps-margin.md): Users pay with whatever token they hold. It lands as USDC margin in their Lighter account in one transaction. Status: coming.
- [LI.FI trading orders, powered by Composer](https://composer-experiences.li.quest/templates/trading-orders.md): Limit, Take Profit, Stop Loss and Stop Buy. Orders rest until the price is there, and funds stay in the user’s wallet until they fill. Status: coming.
- [Buy a basket of tokenized stocks](https://composer-experiences.li.quest/templates/stock-basket.md): One payment splits into a weighted basket of stock tokens. Sell it back the same way. Status: live.
- [Cross-chain limit orders](https://composer-experiences.li.quest/templates/cross-chain-limit.md): Place an order on one chain and fund it from another. It fills when the price is there. Status: vision.

## Earn

- [Deposit any token into a vault](https://composer-experiences.li.quest/templates/vault-deposit.md): Users deposit whatever they hold. It arrives as vault shares in one transaction. Status: live.
- [Deposit into a vault on another chain](https://composer-experiences.li.quest/templates/cross-chain-vault.md): Users deposit from the chain they are on into a vault on another chain, in one transaction. Status: live.
- [Withdraw to any chain](https://composer-experiences.li.quest/templates/withdraw-anywhere.md): Exit a position and receive USDC on the chain the user wants, in one transaction. Status: live.
- [Deposit from a Safe](https://composer-experiences.li.quest/templates/safe-deposit.md): Treasuries deposit from a multisig. Approve and deposit go out as one Safe transaction. Status: live.

## Payments and wallet tools

- [Sweep small balances into one token](https://composer-experiences.li.quest/templates/dust-sweep.md): All the leftovers in a wallet become one useful balance in a single transaction. Status: live.
- [Pay an invoice from any chain](https://composer-experiences.li.quest/templates/invoice-payment.md): Pay a Request Network invoice in the exact currency it asks for, from another token or another chain. Status: live.
- [Pay many wallets on different chains](https://composer-experiences.li.quest/templates/multi-wallet-payouts.md): Pay several wallets, each in its own token on its own chain, from one wallet in one transaction. Status: live.
- [Get paid by QR code](https://composer-experiences.li.quest/templates/qr-checkout.md): Show a QR code any wallet can pay. The money arrives as the token you want. Status: live.

## Leverage and credit

- [Loop a position for leverage](https://composer-experiences.li.quest/templates/leverage-loop.md): Buy a Pendle PT, post it on Morpho Blue, borrow and buy again up to a target leverage, simulated as one transaction. Status: live.
- [Borrow against tokenized stocks](https://composer-experiences.li.quest/templates/borrow-against-stocks.md): Use stock tokens as collateral on Aave V4 and borrow stablecoins in one step. Status: coming.
- [Leverage across chains](https://composer-experiences.li.quest/templates/cross-chain-leverage.md): Post collateral on one chain and open leverage on another in one flow. Status: vision.
