# How Robin Tracks and Distributes Yield

Robin distributes yield using a share-based accounting system that tracks each user’s proportional ownership of the vault over time.

### Core Idea

When you deposit into the vault, you receive shares.

These shares represent:

* Your portion of the pooled capital
* Your claim on future yield

As the vault generates yield, the value of these shares increases.

### How Yield Is Calculated

Yield is distributed proportionally based on your share of the vault:

your yield ∝ your shares / total shares

This means:

* The more you deposit, the more shares you receive
* The longer you stay in the vault, the more yield you accumulate
* Yield is automatically reflected in your position&#x20;

### Continuous Accrual

Yield accrues continuously as capital is deployed into strategies.

The system tracks this using internal accounting indexes, ensuring that:

* Each user receives their fair share of yield
* Deposits and withdrawals are accounted for precisely
* No manual claiming is required&#x20;

### What Happens When You Deposit or Withdraw

* When you deposit, you receive shares at the current vault value
* When you withdraw, your shares are burned and converted into:
* Your underlying assets
* Your accumulated yield&#x20;

### Key Properties

#### Step 1. Initial Deposit

* Alice deposits 1,000 YES tokens
* The current TWAP price of YES = $0.60

→ Economic value = $600

→ Alice receives 600 shares

→ Total vault:

* Assets = $600
* Shares = 600

Step 2 — Second User Joins

* Bob deposits 1,000 NO tokens
* TWAP price of NO = $0.40

→ Economic value = $400

→ Bob receives 400 shares

→ Total vault:

* Assets = $1,000
* Shares = 1,000

Ownership:

* Alice: 60%
* Bob: 40%

#### Step 3. Matching Happens

The vault pairs:

* 1,000 YES (Alice)
* 1,000 NO (Bob)

→ These are merged into $1,000 USDC

Now:

* Capital is fully matched
* $1,000 is deployed into yield strategies

#### Step 4. Yield Is Generated

The vault earns $100 in yield

→ Total vault value = $1,100\
→ Total shares = 1,000

→ Each share is now worth $1.10

#### Step 5. Withdrawal

Alice withdraws her 600 shares:

→ 600 × $1.10 = $660

Bob withdraws his 400 shares:

→ 400 × $1.10 = $440


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://robin-markets.gitbook.io/robin-markets-docs/how-does-robin-markets-work/how-robin-tracks-and-distributes-yield.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
