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

# Rampart

> Multi-chain Protocol Aggregator. One SDK. For developers and AI agents.

<div style={{textAlign: 'center', padding: '48px 0 32px'}}>
  <img src="https://mintcdn.com/rampartlabs/M-P9_eg_iL3ndRsE/logo/rampart-dark.svg?fit=max&auto=format&n=M-P9_eg_iL3ndRsE&q=85&s=b9e467613200dbf3a878ef52fa9db16c" alt="Rampart" className="block dark:hidden" style={{margin: '0 auto 24px', height: '48px'}} width="36" height="36" data-path="logo/rampart-dark.svg" />

  <img src="https://mintcdn.com/rampartlabs/M-P9_eg_iL3ndRsE/logo/rampart-light.svg?fit=max&auto=format&n=M-P9_eg_iL3ndRsE&q=85&s=9770fb0553016f488aae142367c1bfa1" alt="Rampart" className="hidden dark:block" style={{margin: '0 auto 24px', height: '48px'}} width="36" height="36" data-path="logo/rampart-light.svg" />

  <h1 style={{fontSize: '3rem', fontWeight: 800, margin: '0 0 16px', lineHeight: 1.1}}>
    Multi-chain Protocol Aggregator
  </h1>

  <p style={{fontSize: '1.25rem', color: '#6b7280', maxWidth: '600px', margin: '0 auto 32px'}}>
    One SDK. 55+ protocols. \$800M+ TVL. For developers and AI agents.
  </p>

  ```bash theme={null}
  npm install rampart-monad
  ```
</div>

## Protocol Coverage

<CardGroup cols={3}>
  <Card title="14 DEXes" icon="arrow-right-arrow-left" color="#836ef9">
    Kuru · Uniswap V3/V4 · PancakeSwap · Clober · iZiSwap · Capricorn · KyberSwap · Swaap · WooFi · LFJ · OpenOcean · Bean
  </Card>

  <Card title="14 Lending" icon="piggy-bank" color="#836ef9">
    Neverland · Euler V2 · Morpho · Curvance · Sherpa · Accountable · Folks · Sumer · TownSquare · Timeswap · Nabla · Covenant · Multipli · LeverUp
  </Card>

  <Card title="5 LSTs" icon="coins" color="#836ef9">
    aprMON · sMON · gMON · shMON · vshMON (Mellow) - compare APR and TVL in a single call
  </Card>

  <Card title="3 Perps" icon="chart-line" color="#836ef9">
    Monday Markets + Narwhal · Pingu Exchange · Purps - unified interface across all perpetual DEXes
  </Card>

  <Card title="6 Yield" icon="seedling" color="#836ef9">
    Enjoyoors · Gearbox V3 · Sablier · Balancer V3 · Curve Finance · nad.fun
  </Card>

  <Card title="Aggregators" icon="bolt" color="#836ef9">
    Best-route router across 6 DEXes · Full ecosystem TVL · Arbitrage scanner · Oracle cross-check
  </Card>
</CardGroup>

## Key Stats

<CardGroup cols={4}>
  <Card title="55+ protocols" icon={<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round"><circle cx="12" cy="5" r="3"/><circle cx="5" cy="19" r="3"/><circle cx="19" cy="19" r="3"/><path d="M12 8v4M8.5 17.5l3-2M15.5 17.5l-3-2"/></svg>}>
    Full Monad ecosystem covered
  </Card>

  <Card title="$800M+ TVL" icon={<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round"><path d="M12 2v20M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"/></svg>}>
    Aggregate TVL tracked across all protocols
  </Card>

  <Card title="41 AI tools" icon={<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round"><path d="M12 2a4 4 0 0 1 4 4v2h1a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h1V6a4 4 0 0 1 4-4z"/><circle cx="9" cy="14" r="1" fill="currentColor" stroke="none"/><circle cx="15" cy="14" r="1" fill="currentColor" stroke="none"/><path d="M9 18h6"/></svg>}>
    Vercel AI SDK tools for autonomous agents
  </Card>

  <Card title="400ms blocks" icon={<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2" fill="currentColor" stroke="none" opacity="0.15"/><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/></svg>}>
    Native Monad speed, no extra config needed
  </Card>
</CardGroup>

## Three Layers

<Steps>
  <Step title="Protocol Functions - Layer 1">
    Direct, typed functions for every protocol. Import only what you need. Works in any Node.js or browser environment.

    ```typescript theme={null}
    import { getEulerVaults, getBestLST, getBestSwapRoute } from 'rampart-monad'

    const vaults = await getEulerVaults()         // 108 Euler V2 vaults with live APR
    const lst    = await getBestLST()             // highest APR liquid staking token
    const route  = await getBestSwapRoute(        // best route across 6 DEXes
      MON, USDC, '1000000000000000000'
    )
    ```
  </Step>

  <Step title="Rampart Class - Layer 2">
    Object-oriented interface that bundles all functions behind a single instantiated client.

    ```typescript theme={null}
    import { Rampart } from 'rampart-monad'

    const sdk = new Rampart()
    const tvl = await sdk.getMonadDeFiTVL()
    const top = await sdk.getBestYields(5)
    ```
  </Step>

  <Step title="RampartAgent - Layer 3">
    41 structured tools wired directly into the Vercel AI SDK. Plug into any LLM for autonomous protocol analysis.

    ```typescript theme={null}
    import { RampartAgent } from 'rampart-monad'
    import { generateText } from 'ai'
    import { anthropic } from '@ai-sdk/anthropic'

    const agent = new RampartAgent()

    const { text } = await generateText({
      model: anthropic('claude-3-5-sonnet-20241022'),
      tools: agent.tools,
      prompt: 'What is the best yield for 10,000 USDC on Monad right now?',
      maxSteps: 5,
    })
    ```
  </Step>
</Steps>

## Why Monad?

<CardGroup cols={2}>
  <Card title="10,000 TPS" icon="gauge-high">
    Enterprise-grade throughput with full EVM compatibility - every Solidity contract just works.
  </Card>

  <Card title="~400ms block time" icon="clock">
    10× faster than Ethereum. Rampart is built for Monad's speed with pre-configured `publicClient`.
  </Card>

  <Card title="Chain ID 143" icon="link">
    Connect instantly via `https://rpc.monad.xyz`. No chain configuration needed - Rampart handles it.
  </Card>

  <Card title="Native token" icon="coins">
    MON is the native gas token. Rampart tracks MON price via Kuru DEX cross-check (\$0.354).
  </Card>
</CardGroup>

## Quick Start

<CardGroup cols={2}>
  <Card title="Installation & first call" icon="rocket" href="quickstart">
    Get from zero to your first live on-chain data in under 2 minutes
  </Card>

  <Card title="DEX Protocols" icon="arrow-right-arrow-left" href="sdk/dex/overview">
    Swap quotes and pool data from 14 DEXes
  </Card>

  <Card title="Lending Markets" icon="piggy-bank" href="sdk/lending/overview">
    Supply/borrow rates and TVL from 14 lending protocols
  </Card>

  <Card title="LST Aggregator" icon="coins" href="sdk/lst/staking">
    Compare all 5 MON liquid staking tokens in one call
  </Card>

  <Card title="Multi-DEX Router" icon="route" href="sdk/aggregators/router">
    Best-route quotes across all 6 DEXes simultaneously
  </Card>

  <Card title="AI Agent (41 tools)" icon="robot" href="sdk/ai-agent/rampart-agent">
    Build LLM-driven autonomous agents on Monad
  </Card>
</CardGroup>

<Note>
  **Data freshness:** Rampart reads live on-chain data on every function call - only the documentation text is static.
</Note>
