-
Notifications
You must be signed in to change notification settings - Fork 17
Stream mint self-fees after daily boundary #211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
d162f78
31458cb
f17badb
09c73e5
58f5677
8d3887e
d2ad4c0
35f28fd
013544d
a05e4a9
e7f9314
85c7933
fc71d62
8e50145
d5ca73f
b6823ef
c1a28a5
c0fdd5c
c04bdbc
d8874e6
ec43b05
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ import { ITrustedFillerRegistry, IBaseTrustedFiller } from "@reserve-protocol/tr | |
|
|
||
| import { RebalancingLib } from "@utils/RebalancingLib.sol"; | ||
| import { FolioLib } from "@utils/FolioLib.sol"; | ||
| import { AUCTION_WARMUP, AUCTION_LAUNCHER, D18, ERC20_STORAGE_LOCATION, REBALANCE_MANAGER, MAX_MINT_FEE, MAX_FOLIO_FEE, MIN_AUCTION_LENGTH, MAX_AUCTION_LENGTH, RESTRICTED_AUCTION_BUFFER, ONE_DAY } from "@utils/Constants.sol"; | ||
| import { AUCTION_WARMUP, AUCTION_LAUNCHER, D18, ERC20_STORAGE_LOCATION, FOLIO_FEE_HANDOUT_BLOCK_TIME, FOLIO_FEE_HANDOUT_PERIOD, FOLIO_FEE_HANDOUT_RATE, REBALANCE_MANAGER, MAX_MINT_FEE, MAX_FOLIO_FEE, MIN_AUCTION_LENGTH, MAX_AUCTION_LENGTH, RESTRICTED_AUCTION_BUFFER, ONE_DAY } from "@utils/Constants.sol"; | ||
| import { Versioned } from "@utils/Versioned.sol"; | ||
|
|
||
| import { IFolioDAOFeeRegistry } from "@interfaces/IFolioDAOFeeRegistry.sol"; | ||
|
|
@@ -83,6 +83,7 @@ import { IFolio } from "@interfaces/IFolio.sol"; | |
| * Fees: | ||
| * - TVL fee: fee per unit time. Max 10% annually. Causes supply inflation over time, discretely once a day. | ||
| * - Mint fee: fee on mint. Max 5%. Does not cause supply inflation. | ||
| * - Mint self-fees: remain in effective supply, then appreciate the Folio at a bounded rate during a daily window. | ||
| * | ||
| * After fees have been applied, the DAO takes a cut based on the configuration of the FolioDAOFeeRegistry including | ||
| * a minimum fee floor. The remaining portion above the floor is distributed to the Folio's fee recipients. | ||
|
|
@@ -190,9 +191,12 @@ contract Folio is | |
| // === 6.0.0 === | ||
| bool public tradeAllowlistEnabled; | ||
| EnumerableSet.AddressSet private tradeTokenAllowlist; | ||
| uint256 public folioFeeForSelf; // D18{1} fraction of fee-recipient shares to burn | ||
| uint256 public folioFeeForSelf; // D18{1} fraction of fee-recipient shares directed to Folio holders | ||
|
|
||
| FeeRecipient[] public immutableFeeRecipients; | ||
| uint256 public folioPendingFeeShares; // {share} mint self-fee shares pending handout | ||
| uint256 public lastFolioFeePoke; // {s} last time mint self-fee handout capacity was accounted | ||
| uint256 private folioFeeHandoutBase; // {share} supply eligible to set the mint self-fee handout rate | ||
|
|
||
| /// Any external call to the Folio that relies on accurate share accounting must pre-hook poke | ||
| modifier sync() { | ||
|
|
@@ -252,6 +256,8 @@ contract Folio is | |
| } | ||
|
|
||
| lastPoke = block.timestamp; | ||
| lastFolioFeePoke = block.timestamp; | ||
| folioFeeHandoutBase = _basicDetails.initialShares; | ||
|
|
||
| _mint(_creator, _basicDetails.initialShares); | ||
| _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); | ||
|
|
@@ -316,9 +322,9 @@ contract Folio is | |
| _setMintFee(_newFee); | ||
| } | ||
|
|
||
| /// Set the folio fee — fraction of fee-recipient shares that are burned (not minted) | ||
| /// Set the folio fee — fraction of fee-recipient shares directed to Folio holders | ||
| /// @dev Non-reentrant via distributeFees() | ||
| /// @param _newFee D18{1} Fraction of fee-recipient shares to burn | ||
| /// @param _newFee D18{1} Fraction of fee-recipient shares directed to Folio holders | ||
| function setFolioSelfFee(uint256 _newFee) external onlyRole(DEFAULT_ADMIN_ROLE) { | ||
| distributeFees(); | ||
|
|
||
|
|
@@ -413,7 +419,12 @@ contract Folio is | |
| function totalSupply() public view override returns (uint256) { | ||
| (uint256 _daoPendingFeeShares, uint256 _feeRecipientsPendingFeeShares, , ) = _getPendingFeeShares(); | ||
|
|
||
| return super.totalSupply() + _daoPendingFeeShares + _feeRecipientsPendingFeeShares; | ||
| return | ||
| super.totalSupply() + | ||
| _daoPendingFeeShares + | ||
| _feeRecipientsPendingFeeShares + | ||
| folioPendingFeeShares - | ||
| _getFolioFeeHandout(); | ||
| } | ||
|
|
||
| /// @dev Result may be unreliable mid-swap during trusted fill execution, check stateChangeActive() | ||
|
|
@@ -435,7 +446,7 @@ contract Folio is | |
| } | ||
|
|
||
| /// @dev Use allowances to set slippage limits for provided assets | ||
| /// @dev Minting has 3 share-portions: (i) receiver shares, (ii) DAO fee shares, (iii) fee recipients shares | ||
| /// @dev Minting has 4 share-portions: receiver, DAO, fee recipients, and pending Folio self-fee shares | ||
| /// @param shares {share} Amount of shares to mint | ||
| /// @param minSharesOut {share} Minimum amount of shares the caller must receive after fees | ||
| /// @return _assets | ||
|
|
@@ -445,9 +456,10 @@ contract Folio is | |
| address receiver, | ||
| uint256 minSharesOut | ||
| ) external nonReentrant notDeprecated sync returns (address[] memory _assets, uint256[] memory _amounts) { | ||
| uint256 previousHandoutSupply = _getFolioFeeHandoutSupply(); | ||
|
|
||
| // === Calculate fee shares === | ||
|
|
||
| // @dev Semantically view; non-view only because computeMintFees() emits FolioFeePaid | ||
| (uint256 sharesOut, uint256 daoFeeShares, uint256 feeRecipientFeeShares) = FolioLib.computeMintFees( | ||
| FolioLib.MintFeeParams({ | ||
| shares: shares, | ||
|
|
@@ -473,9 +485,11 @@ contract Folio is | |
|
|
||
| _mint(receiver, sharesOut); | ||
|
|
||
| // defer fee handouts until distributeFees() | ||
| // defer DAO and recipient fee handouts until distributeFees() | ||
| daoPendingFeeShares += daoFeeShares; | ||
| feeRecipientsPendingFeeShares += feeRecipientFeeShares; | ||
| folioPendingFeeShares += shares - sharesOut - daoFeeShares - feeRecipientFeeShares; | ||
| _scaleFolioFeeHandoutBase(previousHandoutSupply); | ||
| } | ||
|
|
||
| /// @param shares {share} Amount of shares to redeem | ||
|
|
@@ -491,12 +505,15 @@ contract Folio is | |
| address[] calldata assets, | ||
| uint256[] calldata minAmountsOut | ||
| ) external nonReentrant sync returns (uint256[] memory _amounts) { | ||
| uint256 previousHandoutSupply = _getFolioFeeHandoutSupply(); | ||
|
|
||
| address[] memory _assets; | ||
| (_assets, _amounts) = _toAssets(shares, Math.Rounding.Floor); | ||
|
|
||
| // === Burn shares === | ||
|
|
||
| _burn(msg.sender, shares); | ||
| _scaleFolioFeeHandoutBase(previousHandoutSupply); | ||
|
|
||
| // === Transfer assets out === | ||
|
|
||
|
|
@@ -641,7 +658,7 @@ contract Folio is | |
|
|
||
| /// Start a new rebalance, ending the currently running auction | ||
| /// @dev If caller omits old tokens they will be kept in the basket for mint/redeem but skipped in the rebalance | ||
| /// @dev Note that weights will be _slightly_ stale after the fee supply inflation on a 24h boundary | ||
| /// @dev Weights become stale during TVL fee inflation and mint self-fee handout windows | ||
| /// @param rebalanceNonce The expected nonce after this rebalance starts | ||
| /// @param tokens The rebalance parameters for each token in the rebalance | ||
| /// @param tokens.token MUST be unique; MUST be allowlisted when the trade allowlist is enabled | ||
|
|
@@ -1068,13 +1085,49 @@ contract Folio is | |
| currentFeeRecipientsPending: feeRecipientsPendingFeeShares, | ||
| tvlFee: tvlFee, | ||
| folioFeeForSelf: folioFeeForSelf, | ||
| // pending mint self-fees are exempt from TVL fees while awaiting handout | ||
| supply: super.totalSupply() + daoPendingFeeShares + feeRecipientsPendingFeeShares, | ||
| elapsed: elapsed | ||
| }), | ||
| daoFeeRegistry | ||
| ); | ||
| } | ||
|
|
||
| /// @return _folioFeeHandout {share} Mint self-fee shares available for handout | ||
| function _getFolioFeeHandout() internal view returns (uint256 _folioFeeHandout) { | ||
| if (folioPendingFeeShares == 0 || block.timestamp <= lastFolioFeePoke) { | ||
| return 0; | ||
| } | ||
|
|
||
| uint256 elapsed = (block.timestamp / ONE_DAY - lastFolioFeePoke / ONE_DAY) * | ||
| FOLIO_FEE_HANDOUT_PERIOD + | ||
| Math.min(block.timestamp % ONE_DAY, FOLIO_FEE_HANDOUT_PERIOD) - | ||
| Math.min(lastFolioFeePoke % ONE_DAY, FOLIO_FEE_HANDOUT_PERIOD); | ||
|
|
||
| // {share} = {share} * D18{1} * {s} / (D18 * {s}) | ||
| uint256 maxHandout = Math.mulDiv( | ||
| folioFeeHandoutBase, | ||
| FOLIO_FEE_HANDOUT_RATE * elapsed, | ||
| D18 * FOLIO_FEE_HANDOUT_BLOCK_TIME | ||
| ); | ||
| _folioFeeHandout = Math.min(folioPendingFeeShares, maxHandout); | ||
| } | ||
|
|
||
| /// @return {share} Supply eligible to set the mint self-fee handout rate | ||
| function _getFolioFeeHandoutSupply() internal view returns (uint256) { | ||
| return super.totalSupply() + daoPendingFeeShares + feeRecipientsPendingFeeShares; | ||
| } | ||
|
|
||
| /// Scale the handout base with user-driven supply changes without including TVL fee growth | ||
| function _scaleFolioFeeHandoutBase(uint256 previousSupply) internal { | ||
| uint256 supply = _getFolioFeeHandoutSupply(); | ||
| if (supply == previousSupply) { | ||
| return; | ||
| } | ||
|
|
||
| folioFeeHandoutBase = previousSupply == 0 ? supply : Math.mulDiv(folioFeeHandoutBase, supply, previousSupply); | ||
| } | ||
|
|
||
| /// Set TVL fee by annual percentage. Different from how it is stored! | ||
| /// @param _newFeeAnnually D18{1/year} | ||
| function _setTVLFee(uint256 _newFeeAnnually) internal { | ||
|
|
@@ -1090,7 +1143,7 @@ contract Folio is | |
| emit MintFeeSet(_newFee); | ||
| } | ||
|
|
||
| /// Set folio fee — fraction of fee-recipient shares to burn | ||
| /// Set folio fee — fraction of fee-recipient shares directed to Folio holders | ||
| /// @param _newFee D18{1} | ||
| function _setFolioSelfFee(uint256 _newFee) internal { | ||
| require(_newFee <= MAX_FOLIO_FEE, Folio__FolioFeeTooHigh()); | ||
|
|
@@ -1123,25 +1176,35 @@ contract Folio is | |
| emit NameSet(_newName); | ||
| } | ||
|
|
||
| /// @dev After: daoPendingFeeShares and feeRecipientsPendingFeeShares are up-to-date | ||
| /// @dev After: all pending fee share accounting is up-to-date | ||
| function _poke() internal { | ||
| _closeTrustedFill(false); | ||
|
|
||
| uint256 _folioFeeHandout = _getFolioFeeHandout(); | ||
|
|
||
| ( | ||
| uint256 _daoPendingFeeShares, | ||
| uint256 _feeRecipientsPendingFeeShares, | ||
| uint256 _folioSelfFeeShares, | ||
| uint256 _accountedUntil | ||
| ) = _getPendingFeeShares(); | ||
|
|
||
| // lazily initialize the appended handout base when upgrading an existing Folio | ||
| if (lastFolioFeePoke == 0) { | ||
| folioFeeHandoutBase = super.totalSupply() + _daoPendingFeeShares + _feeRecipientsPendingFeeShares; | ||
| } | ||
|
|
||
| if (_accountedUntil > lastPoke) { | ||
| daoPendingFeeShares = _daoPendingFeeShares; | ||
| feeRecipientsPendingFeeShares = _feeRecipientsPendingFeeShares; | ||
| lastPoke = _accountedUntil; | ||
| } | ||
|
|
||
| if (_folioSelfFeeShares != 0) { | ||
| emit FolioFeePaid(address(this), _folioSelfFeeShares); | ||
| } | ||
| folioPendingFeeShares -= _folioFeeHandout; | ||
| lastFolioFeePoke = block.timestamp; | ||
|
|
||
| if (_folioSelfFeeShares + _folioFeeHandout != 0) { | ||
| emit FolioFeePaid(address(this), _folioSelfFeeShares + _folioFeeHandout); | ||
| } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Description: Trace FolioFeePaid producers and consumers across the repository.
set -euo pipefail
rg -n -C5 'FolioFeePaid' --glob '!**/lib/**'Repository: reserve-protocol/reserve-index-dtf Length of output: 2100 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- repository ---'
pwd
printf '%s\n' '--- matching files ---'
git ls-files | rg '(^|/)(Folio\.sol|.*\.(sol|ts|js|json))$' | head -200
printf '%s\n' '--- FolioFeePaid references ---'
rg -n -C6 'FolioFeePaid' --glob '!**/lib/**' --glob '!**/node_modules/**' .Repository: reserve-protocol/reserve-index-dtf Length of output: 2071 🌐 Web query:
💡 Result: FolioFeePaid is an event defined in the Reserve Protocol's Folio smart contract (part of the reserve-index-dtf repository) [1][2][3]. This event is emitted by the distributeFees function when protocol fees are successfully distributed to designated fee recipients [1][4][5]. The distributeFees function calculates and mints index tokens to fee recipients and the DAO based on accumulated pending fee shares [1][6][4]. The FolioFeePaid event specifically logs the recipient's address and the amount of shares (index tokens) minted to them [1][7][5]. Key technical details include: - Event Signature: FolioFeePaid(address recipient, uint256 amount) [7] - Context: It is part of the Reserve Folio protocol, which manages on-chain index assets [3][8]. - Functionality: Pending fee shares are tracked within the contract and reflected in the total supply calculation until this function is called to concretize and distribute the balances [6][4][5]. Once distributed, the event signals the completion of the minting process for the fee recipients [1][6][9]. Citations:
🏁 Script executed: #!/bin/bash
set -euo pipefail
python3 - <<'PY'
import urllib.request
urls = [
"https://api.github.com/search/code?q=FolioFeePaid+repo%3Areserve-protocol%2Freserve-index-dtf",
"https://raw.githubusercontent.com/reserve-protocol/reserve-index-dtf/main/contracts/Folio.sol",
"https://raw.githubusercontent.com/reserve-protocol/reserve-index-dtf/master/contracts/Folio.sol",
]
for url in urls:
print(f"--- {url} ---")
try:
req = urllib.request.Request(url, headers={"Accept": "application/vnd.github+json", "User-Agent": "review-verifier"})
with urllib.request.urlopen(req, timeout=15) as r:
data = r.read().decode()
print(data[:20000])
except Exception as e:
print(type(e).__name__, e)
PYRepository: reserve-protocol/reserve-index-dtf Length of output: 2071 🌐 Web query:
💡 Result: In the Reserve Protocol Folio contract architecture, folioSelfFeeShares and folioFeeHandout relate to the management and distribution of fee-recipient shares within the Folio system [1][2]. folioSelfFeeShares (specifically referring to the state variable folioFeeForSelf) represents a fraction (expressed as a D18 value) of fee-recipient shares that are burned rather than distributed to external recipients [1]. This mechanism is controlled by the setFolioFee function, which updates this burn rate and calls distributeFees to concretize pending shares [1]. When this fee is configured, any fee recipient tables that are empty will result in non-self fees being routed to the DAO [2]. The concept of a "fee handout" or the distribution process is handled primarily by the distributeFees function [1]. This function distributes all pending fee shares to designated recipients, which can include the DAO, mutable fee recipients, and immutable fee recipients [1]. If both the mutable and immutable fee recipient tables are empty, the entire fee amount is routed to the DAO [1]. Pending fee shares are calculated and tracked to ensure the system accurately reflects the distribution of rewards to these various parties [1]. These mechanisms are part of the Folio fee structure, which includes TVL fees and mint fees, both of which ensure the DAO receives a mandatory minimum floor (currently 15 bps) of the value generated [3]. The management of these fees, including setting the self-fee burn rate, is restricted to governance roles [1][3]. Citations:
🌐 Web query:
💡 Result: No exact search results were found for:
🌐 Web query:
💡 Result: In the context of the Reserve Protocol's Folio smart contract (Folio.sol), there is no function or component named "FolioFeeHandout" [1][2]. The Reserve Protocol's fee management system uses a Citations:
🌐 Web query:
💡 Result: In the Reserve Index DTF protocol, folioSelfFee (often referred to as folioFeeForSelf) is a configuration parameter in the Folio contract that determines the fraction of fee-recipient shares to be burned instead of being minted and distributed to recipients [1][2]. Key details include: Purpose: Burning a portion of fee-recipient shares creates deflationary pressure on the total supply, effectively distributing value to all existing shareholders [1][2]. Function Signature: The administrative function to update this value is: function setFolioSelfFee(uint256 _newFee) external onlyRole(DEFAULT_ADMIN_ROLE) [1] Format: The value is expressed in D18 format (where 1e18 represents 100%) [1][2]. For example, setting the value to 0.5e18 would burn 50% of the calculated fee-recipient shares [1]. Mechanics: During fee calculation (e.g., in the FolioLib library), this fraction is used to split the fee-recipient allocation into a minted portion (for recipients) and a burned portion (to reduce supply) [3]. The current configured value can typically be retrieved using the getter function folio.folioFeeForSelf [1][2]. Citations:
🌐 Web query:
💡 Result: There is no entity, function, or standard called "folioFeeHandout" in Solidity or the Reserve Protocol [1][2][3][4][5][6]. The term appears to be a confusion of two separate domains: 1. Reserve Protocol (Reserve Index DTF): This protocol uses "Folio" contracts to manage baskets of assets and features extensive fee management, including functions like setFolioSelfFee, distributeFees, and systems involving fee recipients and DAO registries [1][2][3][4][5][6]. It does not contain a "handout" function [1][6]. 2. FOLIO Library System (folio-org): This is an open-source library services platform [7][8]. It includes a module called mod-feesfines for managing library fees and fines [7], but this is not related to Solidity smart contract development. The term "handout" is also commonly associated with tools like Python Handout, a library for turning scripts into documents [9], which is unrelated to blockchain or Solidity. Citations:
🌐 Web query:
💡 Result: The FolioFeePaid event is a Solidity event defined within the Reserve Protocol's Folio smart contract [1][2]. It is emitted during the fee distribution process to signal that a specific amount of fee shares has been allocated to a designated recipient [1][3]. The event is defined as follows: event FolioFeePaid(address indexed recipient, uint256 amount); Parameters: recipient (address): The address of the entity (e.g., a fee recipient) receiving the distributed fee shares [3][4]. amount (uint256): The quantity of fee shares distributed to the recipient [3][2]. Context: In the Reserve Folio protocol, fees (such as those from minting operations or TVL-based demurrage) accumulate as pending shares within the contract [3][5][2]. When the distributeFees function is called, these pending shares are minted and distributed to the configured fee recipients and the protocol DAO [1][2]. The FolioFeePaid event is emitted specifically when shares are minted and distributed to the designated fee recipients [1][2]. A separate event, ProtocolFeePaid, is typically used for distributions to the DAO [1][2]. Citations:
🌐 Web query:
💡 Result: In the context of the Reserve Protocol's Index DTF (Decentralized Tradeable Funds), the FolioFeePaid event is emitted by the Folio smart contract during the distribution of accumulated fee shares to specified fee recipients [1][2]. The Citations:
🌐 Web query:
💡 Result: In the Reserve Protocol's Index DTF contracts, _folioSelfFeeShares is not an explicit variable name found within the Citations:
🌐 Web query:
💡 Result: The term folioSelfFeeShares refers to a configuration or parameter associated with the Reserve Protocol's Folio contracts [1]. Specifically, it is related to the fee distribution logic within the Folio.sol and FolioLib.sol smart contracts [1]. In this architecture, folioFeeForSelf is a configuration setting used to manage how fees are routed [1]. When this is configured, empty fee-recipient tables result in non-self fees being routed to the DAO [1]. The protocol documentation and audit materials indicate that these fee shares are part of the system's reward accounting, which can sometimes be complex, particularly during vault rotations or when fee rewards are minted to successor vaults [2]. The term is explicitly referenced in the context of the Reserve Index DTF (Decentralized Tokenized Funds) project's technical documentation and audit documentation [1]. Citations: 🌐 Web query:
💡 Result: Based on the codebase for the Reserve Protocol's Folio contract, FolioFeePaid is an event emitted by the Folio smart contract [1][2]. The term address(this) within the context of a Solidity contract refers to the address of the current contract instance [3]. When FolioFeePaid is emitted, it typically includes address(this) as part of its indexed parameters or event data to identify the Folio contract instance that has paid or processed the fee [1][4]. This pattern is commonly used in Solidity to allow off-chain observers or other contracts to attribute specific fee events to the correct Folio instance in a system where multiple Folio contracts may exist [5]. You can find the definition of this event and its usage within the contracts/Folio.sol file in the official Reserve Protocol repository [1][2]. Citations:
🌐 Web query:
💡 Result: In the Reserve Protocol (reserve-index-dtf), Pull Request Citations:
🌐 Web query:
💡 Result: FolioFeePaid is an event emitted by the Folio contract within the reserve-protocol/reserve-index-dtf repository [1]. It is triggered during the distribution of accumulated fee shares to defined fee recipients [2][3]. Technical Context: When the distributeFees function is called, the contract calculates fee shares for designated recipients and the DAO [2]. For each fee recipient configured in the Folio contract, the contract mints index tokens corresponding to their portion of the pending fee shares and emits the FolioFeePaid event [2][3]: emit FolioFeePaid(recipients[i].recipient, shares); Regarding Pull Request Citations:
🌐 Web query:
💡 Result: In the Reserve Protocol's reserve-index-dtf repository, FolioFeePaid is an event emitted by the Folio contract when fee shares are distributed to designated fee recipients [1][2][3]. The event is defined as follows: event FolioFeePaid(address indexed recipient, uint256 amount) [3] The event is triggered within the distributeFees function, which is a public function that handles the distribution of pending fee shares [2][4][5]. When distributeFees is called, the contract calculates the portion of pending fees allocated to configured fee recipients, mints the corresponding index tokens to them, and emits the FolioFeePaid event for each recipient [2][4][5]. Key details regarding the context of this event: - Purpose: It tracks the distribution of fee shares from an index (Folio) to its configured fee recipients [2][4]. - Protocol Context: The reserve-index-dtf repository (also known as Reserve Folio) is a protocol for creating and managing on-chain portfolios of ERC20-compliant assets [6][7]. - Related Events: In the same distribution process, a ProtocolFeePaid event is emitted to track the distribution of remaining shares (including DAO fees) [2][4][5]. - Usage: Anyone can call the distributeFees function to concretize and distribute these accumulated fee shares [4][5]. Citations:
🌐 Web query:
💡 Result: The code snippet Citations:
🌐 Web query:
💡 Result: The code snippet you referenced relates to the Reserve Protocol's Folio contract [1][2]. Regarding your specific query about FolioFeePaid(address(this), _folioSelfFeeShares), this appears to be a misunderstanding or a slight misconstruction of the contract's implementation [1][2]. Based on the official source code of the Folio contract, the FolioFeePaid event is emitted when distributing fees to designated fee recipients [1][2]. Specifically, within the distributeFees function, the contract iterates through a list of configured fee recipients and mints their respective share of the pending fees [1][2]. The event is emitted as follows: emit FolioFeePaid(recipients[i].recipient, shares); In this context: 1. recipients[i].recipient is the address of the individual fee recipient [1][2]. 2. shares is the amount of tokens minted to that recipient [1][2]. The term _folioSelfFeeShares typically refers to a portion of the fee-recipient shares that are burned (rather than minted to a recipient) to reduce supply inflation [3][4]. The Folio contract calculates this "self fee" (or burn amount) to adjust the total pending fee shares before distributing the remaining amount to recipients and the DAO [1][2]. Therefore, you will not find an event emitted with address(this) as the recipient for _folioSelfFeeShares [1][2]. Instead, the contract logic handles the burn (the "self fee" portion) internally, and the FolioFeePaid event is reserved strictly for external recipients receiving their allocated shares [1][2]. Citations:
🌐 Web query:
💡 Result: The terms folioFeeHandout and FolioFeePaid refer to two distinct systems: 1. FolioFeePaid is a specific event in the Reserve Protocol's Index DTF (Decentralized Tokenized Fund) smart contract [1][2][3]. It is emitted when accumulated protocol fees are distributed to designated fee recipients [1][4]. The event is defined as: event FolioFeePaid(address indexed recipient, uint256 amount) [5] This event occurs during the execution of the distributeFees function, which mints index tokens to fee recipients and the DAO [1][3]. 2. The term "folioFeeHandout" does not appear to be a recognized technical term or function within the Reserve Protocol's Folio contract or the FOLIO Library Services Platform (LSP) [6][7][1]. Note: The FOLIO Library Services Platform (LSP) uses "Fees and Fines" management, but its data structures and events are entirely unrelated to the Reserve Protocol's Folio contract [6][8][9]. FOLIO LSP manages library-specific monetary transactions (like overdue fines) through account and action records, not through blockchain-based events [8][9]. Citations:
Keep This emission uses 🤖 Prompt for AI Agents |
||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.