# Reporting

Each fund has its own reporting period. When creating a fund, you can choose from 3 options: 1 week, 1 month, and 1 quarter. Reporting is a key event in DeFunds, and a fund usually undergoes reporting for the following reasons:

* Planned report
  * For weekly funds - every Monday
  * For monthly funds - every first day of the month
  * For quarterly funds - every first day of the quarter (1st of Jan, 1st of Apr, 1st of Jul, 1st of Oct)
* Before [updating one of the contracts](https://defunds.gitbook.io/defunds/security#contract-updates)
* Before [updating fund's permissions](https://defunds.gitbook.io/defunds/security#updating-permissions)

The report consists of several steps that are performed sequentially:

* Charging [PF](https://defunds.gitbook.io/defunds/fees#performance-fee) and [EF](https://defunds.gitbook.io/defunds/fees#execution-fee) fees
* [Deposits](https://defunds.gitbook.io/defunds/for-investors#making-an-investment) accrual
* Fulfillment of [withdrawal](https://defunds.gitbook.io/defunds/for-investors#withdraw) requests
* Moving [indented](https://defunds.gitbook.io/defunds/for-investors#indent) withdrawal requests to the next period
* Saving [HWM](https://defunds.gitbook.io/defunds/fees#performance-fee) value

The report has a limit of **20** operations. One operation is counted for each [deposit](https://defunds.gitbook.io/defunds/for-investors#making-an-investment) or [withdrawal](https://defunds.gitbook.io/defunds/for-investors#withdraw). If the number of operations in the report exceeds the limit, the report is executed in multiple transactions. [Execution fee](https://defunds.gitbook.io/defunds/fees#execution-fee) is charged from fund assets for every report transaction.

{% hint style="info" %}
Note: Only trigger server is authorized to call the report
{% endhint %}

## Autoclosing

During report, these expenses are paid from fund assets in **USDT**:

* [Withdrawals](https://defunds.gitbook.io/defunds/for-investors#withdraw)
* [Performance fee](https://defunds.gitbook.io/defunds/fees#performance-fee)
* [Execution fee](https://defunds.gitbook.io/defunds/fees#execution-fee)

If the fund's **USDT** balance and the **total deposit size** for the last period are insufficient to cover the fund's expenses, the auto-closing process is initiated, in order to get needed amount of **USDT**. Usually it's **110%** of needed amount is closed, to handle high volatility at the moment of closing positions. The order of services during auto-closing is: **GMX -> AAVE -> 0x**. Positions are closed in order from the biggest to the smallest.

Execution fees are calculated using this formula:

$$
(gasFee\*gasPrice+value)\*priceETH
$$

* **gasFee** - amount of gas used for an autoclosing transaction
* **gasPrice** - gas price
* **value** - amount of base currency sent with a transaction (needed for decreasal of GMX positions)
* **priceETH** - price of network's base currency in USDT fetched from a [Chainlink](https://chain.link/) price feed contract

Execution fees are tracked as debt and are charged from Trade contract in USDT every hour.

{% hint style="info" %}
Hint: To avoid unwanted auto-closing, you should close positions in advance to fulfill all withdrawal requests during the [indent](https://defunds.gitbook.io/defunds/for-investors#indent) period
{% endhint %}


---

# Agent Instructions: 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://defunds.gitbook.io/defunds/reporting.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.
