> For the complete documentation index, see [llms.txt](https://baklavaspace.gitbook.io/main/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://baklavaspace.gitbook.io/main/guides/faq/about-vaults-general/reinvest-function.md).

# Reinvest Function

How does the reinvest button work?

The reinvest button takes all pending rewards from a pool, converts them into the farm asset, and reinvests them back into the pool to compound deposits for everyone in the farm.&#x20;

There is a variable reward to incentivise users to press that button.&#x20;

Whoever is first to press the button, earns the reward and compounds everyone's deposits.


---

# 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:

```
GET https://baklavaspace.gitbook.io/main/guides/faq/about-vaults-general/reinvest-function.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.
