> For the complete documentation index, see [llms.txt](https://docs.indexcoop.com/index-coop-community-handbook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.indexcoop.com/index-coop-community-handbook/protocol/index-protocol/modules/streaming-fee-module.md).

# Streaming Fee Module

The **StreamingFeeModule** ([Etherscan](https://etherscan.io/address/0x165edf07bb61904f47800e13f5120e64c4b9a186)) is a smart contract that accrues streaming fees for managers and methodologists. Streaming fees are denominated as percent per year and realized as inflation rewarded to recipients.

## Select Methods

### accrueFee()

`function accrueFee(ISetToken _setToken)`

Calculates total inflation percentage then mints new Sets to the fee recipient. Position units are then adjusted down (in magnitude) in order to ensure full collateralization. Callable by anyone.

| Parameter Name | Type      | Description              |
| -------------- | --------- | ------------------------ |
| \_setToken     | ISetToken | Instance of the SetToken |

### initialize()

`function initialize(ISetToken _setToken, FeeState memory _settings)`

**Manager only.** Initializes this module to the SetToken.

| Parameter Name | Type      | Description                             |
| -------------- | --------- | --------------------------------------- |
| \_setToken     | ISetToken | Address of the SetToken                 |
| \_settings     | FeeState  | FeeState struct defining fee parameters |

The FeeState struct is constructed as follows:

```typescript
struct FeeState {
    address feeRecipient;                   // Address to accrue fees to
    uint256 maxStreamingFeePercentage;      // Max streaming fee manager commits to using (1% = 1e16, 100% = 1e18)
    uint256 streamingFeePercentage;         // Percent of Set accruing to manager annually (1% = 1e16, 100% = 1e18)
    uint256 lastStreamingFeeTimestamp;      // Timestamp last streaming fee was accrued
}                                                  
```

### updateStreamingFee()

`function updateStreamingFee(ISetToken _setToken, uint256 _newFee)`

**Manager only**. Set new streaming fee. Fees accrue at current rate then new rate is set. Fees are accrued to prevent the manager from unfairly accruing a larger percentage.

| Parameter Name | Type    | Description                               |
| -------------- | ------- | ----------------------------------------- |
| \_setToken     | address | Instance of the SetToken                  |
| \_newFee       | uint256 | New streaming fee in 18 decimal precision |

### updateFeeRecipient()

`function updateFeeRecipient(ISetToken _setToken, address _newFeeRecipient)`

**Manager only**. Set new fee recipient.

| Parameter Name    | Type      | Description              |
| ----------------- | --------- | ------------------------ |
| \_setToken        | ISetToken | Instance of the SetToken |
| \_newFeeRecipient | address   | New fee recipient        |


---

# 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.indexcoop.com/index-coop-community-handbook/protocol/index-protocol/modules/streaming-fee-module.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.
