Fee Flow
Introduction
Fee Flow is a powerful open-source module that enables the auctioning of protocol fees for EUL tokens (or other). These auctions convert protocol-generated fees (e.g., in USDC, DAI, or other assets in form of the vault shares) into EUL, which flows back to the Euler DAO treasury. The DAO can then decide, via governance, how to use these funds (e.g., burn, distribute, or allocate for growth).
How Fee Flow Works
Fee Collection
- Protocol fees accumulate in the protocol from the interest fees
- These fees can be in any asset (eUSDC, eDAI, eWETH, etc.)
- Each vault has a function that allows anyone to transfer accrued fees to the FeeFlowController contract
- The transfer of fees is typically done just-in-time during the auction settlement to optimize gas costs
Auction Process
Fee Flow employs a reverse Dutch auction mechanism with the following characteristics:
-
Epoch-based System
- Auctions occur in discrete epochs
- Each epoch has a defined period (epochPeriod)
- The auction price starts high and decreases linearly over time
-
Price Dynamics
- Initial price (initPrice) is set at priceMultiplier times the previous epoch's settlement price
- Price decreases linearly over the epochPeriod, tending towards zero
- Example: With priceMultiplier=2 and epochPeriod=100 days, the auction starts at twice the previous settlement price
-
Settlement Conditions
- The auction settles when the current price becomes lower than the aggregate value of accrued fees
- The first bidder to pay the current auction price can claim all assets in the FeeFlowController
- Bidders typically monitor fee values off-chain and transfer them just-in-time during settlement
-
Asset Management
- Some assets may remain in their respective markets if they're not worth the gas cost to transfer
- These assets can be included in future auctions
- The system is designed to be MEV-resistant and efficient
Example
If the protocol collects $10,000 in eUSDC fees, these are auctioned off. Bidders compete by offering EUL tokens. The winning bidders receive the eUSDC, and the EUL they pay is sent to the DAO treasury.
For more detailed information about the implementation and technical specifications, please refer to the Fee Flow repository.