> ## Documentation Index
> Fetch the complete documentation index at: https://docs.biconomy.io/llms.txt
> Use this file to discover all available pages before exploring further.

# DeFi Zaps

> Single-click supply and withdraw into any vault, lending market, or staking program

Turn complex DeFi interactions into one-click experiences. Users supply or withdraw from any protocol on any chain—no matter what token they hold or which chain they're on.

<CardGroup cols={3}>
  <Card title="200+ Protocols" icon="handshake">
    Direct integrations with major lending, staking, and yield protocols
  </Card>

  <Card title="Any Token In" icon="coins">
    Users deposit with whatever they have—Biconomy handles conversion
  </Card>

  <Card title="Cross-Chain" icon="globe">
    Deposit from any chain into protocols on any other chain
  </Card>
</CardGroup>

## What You Can Build

### One-Click Yield Deposits

User has USDC on Base, wants to deposit into a vault on Ethereum. One signature:

```typescript theme={null}
const quote = await fetch('https://api.biconomy.io/v1/quote', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    mode: 'eoa',
    ownerAddress: userAddress,
    composeFlows: [{
      type: '/instructions/intent-vault',
      data: {
        srcChainId: 8453,           // Base
        srcToken: USDC_BASE,
        dstChainId: 1,              // Ethereum
        dstVault: AAVE_VAULT_ETH,   // Destination vault address
        amount: '10000000000',      // 10,000 USDC
        slippage: 0.01
      }
    }]
  })
});
```

### Protocol Aggregator

Build interfaces that let users access the best yields across DeFi:

<CardGroup cols={2}>
  <Card title="Lending Markets" icon="building-columns">
    AAVE, Compound, Morpho, Venus, Spark
  </Card>

  <Card title="Yield Vaults" icon="vault">
    Yearn, Beefy, Convex, Pendle
  </Card>

  <Card title="Liquid Staking" icon="water">
    Lido, Rocket Pool, Frax, Coinbase
  </Card>

  <Card title="LP Positions" icon="droplet">
    Uniswap, Curve, Balancer, Aerodrome
  </Card>
</CardGroup>

### Position Migration

Move user positions between protocols or chains without manual unwinding:

```typescript theme={null}
// Migrate from one vault to another
const quote = await fetch('https://api.biconomy.io/v1/quote', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    mode: 'eoa',
    ownerAddress: userAddress,
    composeFlows: [{
      type: '/instructions/intent-vault',
      data: {
        srcChainId: 137,
        srcVault: AAVE_VAULT_POLYGON,  // Source vault to withdraw from
        dstChainId: 8453,
        dstVault: MORPHO_VAULT_BASE,   // Destination vault to deposit into
        amount: '1000000000',
        slippage: 0.01
      }
    }]
  })
});
```

## Key Features

<Tabs>
  <Tab title="Lossless Vault Operations">
    When source or destination tokens are vault tokens, the API performs direct deposit/withdraw operations instead of swapping—guaranteeing lossless execution with better quotes than swap-based approaches.
  </Tab>

  <Tab title="Cross-Chain Support">
    Seamlessly move between vaults across different chains. Deposit from any chain into protocols on any other chain with automatic bridging.
  </Tab>

  <Tab title="Wide Protocol Coverage">
    Access vaults that may not have liquidity on DEXs. Direct vault integration enables routes for a much wider range of vault tokens.
  </Tab>
</Tabs>

## Supported Protocols

| Category | Protocols                                      |
| -------- | ---------------------------------------------- |
| Lending  | AAVE, Compound, Morpho, Venus, Spark, Radiant  |
| Vaults   | Yearn, Beefy, Convex, Sommelier, Enzyme        |
| Staking  | Lido, Rocket Pool, Frax, Stakewise             |
| DEX LP   | Uniswap, Curve, Balancer, Velodrome, Aerodrome |
| Perps    | GMX, dYdX, Synthetix, Kwenta                   |

<Info>
  Don't see your protocol? The `build` instruction type lets you call any smart contract function directly.
</Info>

## Start Building

<CardGroup cols={2}>
  <Card title="Token to Vault" icon="arrow-right-to-bracket" href="/zaps/token-to-vault">
    Deposit any token into vaults with a single signature
  </Card>

  <Card title="Vault to Token" icon="arrow-right-from-bracket" href="/zaps/vault-to-token">
    Withdraw from vaults and receive any token on any chain
  </Card>
</CardGroup>

## Integration Options

<CardGroup cols={2}>
  <Card title="Supertransaction API" icon="globe" href="/supertransaction-api">
    REST API for quick integration. Best for backends and non-TypeScript environments.
  </Card>

  <Card title="AbstractJS SDK" icon="code" href="/new/getting-started/getting-started">
    TypeScript SDK with full type safety. Best for frontend apps and custom logic.
  </Card>
</CardGroup>

<Tip>
  Most DeFi applications start with the Supertransaction API for rapid development, then add AbstractJS for advanced features like composing multiple vault operations.
</Tip>
