Charging a Streaming Fee
What is the StreamingFeeModule:
The Streaming Fee Module is a module that accrues streaming fees for Set managers. Streaming fees are denominated as percent per year and realized as Set inflation rewarded to the manager.
Initializing the StreamingFeeModule:
All modules need to be added to the SetToken as the first step. Learn how to add a module to your SetToken in this section.
Once you have added the StreamingFeeModule to the SetToken, you must initialize the SetToken on the StreamingFeeModule:
The FeeState struct is constructed as followed:
The feeRecipient is the address where streaming fees will accrue.
The maxStreamingFeePercentage is the max streaming fee that the manager commits to charging. The manager will be able to change streaming fees below that amount. This is denominated in percentages (1e16
).
The streamingFeePercentage is the percent of Set accruing to manager annually.
The lastStreamingFeeTimestamp is the timestamp of last streaming fee was accrued. The module will set this parameter as the current block timestamp, so you can pass in any value here (e.g. 0).
Accruing Fees:
Anyone can call the accrueFee
function to mint streaming fees to the fee recipient. Streaming fees are calculated as a total inflation percentage. Position units are adjusted down (in magnitude) in order to ensure full collateralization of the SetToken.
Last updated