> For the complete documentation index, see [llms.txt](https://docs.kyte.sh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kyte.sh/protocol/staking.md).

# Staking mechanics

How stake activates, earns, locks and unstakes.

{% hint style="success" %}
**In short.** New stake becomes **active at the next epoch** and stays **locked through that first active epoch**. Rewards accrue per share of active stake and can be claimed in WETH at any time.
{% endhint %}

<figure><img src="https://996751035-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVsnNtaBRxeClOSpEHWrf%2Fuploads%2Fgit-blob-0823c5e99b9ac516d1c1bfa429a0518bf4411fd8%2Fdiagram-staking.png?alt=media" alt="How new stake activates, earns and unlocks"><figcaption><p>How new stake activates, earns and unlocks</p></figcaption></figure>

The StakingPool uses a **reward-per-share accumulator** over *active* stake, plus a global **pending bucket**.

* `stake` adds to your pending balance for the current epoch. The tokens must arrive exactly (fee-on-transfer is rejected).
* When an epoch ends, the next interaction "rolls" the global pending batch into active supply and records the accumulator value at that moment (`activationAcc[epoch]`). The batch only earns rewards notified afterwards.
* `notifyReward` (FeeVault only) adds `amount × 1e36 / activeSupply` to the accumulator. If there is no active stake, the reward goes to `undistributed` and is added to the next notification.
* Newly activated stake is recorded as `recent` and is locked until `pendingEpoch + 2`. Pending stake is never locked.
* `unstake` takes from pending first, then from unlocked active stake (`StakeLocked` otherwise).
* `claim` pays all accrued WETH, if it is at least `minClaim` (currently 0; the timelock can raise it to at most 0.1 ETH).

**Invariant:** the pool always holds enough WETH for every staker's accrued plus pending rewards (fuzz-tested solvency).


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.kyte.sh/protocol/staking.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
