> For the complete documentation index, see [llms.txt](https://docs.blockxnet.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.blockxnet.com/protocol-developers/modules/inflation/hooks.md).

# Hooks

The `x/inflation` module implements the `AfterEpochEnd` hook from the `x/epoch` module in order to allocate inflation.

### Epoch Hook: Inflation <a href="#epoch-hook-inflation" id="epoch-hook-inflation"></a>

The epoch hook handles the inflation logic which is run at the end of each epoch. It is responsible for minting and allocating the epoch mint provision as well as updating it:

1. Check if inflation is disabled. If it is, skip inflation, increment number of skipped epochs and return without proceeding to the next steps.
2. A block is commited, that signalizes that an `epoch` has ended (block `header.Time` has surpassed `epoch_start` + `epochIdentifier`).
3. Mint coin in amount of `epochMintProvision` and allocate according to inflation distribution to staking rewards, usage incentives and community pool.
4. If a period ends with current epoch,
   1. increment the period by 1 and set to store and
   2. recalculate epochMintProvision and set to store.


---

# 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://docs.blockxnet.com/protocol-developers/modules/inflation/hooks.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.
