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

# How Robin Tracks and Distributes Yield to Stakers

> Robin uses share-based vault accounting and a TWAP oracle to distribute yield fairly across stakers by market, pool side, and deposit amount.

Robin distributes yield using a share-based accounting system — similar in design to ERC-4626 vaults — combined with a TWAP oracle that prices each outcome token at deposit time. This combination ensures every staker receives a yield allocation that is strictly proportional to the economic value they contributed, regardless of whether they staked YES or NO tokens or when they entered the vault.

## How Yield Is Distributed

Yield does not flow from a single pool to all stakers uniformly. Robin distributes it across three nested levels to ensure precision and fairness:

* **Per market, by shares** — Each market's contribution to the total deployed USDC determines how much yield that market's stakers receive in aggregate. A market with more paired USDC deployed earns more of the total vault yield, proportionally.
* **Per market side (YES/NO), by TWAP price** — Within a market, yield is split between YES and NO stakers according to the **time-weighted average price (TWAP)** provided by the Robin TWAP Oracle at the time of deposit. This ensures the side that contributed more economic value — as reflected by market pricing — receives more yield.
* **Per user, via yield indices** — Within each market side, Robin tracks each individual staker's share using internal yield indices. These indices update continuously as capital is deployed and withdrawn, ensuring every user's entitlement is calculated precisely.

## Continuous Accrual

Yield begins accruing the moment your tokens are part of the earning Robin vault. Robin does not batch yield into periodic distributions. The accounting indexes update continuously as the underlying strategies generate returns.

This continuous model means:

* Each user always receives their mathematically fair share of yield based on time in the vault.
* Deposits and withdrawals are accounted for precisely at the current share price, so late depositors cannot dilute early stakers and early withdrawals do not disadvantage remaining stakers.
* You never need to manually claim yield. It is automatically reflected in the value of your shares and returned to you when you withdraw.

## Example

The following example traces two stakers through the full yield cycle to show how shares, TWAP pricing, and yield distribution interact.

<Steps>
  <Step title="Alice Deposits YES Tokens">
    Alice deposits **1,000 YES tokens** into the vault.

    The Robin TWAP Oracle prices YES at **\$0.60**.

    | Item             | Value     |
    | ---------------- | --------- |
    | Tokens deposited | 1,000 YES |
    | TWAP price       | \$0.60    |
    | Economic value   | \$600     |
    | Shares received  | 600       |
    | Vault assets     | \$600     |
    | Total shares     | 600       |
  </Step>

  <Step title="Bob Deposits NO Tokens">
    Bob deposits **1,000 NO tokens** into the same vault.

    The Robin TWAP Oracle prices NO at **\$0.40**.

    | Item             | Value    |
    | ---------------- | -------- |
    | Tokens deposited | 1,000 NO |
    | TWAP price       | \$0.40   |
    | Economic value   | \$400    |
    | Shares received  | 400      |
    | Vault assets     | \$1,000  |
    | Total shares     | 1,000    |

    Alice now owns **60%** of the vault; Bob owns **40%** — exactly matching the economic value each contributed.
  </Step>

  <Step title="Vault Pairs and Deploys Capital">
    Robin matches Alice's 1,000 YES tokens against Bob's 1,000 NO tokens and merges them via the Polymarket CTF contract into **\$1,000 USDC**. That USDC is deployed immediately into the active yield strategy.

    The vault is now fully matched and fully deployed.
  </Step>

  <Step title="Yield Is Generated">
    The yield strategy earns **\$100 in yield**.

    | Item                 | Value             |
    | -------------------- | ----------------- |
    | Original vault value | \$1,000           |
    | Yield earned         | \$100             |
    | New vault value      | \$1,100           |
    | Total shares         | 1,000 (unchanged) |
    | Value per share      | **\$1.10**        |
  </Step>

  <Step title="Both Stakers Withdraw">
    Each staker redeems their shares at the new share price of \$1.10.

    | Staker | Shares | Share Price | Withdrawal |
    | ------ | ------ | ----------- | ---------- |
    | Alice  | 600    | \$1.10      | **\$660**  |
    | Bob    | 400    | \$1.10      | **\$440**  |

    Alice receives her original $600 of value plus $60 in yield. Bob receives his original $400 plus $40 in yield. Both earned yield in exact proportion to their economic contribution — 60% and 40% respectively.
  </Step>
</Steps>

## Withdrawal Mechanics

When you withdraw, Robin burns your shares and returns:

* Your **underlying assets** (your original outcome tokens, reconstructed from USDC if needed).
* Your **accumulated yield** in USDC (or pUSD), reflecting the growth in share value since your deposit.

The entire redemption, including any strategy unwinding and position reconstruction, happens atomically in a single transaction.

<Tip>
  You can check your current yield balance and estimated APY for every staked position at any time in the Robin Markets web app at [app.robin.markets](https://app.robin.markets). No action is needed to claim — yield is automatically credited when you withdraw.
</Tip>
