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

# Streams

> Create on-chain incentive campaigns that distribute token rewards and points to liquidity providers.

Streams is Turtle's on-chain liquidity incentive distribution system. It lets protocols create self-serve reward campaigns that distribute tokens or points to LPs proportional to their TVL contribution over time.

## How Streams Work

Turtle uses a **Merkle-tree commit/claim pattern** — rewards are computed off-chain for flexibility, then committed on-chain for auditability. LPs claim rewards by submitting a Merkle proof.

<Steps>
  <Step title="Create a Stream">
    Configure your incentive campaign in the [Client Portal](https://dashboard.turtle.xyz) — select the reward token, target vault, distribution rate, and duration. Turtle's backend issues a signature and you submit the `createStream()` transaction on-chain.
  </Step>

  <Step title="Indexer Tracks Balances">
    Turtle's indexer begins monitoring the target token's on-chain balances, building a time-series of each LP's holdings.
  </Step>

  <Step title="Rewards Computed Off-Chain">
    Approximately twice per day, the reward updater computes per-user accrued rewards based on their TVL contribution and the stream's rate formula. Results are persisted as snapshots.
  </Step>

  <Step title="Merkle Root Committed On-Chain">
    A Merkle tree is built from the latest snapshot and the root hash is pushed on-chain, making the reward distribution verifiable and auditable.
  </Step>

  <Step title="LPs Claim Rewards">
    LPs call `claim()` on the Stream contract with their Merkle proof to collect accrued rewards at any time.
  </Step>
</Steps>

## Stream Types

Three reward models are available. All share the same on-chain contract and Merkle infrastructure — they differ in how rewards accrue.

| Type              | How It Works                                                                                                             | Parameter      |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------ | -------------- |
| **Fixed Rate**    | A fixed number of tokens per \$1,000 USD of TVL per day. Rewards scale linearly with TVL.                                | `tokensPerUSD` |
| **Fixed APR**     | An annualized percentage rate (e.g. 10% APR). Converted to a per-day token figure at each snapshot using current prices. | `apr`          |
| **Variable Rate** | A flat tokens-per-day budget distributed across all LPs regardless of total TVL. Higher TVL dilutes individual rewards.  | `tokensPerDay` |

## Boost Plugins

Plugins let you modify reward allocations based on off-chain attributes of each LP. They sit between the base reward computation and the final Merkle tree, applying multipliers or filters per user.

| Plugin          | Effect                                                                                          |
| --------------- | ----------------------------------------------------------------------------------------------- |
| **Turtle User** | Boost rewards for wallets registered as Turtle members                                          |
| **X (Twitter)** | Boost for verified X account linkage                                                            |
| **Telegram**    | Boost for verified Telegram account                                                             |
| **Whitelist**   | Restrict eligibility to a defined set of wallets                                                |
| **Blacklist**   | Exclude specific wallets from receiving rewards                                                 |
| **Forwarder**   | Forward rewards earned by a vault address to the vault's underlying LPs (e.g. Euler Earn Vault) |

<Info>
  Additional plugins — including Kaito Yapper and Staking boosts — are planned.
</Info>

## Supported Chains

Streams are live on the following networks:

| Chain     | Status  |
| --------- | ------- |
| Ethereum  | Live    |
| BSC       | Live    |
| Avalanche | Live    |
| Base      | Live    |
| Sepolia   | Testnet |

New chains are added by deploying a `StreamFactory` contract and configuring an indexer webhook.

## Smart Contract Architecture

Streams use a minimal on-chain design — contracts handle fund custody and claim validation while all reward logic runs off-chain for maximum flexibility.

| Contract          | Purpose                                                                                                                     |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------- |
| **StreamFactory** | Deploys new Stream proxy contracts. Controlled by AccessManager.                                                            |
| **Stream**        | One per campaign. Holds reward funds. Exposes `setMerkleRoot()` (restricted) and `claim()` / `claimFor()` (permissionless). |
| **AccessManager** | Central role-based access control. Owned by Turtle multisig. All restricted operations route through it.                    |

<Note>
  Smart contracts have been audited (January 2026). All admin operations are gated by role-based access control via the AccessManager contract.
</Note>

## Token vs Point Streams

Streams support two reward modes:

* **Token-based** — Reward tokens are transferred on-chain when the stream is created. LPs claim real tokens via Merkle proofs. Requires a `createStream()` transaction.
* **Point-based** — No on-chain token at creation. Points are tracked off-chain and can be converted to tokens at a future TGE event. Created instantly via the API.

## Getting Started

<CardGroup cols={2}>
  <Card title="Create a Stream" icon="play" href="https://dashboard.turtle.xyz">
    Log in to the Client Portal to configure and launch your first incentive campaign.
  </Card>

  <Card title="Streams API" icon="code" href="/sdk/streams/overview">
    Use the Streams API to create and manage streams programmatically.
  </Card>
</CardGroup>

## Related

* [Streams API Documentation](/sdk/streams/overview) — Full API reference for creating and querying streams
* [Turtle Campaigns](/liquidity-products/turtle-campaigns) — Large-scale liquidity campaigns powered by Streams
* [Client Portal](/partner-products/overview-partners) — Where partners manage all Turtle integrations
