# DeFi protocols

> A strategy uses 30+ protocols directly, reading their rates and moving money in and out on its paper book, with a live project's wallets following that book on chain. What there is, how it works, and what it costs.

## Two ways to use a protocol

- **Name it.** Import a protocol and use its real actions: supply, borrow and repay on Aave; deposit in a Morpho vault; buy a Pendle PT; sell a Derive option. Use this when you have a reason to be on that protocol: a rate you expect to move, or a carry between two.
- **Route by asset.** Say `earn` and an asset, and ftw.trade puts the money where it earns most across every protocol that takes it, moving only when the gain beats the cost. See [Lending, vaults and earn](https://docs.ftw.trade/protocols/lending-and-vaults).

## What there is

| Kind | Protocols |
|---|---|
| Lending markets | Aave, Spark, Compound, Kamino, marginfi |
| Vaults | Morpho, Euler, Yearn, Fluid, Gearbox, Spark Savings, Sky, Ethena, Maple, Kamino Earn, Jupiter Lend, Jito |
| Fixed rates | Pendle |
| Options | Derive |
| Swap venues | Uniswap, KyberSwap, CoW Swap, Aerodrome, Jupiter, Metric |
| Launchpads | pump.fun, PumpSwap, Raydium LaunchLab, Virtuals, Zora, Clanker, Flap, Pons |
| Bridges | Relay, Circle CCTP |
| Privacy | Husher |

**Developers → Modules** has each one with its markets, how far back its history goes, the series to backtest it on, and a working example. Protocol vaults (Ethena sUSDe, Sky sUSDS, Morpho, Aave, Kamino, Maple and others) are also listed beside strategy vaults with their APR now and over 7 and 30 days.

## How it works

1. A strategy imports the protocol in its `uses` line and reads its rates: `aave.supplyApy("base:usdc", interval)`.
2. It moves money in and out of its **paper book** for that protocol, which tracks interest, borrows and health factor.
3. On a **live** project, each wallet is made to hold on the protocol's live markets what the book holds.

## On real money

Every protocol follows the book the same way:

- **It pays from Robinhood Chain's ETH.** The wallet's ETH is bridged through Relay into USDC on the market's chain, a little over what the book needs.
- **It brings its own gas** to the market's chain, and keeps rent on Solana.
- **It skips moves under $5**, which a bridge fee or gas would eat.
- **It waits for bridges** to land, and stops with the reason if one hasn't in two hours.
- **It comes home on close out**: withdraws, bridges back to ETH on Robinhood Chain and stops. Stopping alone leaves the money where it is.

> [!TIP] Count the round trip
> Into a market and back out is two bridge fees plus gas. On $20 earning 5% a year that's more than a year's interest. A protocol strategy pays at a few hundred dollars and up, held for months, on Base or Arbitrum rather than Ethereum under a few thousand. Backtest with `moveCost` (about 1 on Base or Arbitrum, 5 on Ethereum) so the paper book pays it too.

## Limits

One lending market, one vault, one fixed-rate market and one options underlying per strategy, and `earn` can't be combined with a named protocol's book. A few protocols stay on paper books for now; the Modules page marks them.
