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

# The Bayex Protocol

> Bayex is the first decentralized protocol enabling yield-bearing liquidity for Polymarket.

By combining Polymarket's **Conditional Tokens** with **Uniswap V4's** concentrated liquidity, we unlock a new era of capital efficiency for outcome trading.

<CardGroup cols={2}>
  <Card title="Start Trading" icon="rocket" href="https://www.bayex.xyz/swap">
    Start trading on Bayex today.
  </Card>

  <Card title="Provide Liquidity" icon="coins" href="https://www.bayex.xyz/earn">
    Provide liquidity and earn fees.
  </Card>
</CardGroup>

## Core Mechanics

<CardGroup cols={2}>
  <Card title="Conditional Token Wrapping" icon="layer-group">
    Polymarket uses the **ERC-1155** standard for outcome shares, which are incompatible with most DeFi AMMs.

    Bayex introduces a trustless **Wrapper Contract** that locks these ERC-1155 tokens and mints standard **ERC-20** tokens 1:1.
  </Card>

  <Card title="Uniswap V4 Integration" icon="bolt">
    We leverage **Uniswap V4** to create concentrated liquidity pools for these wrapped outcome tokens.

    This allows LPs to provide liquidity in specific price ranges (probabilities), dramatically increasing capital efficiency compared to traditional AMMs.
  </Card>
</CardGroup>

## Yield Generation

<CardGroup cols={3}>
  <Card title="Trading Fees" icon="chart-simple">
    LPs earn swap fees every time a user trades against their position. With V4, fees are auto-compounded.
  </Card>

  <Card title="Underlying Yield" icon="coins">
    **(Coming Soon)** Collateral parked in Bayex contracts can be deployed to lending protocols like Aave.
  </Card>

  <Card title="No Impermanent Loss*" icon="shield-check">
    \*If you hold to expiry, the winning outcome redeems 1:1 for collateral, mitigating divergence loss.
  </Card>
</CardGroup>

## Architecture

<Steps>
  <Step title="Polymarket (Source)">
    Polymarket serves as the source of truth for markets and settlement resolution.
  </Step>

  <Step title="Bayex Wrapper (Wrap/Unwrap)">
    Users utilize the **Bayex Wrapper** to convert their Polymarket ERC-1155 tokens into Bayex ERC-20s.
  </Step>

  <Step title="Uniswap V4 (Swap/LP)">
    These ERC-20s are then used in **Uniswap V4** pools for swapping and liquidity provision, managed by Bayex Hooks.
  </Step>
</Steps>

<Card title="Ready to optimize your yield?" icon="arrow-right" href="https://www.bayex.xyz/earn">
  Join the first wave of liquidity providers on Bayex and start earning fees on the world's biggest Polymarket events.
</Card>
