Skip to content

Latest commit

 

History

History
158 lines (103 loc) · 9.62 KB

whitepaper.md

File metadata and controls

158 lines (103 loc) · 9.62 KB
title description
Euler Earn
An open source protocol for permissionless risk curation on top of ERC4626 vaults

Euler Earn whitepaper

Mick de Graaf & Haythem Sellami.

Introduction

Euler Earn is an open source protocol for permissionless risk curation on top of ERC4626 vaults (strategies). Although it is initially designed to be integrated with Euler V2 vaults, it supports any other vault as long as it is ERC4626 compliant.

Euler Earn itself is an ERC4626 vault, risk curators can deploy one through the factory. Each Earn vault has one underlying asset and can allocate that asset's deposits to multiple strategies.

Euler Earn vaults are noncustodial, immutable, and offer users an easy way to provide liquidity and passively earn yield.

Motivation

Euler V2 is a lending and borrowing protocol built on top of the EVC primitive and using the Euler Vault Kit, prioritising modularity, efficiency and flexibility. On Euler V2, lenders must consider many technical factors, including the types of collateral accepted, loan-to-value ratio, the oracles used, supply and borrow caps, the type of vault (borrowable, escrow), and so on. For that reason, interacting with lending vaults directly is more suited to sophisticated and knowledgeable lenders than to passive ones. Euler Earn helps solve this challenge by providing an easier way for lenders to gain access to passive yield, by externalising risk-management to trusted vault governors who manage their deposits on their behalf.

Permissionless yield aggregation & risk management

Any risk curator can use the factory to create a Euler Earn vault, including DAOs, protocols, risk experts, funds or curious developers. Anyone can leverage the permissionless infrastructure to provide users with a simple passive yield earning experience.

Core concepts

Strategy

An ERC4626 compatible contract in which the Euler Earn vault will deposit assets. A single Euler Earn vault can have many strategies.

A strategy can be any ERC4626 compliant vault:

  • Euler V2 lending protocol vaults
  • Yearn V3 vaults
  • MetaMorpho vaults
  • Sky/Maker Savings Rate vaults.

The strategy with address zero is used as a cash reserve.

Cash reserve

An amount of the total deposited assets not allocated to any strategy, and used as the first source of liquidity during withdrawal. The amount to set as cash reserve is decided based on the allocation points set for the cash reserve strategy.

Allocation points

Each strategy gets assigned allocation points, including the cash reserve strategy. During strategy rebalance, the amount of asset to allocate is calculated based on its allocation points.

Rebalance

The user's deposited assets are allocated across the Euler Earn vault’s strategies through rebalance. When executing a rebalance, Earn vault will deposit more assets to the strategy or withdraw from it based on its current and target allocation amounts.

Only an address that has the Rebalancer role can execute a rebalance operation.

Strategy allocation cap

An address with the Guardian role can set a cap on the amount of asset that can be allocated in a certain strategy.

If a cap is set for a strategy, that cap will be the max amount that can be allocated for that strategy during rebalance.

Harvest

Harvesting the strategies is required to count for accrued yield, and this is executed everytime withdraw/redeem operation is called, during rebalance, and can be directly executed in a permissionless way by any user.

During harvesting, the Earn vault loops through all the strategies to execute the harvest of each individual strategy and calculate the net yield amount. The harvest flow happens according to the order of the strategies in the withdrawal queue.

In case of net positive yield, a performance fee is accrued, if applicable. In case of negative net yield, a loss deduction mechanism is applied.

Performance fee

An Earn vault's manager can set a performance fee that will be accrued on every harvested net positive yield. The fee amount will be converted to vault shares and minted to the fee recipient address. By default, the performance fee is set to 0%, and is capped to 50%.

Loss deduction

A loss deduction mechanism is applied in the case of harvesting a net negative yield amount. The net negative yield amount will be first deducted from the interest left to accrue, if that's not enough to cover the loss, the rest will be socialised across depositors.

Yield gulping & interest accruing

Harvested positive yield is not instantly added to the Earn vault total deposits, instead, it gets gulped as an interest to be distributed (smeared) along a smearing period (determined by the Earn vault creator), and that prevents sudden jumps in the euler earn vault’s exchange rate.

Withdrawal queue

A queue of the added strategy addresses, mainly used during yield harvesting and executing withdrawal requests from the Earn vault. Strategies are pushed into the withdrawal queue and removed from it when the add or removing strategy operation is called.

Strategy addresses in the withdrawal queue can be re-ordered by the address that hold the withdrawal queue manager role. This can be used to position the strategies with the biggest allocations in the beginning of the withdrawal queue array to provide big depositors a cheaper withdraw operation.

Roles

Governance over an Euler Earn vault can be granularly managed. Both fully ungoverned or completely governed are easily achieved through access control management. An Euler Earn vault can have different managers each serving a specific role. Setting up the vaults can be set in a manner which makes sure no entity is able to take user funds from the vault. Each role has their own specific Admin role, the holder of the Admin role can assign the role. The Default Admin role has ownership of all other admin roles.

  • Default Admin:
    • Manages admin roles, including itself.
  • Strategy Operator:
    • Add a strategy.
    • Remove a strategy.
  • Euler Earn Manager:
    • Set performance fee and recipient.
    • Opt in & out from the underlying strategy rewards stream, including enable/disable and claiming rewards.
    • Set hooks config.
    • Skim any ERC20 token other than the vault's asset and the strategies shares, to a specific recipient.
  • Withdrawal Queue Manager:
    • Re-order withdrawal queue array.
  • Guardian:
    • Set strategy cap.
    • Adjust strategy allocation points.
    • Set strategy as Emergency or revert it back to Active status.
  • Rebalancer:
    • Execute rebalance operation.

euler-earn-roles

Strategy emergency status as circuit-breaker

In case of a faulty strategy that has already been allocated funds, the Guardian can set that strategy status as Emergency, therefore the Earn vault will be functioning as expected, without taking into account that specific strategy when executing a harvest or rebalance.

When a strategy is set as Emergency, the strategy allocated amount is no longer available for the Earn vault and the depositors, therefore the same loss deduction mechanism as when harvesting a net negative yield is applied, that amount gets deducted from the total allocated amounts, and accounted as a loss.

The Guardian can toggle the strategy status back to active anytime. At the time of changing a strategy status from Emergency to Active, the Earn vault balance in that strategy will be stored as the allocated amount, and will added to the total allocated amount. Therefore, that amount will be instantly available to gulp and smeared as interest to depositors.

Native ERC20 votes

Euler Earn vault natively integrates with ERC20Votes contract to support Compound-like voting and delegation, therefore the shareholders of an Earn vault can use their shares as voting power in the vault governance.

Immutability, management and fees

Euler Earn is a robust and flexible protocol, providing an immutable set of contracts and a set of parameters for vault creators to configure.

The core contracts are fully immutable, where the set of parameters to configure are governed by the different roles owner, as explained above. Additionally, risk curators can provide a fully immutable experience by revoking access to the roles mentioned above.

Euler DAO does not take fees on Euler Earn Vaults, but Earn vault owners can set a performance fee for themselves. The maximum performance fee is 50%.