Governance
Developers
Community
Explore
Blog
Fee Flow: Euler's Approach To Navigating Fee Accumulation

Traditionally in DeFi, protocols have commonly directed accumulated fees straight into their treasury. However, this approach has revealed itself to be suboptimal, requiring active treasury management to consolidate all assets into a single currency.

The conversion of fees into a single asset has been riddled with challenges, leading to issues such as MEV extraction, dependency on oracle services, and the necessity for ongoing oversight.

This blog aims to explain Fee Flow, Euler’s approach to solve this and compare it to other old and new solutions.

Building on the shoulders of giants

With DeFi being powered mostly by open source software and mechanisms it gives us the great opportunity to be inspired and build upon what is already out there. I hope Fee Flow will also be build upon and possibly inspire builders to come up with new mechanisms which suit their specific requirements.

Next up, we’ll explore the range of fee conversion techniques, past and present.

Yearn’s Strategic Buyback Initiative

To date, Yearn Finance has successfully repurchased 1,331 YFI tokens, a total of $23,829,790 through its DAI buyback contract. The mechanism by itself is simple and elegant, enabling any entity to exchange DAI for YFI at rates set by the USD/YFI Chainlink oracle. The YFI expended in this process is then allocated to Yearn’s treasury.

However, there are some challenges to note:

  • The protocol supports conversion for only one type of fee asset.
  • It depends on a Chainlink oracle for price determination, both for the fee asset and the target conversion asset.
  • It is susceptible to Oracle Extractable Value (OEV) due to real-time asset conversion based on the current oracle price.
  • It is limited to transactions involving solely YFI tokens.

SushiSwap’s Auction Maker

Also an ingenious approach, SushiSwap's Auction Maker allows for LP token fees to be converted by any address. It permits the initiation of an English auction for any underlying token, with bids being placeable until a predefined maximum duration is reached. Once enough time has elapsed post the final bid, any participant can close the auction, distributing the proceeds to Sushi token stakers.

Challenges:

  • The English auction model is gas-intensive.
  • Bidding locks funds, rendering the system incompatible with flash loans.

MakerDAO’s DAI Surplus Auction Transition

Retired in July 2023, MakerDAO phased out its DAI surplus auction in favor of the innovative Smart Burn Engine. Previously, surplus DAI generated from interest accrual — beyond the reserve kept against bad debt — was auctioned off for MKR, which was then burned.

Mechanism:

  • Traditional English auction mechanics, auctioning fixed-sized lots of DAI.

Challenges:

  • Incompatibility with flash loans due to the requirement to lock up bids.
  • High gas consumption.
  • Restriction to DAI tokens only.

MakerDAO’s Smart Burn Engine

This new mechanism sells excess DAI for MKR/DAI Uniswap v2 LP tokens, marking a strategic evolution from surplus auctions. When a surplus of DAI is identified, the contract facilitates the conversion of a “lot” of DAI into MKR/DAI liquidity on Uniswap v2, thereby minting LP tokens for the Maker treasury. This process mitigates slippage by referencing a price oracle for MKR purchases.

Potential drawbacks:

  • Exclusivity to DAI tokens.
  • Dependence on a price oracle for value assessment.

Uniswap V3FactoryOwner

The recently open-sourced V3FactoryOwner contract introduces a framework for UNI token holders to earn rewards by staking their tokens. Rewards are generated from protocol fees, with the V3FactoryOwner contract claiming these fees from the Uniswap V3 factory on behalf of stakeholders.

Mechanism:

  • The contract enables fee claims from specified pools, rewarding callers with a governance-determined token amount, which is then distributed to UNI stakers.

Potential drawbacks:

  • The fixed payout amount leads to irregular intervals for converting pool fees into rewards, possibly omitting pools that do not meet the threshold.
  • A low payout amount could elevate gas costs, affecting the profitability of fee conversions.
  • Separating fee collection from reward token conversion might enhance efficiency, suggesting an adjustment to payout amounts based on underlying assets rather than pools.

And then there was Fee Flow

For Euler we wanted to build a simple and elegant solution which is able to convert a wide variety of assets into a single asset. Oracle based approaches were not suitable as not all assets would have an oracle and it would be prone to MEV value extraction.

In Euler’s Fee Flow, different tokens from different contracts are automatically sent to the contract without the need for explicit notification.

At deployment the following parameters are set:

  • initPrice: Sets the starting price for the inaugural auction.
  • paymentReceiver: Designates the recipient for the auction payments.
  • epochPeriod: Defines the duration over which the auction’s starting price trends towards zero.
  • priceMultiplier: Determines multiplier at which the next auction is started when the previous is settled.

The system operates through a series of continuous Dutch auctions, run back to back. Each auction begins at a starting price calculated as “settlePrice * priceMultiplier.” Upon concluding an auction, all purchased assets are transferred to an address defined by the buyer.

The frequency and predictability of auctions are designed around the epochPeriod and priceMultiplier, suggesting that, with consistent fee inflows, the settlement of auctions will approximate the ratio of epochPeriod to priceMultiplier.

This approach ensures that even minimal amounts are efficiently converted into the target asset while simultaneously reducing the exposure to MEV.

This approach isn’t without its limitations, since the contract does not oppose a limit on the number of tokens it sells, potentially block gas limits would cause it not being able to send and potentially swap all tokens which are in the contract.

Conclusion

Our goal for Euler’s Fee Flow is to provide a simpler, more efficient, and MEV-resistant method for converting various assets. As DeFi progresses, we hope this design helps improve existing protocols and create opportunities for effectively managing protocol fees.

This piece is provided by Euler Labs Ltd. for informational purposes only and should not be interpreted as investment, tax, legal, insurance, or business advice. Euler Labs Ltd. and The Euler Foundation are independent entities.

Neither Euler Labs Ltd., The Euler Foundation, nor any of their owners, members, directors, officers, employees, agents, independent contractors, or affiliates are registered as an investment advisor, broker-dealer, futures commission merchant, or commodity trading advisor or are members of any self-regulatory organization.

The information provided herein is not intended to be, and should not be construed in any manner whatsoever, as personalized advice or advice tailored to the needs of any specific person. Nothing on the Website should be construed as an offer to sell, a solicitation of an offer to buy, or a recommendation for any asset or transaction.

This post reflects the current opinions of the authors and is not made on behalf of Euler Labs, The Euler Foundation, or their affiliates and does not necessarily reflect the opinions of Euler Labs, The Euler Foundation, their affiliates, or individuals associated with Euler Labs or The Euler Foundation.

Euler Labs Ltd. and The Euler Foundation do not represent or speak for or on behalf of the users of Euler Finance. The commentary and opinions provided by Euler Labs Ltd. or The Euler Foundation are for general informational purposes only, are provided "AS IS," and without any warranty of any kind. To the best of our knowledge and belief, all information contained herein is accurate and reliable and has been obtained from public sources believed to be accurate and reliable at the time of publication.

The information provided is presented only as of the date published or indicated and may be superseded by subsequent events or for other reasons. As events and markets change continuously, previously published information and data may not be current and should not be relied upon.

The opinions reflected herein are subject to change without being updated.

2024 Euler © All Rights Reserved