> For the complete documentation index, see [llms.txt](https://hoodstrategy.gitbook.io/hoodstrategy/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hoodstrategy.gitbook.io/hoodstrategy/reward-mechanism.md).

# Reward Mechanism

The model is a **cumulative dividend token** (a proven pattern, MasterChef-style), adapted to distribute HOODX. This page gives the exact formulas, with no gray areas.

## State variables

* `accHoodPerShare` — global accumulator, **scaled by `1e12`** (precision).
* `rewardDebt[holder]` — a holder's reward "debt," adjusted on every balance change.
* `claimable[holder]` — claimable HOODX.
* `eligibleSupply` — eligible supply (total supply − excluded addresses).

## Update on a harvest

When a cycle buys `H` units of HOODX:

```
accHoodPerShare += (H * 1e12) / eligibleSupply
```

## A holder's pending reward

For a holder with a $HOODSTR balance `b`:

```
pending = (b * accHoodPerShare / 1e12) - rewardDebt[holder]
```

## Settlement rule

Before any balance change (buy, sell, transfer) and before any `claim`:

```
1. pending           = (b_old * accHoodPerShare / 1e12) - rewardDebt[holder]
2. claimable[holder] += pending
3. (the balance changes: b_old → b_new)
4. rewardDebt[holder] = b_new * accHoodPerShare / 1e12
```

A holder's reward is thus **frozen** on every move, then resumes accruing on the new balance. No one can "steal" rewards by buying right before a harvest and selling right after: the debt is recomputed at each step.

## Claiming

```
claim():
   settle pending (steps 1-2)
   amount = claimable[holder]
   claimable[holder] = 0
   transfer `amount` HOODX to the holder
```

## Worked example

Assume:

* `eligibleSupply` = 80,000,000 $HOODSTR (after exclusions);
* a holder owns 8,000,000 $HOODSTR, i.e. **1%** of eligible supply;
* a harvest cycle buys **100 HOODX**.

Then:

```
pending = 8,000,000 × (100 / 800,000,000) = 1 HOODX
```

The holder earns **1 HOODX** this cycle (1% of 100), consistent with their 1% share. Over 50 similar cycles, they'd have 50 claimable HOODX.

{% hint style="info" %}
Distribution is **accounting-based**: the protocol does not make 800,000 transfers per harvest. It updates a single counter (`accHoodPerShare`), and each holder pulls their share via `claim`. That's what makes the system scalable and gas-cheap.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://hoodstrategy.gitbook.io/hoodstrategy/reward-mechanism.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
