# Service Bonus (Tree-Based) & Daily Limits

## Why the Transition to Tree-Based?

The legacy V1 binary tree imposed a fixed left/right structure that capped how naturally a network could grow. The V2 tree-based model removes that constraint: every invitee you bring binds directly to your address, and their downline contributes to your service bonus volume regardless of where it sits.

## The Logic of the Service Bonus

When you invite members, they become branches of your tree. The protocol considers the total gaming and liquidity volume produced by your full subtree when computing your service bonus.

### Automated Computation

Service bonus balances are updated by a backend service running under the `SERVICE_ROLE`. The role only writes balances; it cannot mint, burn, or move tokens.

### Monotony Principle

Service bonuses can only increase. The `BonusCannotDecrease` rule is enforced by the contract — once a balance is recorded against your Pass, it cannot be reduced.

### Transparency

Every bonus update is verifiable on Polygon. You can audit your own balance and the inputs that produced it directly on-chain.

## V1 Legacy Linear and Binary Tree

In the legacy program, members were placed alphabetically (A-M) in a binary tree by default sorting logic. The diagram below shows how a linear list of invitees is transcribed into the binary positions.

TODO — embed legacy linear-to-binary diagram at `../public/legacy-linear-to-binary.png` once the team supplies a Celestium-branded asset.

The linear view is useful to identify which inviters are still active; the binary view is useful for understanding leg balances under the legacy matching rules.

## Matching Rewards

Matching cycles run every 24 hours. At cycle close, the volume of the **WEAK** leg is **DEDUCTED** from the **STRONG** leg, and an **8% matching bonus** is paid against the matched volume.

* Volume is composed of staking deposits and qualifying betting activity from your full subtree.
* Depth in the tree is irrelevant — every level under you contributes to the leg total.
* Matching bonus accruals are tracked against your Pass for the lifetime of the program.

<figure><img src="/files/jmnfACnNFpA6q8lb7S9m" alt=""><figcaption><p>Matching for Cycle 1 — left leg 160K / right leg 100K → 100K matched, 60K carries to the next cycle on the left</p></figcaption></figure>

<figure><img src="/files/p0eBoiBTaFLnGhLd7jJy" alt=""><figcaption><p>Matching for Cycle 2 — left 60K / right 100K → 60K matched, 40K carries on the right</p></figcaption></figure>

## Matching Bonus Claim and Limits

The maximum claimable amount per claim is the lower of:

* **10%** of your total staking amount, or
* **12,000,000 CELT**.

There is no time limit on waiting between claims, but there is no accumulation either. As an example, waiting 10 days does not multiply your daily cap — the limit is recomputed at claim time against your current staking position.

## V2 Matching Bonus Claim & Sustainability Limits

V2 enforces a daily rate limit on matching bonus claims that is tied directly to your active liquidity provision. The intent is to keep payouts in proportion to the liquidity you are committing to the protocol.

### Daily Claim Formula

Each day you can claim the lower of:

* **10%** of your current Liquidity Pool principal, or
* the **global hard cap** (default **12,000 CELT**).

| LP Principal | 10% of principal | Global cap  | Effective daily limit |
| ------------ | ---------------- | ----------- | --------------------- |
| 0 CELT       | 0 CELT           | 12,000 CELT | **0 CELT**            |
| 50,000 CELT  | 5,000 CELT       | 12,000 CELT | **5,000 CELT**        |
| 120,000 CELT | 12,000 CELT      | 12,000 CELT | **12,000 CELT**       |
| 500,000 CELT | 50,000 CELT      | 12,000 CELT | **12,000 CELT**       |

### Key Claim Rules

* **No Accumulation:** unclaimed daily allowance does not roll over. Skipping a day does not raise tomorrow's cap.
* **Staking Requirement:** a zero LP principal yields a zero daily limit. You must have liquidity in the pool to claim.
* **Payout Source:** all claims are paid from the Affiliate Fund contract.
* **Legacy Migration of Matching Bonuses:** matching bonus balances accrued under V1 remain claimable from the V1 contract. They are not merged into the V2 daily cap and must be claimed on the legacy interface.


---

# 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://docs.celestium.digital/affiliate-manual/affiliate-explanation/service-bonus-and-daily-limits.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.
