> For the complete documentation index, see [llms.txt](https://docs.raga.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.raga.finance/technical-documentation/auto-compounding-vaults-berachain.md).

# Auto-compounding vaults (Berachain)

Raga Finance's vault system is designed to manage user deposits, execute investment strategies, handle fees, and optimize yield generation through a combination of on-chain smart contracts and off-chain executors.​

1. **VaultContract**:
   1. **Function**: Serves as the primary interface for users and protocols to deposit funds.
   2. **Responsibilities**:
      1. Accepts user deposits and issues corresponding shares.
      2. Manages the allocation of funds to various strategies.
      3. Tracks and distributes rewards earned from strategies.
2. **StrategyManager**:
   1. **Function**: Oversees the management and approval of investment strategies.​
   2. **Responsibilities**:
      1. Maintains a registry of whitelisted strategies.
      2. Ensures strategies meet predefined risk and compliance criteria.
      3. Coordinates with VaultContract for fund allocation.
3. **FeeModule**:
   1. **Function**: Calculates and collects fees associated with deposits, rewards, and early withdrawals.​
   2. **Responsibilities**:
      1. Applies deposit fees (0–1%) upon asset entry.
      2. Deducts reward fees (0–10%) from earnings.
      3. Imposes withdrawal fees (0–1%) for early exits.
4. **Strategies**:
   1. **Function**: Individual smart contracts implementing specific investment strategies.​
   2. **Responsibilities**:
      1. Execute investment logic (e.g., yield farming, lending).
      2. Interact with external DeFi protocols to generate returns.
      3. Report performance and manage allocated funds.
5. **Offchain Executor**:
   1. **Function**: An off-chain service responsible for initiating and managing transactions related to strategies.​
   2. **Responsibilities**:
      1. Triggers fund movements between VaultContract and Strategies.
      2. Claims rewards from external protocols.
      3. Reinvests earnings back into strategies or VaultContract.


---

# 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.raga.finance/technical-documentation/auto-compounding-vaults-berachain.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.
