Euler v2 Lite Paper - The Modular Lending Platform
By Euler Labs
Introduction
Euler v2 is a modular lending platform comprising two main components: 1) the Euler Vault Kit (EVK), which empowers builders to deploy and chain together their own customised lending vaults in a permissionless manner; and 2) the Ethereum Vault Connector (EVC), a powerful, immutable, primitive which give vaults superpowers by allowing their use as collateral for other vaults. Together, the EVK and EVC provide the flexibility to build or recreate any type of pre-existing or future-state lending product inside the Euler ecosystem.
As DeFi evolves, Euler’s modular design, with an immutable primitive at its foundation, enables it to scale and continuously grow without limits. Euler v2 provides a best-in-class experience for lenders and traders alike, by providing unparalleled access to diverse risk/reward opportunities, new collateral options, lower net borrowing costs, advanced risk management tools such as sub-accounts and profit and loss simulators, custom-built limit order types (including stop-loss and take-profit), and greatly reduced liquidation costs.
Euler Vault Kit (EVK)
At the product layer, Euler v2 is a system of ERC-4626 vaults built using a custom-built vault development kit, called the EVK, and chained together using the EVC. The vault kit is agnostic about governance, upgradability, oracles, and much else. Different vault classes support different use-cases, giving users freedom through choice and modularity. Euler v2 will launch with several initial classes of vaults built on the EVK. Builders can customise and integrate these as they wish, or design their own vaults with just a few clicks.
Escrowed collateral vaults hold deposits that can be used as collateral for taking out loans from other vaults, but do not earn their depositors interest because they do not allow borrowing. They are ungoverned.
Governed vaults hold deposits that can both be used as collateral and borrowed, earning depositors additional yield. A DAO, risk manager, or individual manages these vaults, controlling risk, interest rates, loan-to-value, and other risk parameters. They are suited for passive lenders who trust the governor's management.
Ungoverned vaults have fixed parameters with no active governor to manage risk, making them suited to lenders who prefer to manage their own risk. They come in two types:
- 0x ungoverned vaults have zero exposure to governance through their collaterals
- nzx ungoverned vaults have non-zero exposure to governance because they may accept collateral with governance exposure
Yield aggregator vaults are a special class of governed vaults that aggregate passive lender assets that can be directed by the vault governor to flow into any underlying ERC4626 vault, including both ungoverned or governed Euler vaults, but also external vaults like sDAI. The vault governor manages risk/reward by altering flows into underlying vaults with different properties.
Synthetic assets
The modular architecture of Euler v2 enables not only vanilla lending and borrowing via vaults, but also the creation of collateralized debt positions and synthetic assets. These can benefit from deep collateral liquidity inside Euler, advanced risk management and trading features provided by the EVC, and be bolstered by FeeFlow (see below). As well as synthetic assets already planned for governance by Euler DAO, the architecture of Euler enables the creation of a product class where new synthetic assets can be created in a permissionless fashion. More will be revealed about Euler synthetics in the near future.
Reward Streams: permissionless rewards without staking
RewardStreams is an innovative open-source module empowering projects to seamlessly stream rewards to users of new markets in a permissionless manner. This module is a robust and adaptable implementation of the billion-dollar algorithm, enabling the simultaneous distribution of multiple reward tokens.
Unlike traditional methods, users can subscribe to receive their preferred rewards without the need to transfer their vault shares to a staking smart contract. This unique feature allows suppliers to earn rewards while concurrently taking out loans, presenting a dynamic and efficient approach to incentivizing and engaging users.
Fee Flow: reverse Dutch auctions for fees
FeeFlow is a new and powerful open-source module that provides the Euler DAO with greater control over fees generated on Euler markets, maximising ecosystem growth. This powerful tool enables the auctioning of fees to accumulate assets such as ETH, stETH, USDC, or potentially even EUL, amplifying the DAO's financial flexibility. Alternatively, these fees can be utilised to acquire DAO-backed synthetic assets, providing organic demand and helping to stabilise the asset. In this scenario, the synthetic asset becomes a valuable instrument within Euler's market ecosystem, creating new and diverse trading opportunities
FeeFlow employs a reverse Dutch auction mechanism, periodically auctioning off fees by systematically reducing the auction price as fees accumulate. In Euler v2, vault creators can set fees, ensuring a passive income stream while sharing a portion with the Euler DAO in a decentralised, efficient, and MEV-resistant manner. This innovative approach enables the DAO to convert fees from various assets into a unified, accumulated token.
Free Market Liquidations
Euler v2 allows more advanced vault creators to customise and design their own liquidation flow, but the EVK comes equipped with Euler v1’s innovative reverse Dutch auction liquidation flow as standard. This mechanism was popular with borrowers and traders on Euler v1, where bonuses for liquidators on large loans were <0.7%, the cheapest of any DeFi lending protocol. This not only protects borrowers, but also helps protect lenders by maintaining the solvency of pools. Ultimately, the less collateral paid to MEV bots by borrowers, the better.
Ethereum Vault Connector (EVC)
The EVC is an interoperability layer and powerful primitive enabling vault creators in the Euler ecosystem to bootstrap new lending products easily by connecting vaults together and recognizing existing deposits in far away vaults as collateral. Whilst a key module inside Euler v2, the EVC is an open-source project supported by Euler Labs that anyone can launch products on. The white paper and development documentation can be found at evc.wtf.
One of the goals of the EVC is to abstract away many of the features common to all credit-based protocols in order to let developers focus on product features tailored to specific types of users. In this way it helps developers build their own lending protocols, stablecoins, yield aggregators, margin trading apps, and much else. In the long run, it is expected to usher in a wave of innovation in lending as it supports lending products backed not only ERC20 tokens, but also irregular asset classes, such as RWAs, NFTs, IOUs, synthetics, and more. Growth of vaults designed to work with the EVC expands the Euler ecosystem and leads to more flexibility for lenders and borrowers alike. This leads to higher yields and powerful network effects over the long term.
Account Managers for advanced trading and risk management
For developers building on the EVC, it provides a range of important features for more advanced users of lending protocols out of the box. These include multicall-like batching, flash liquidity for efficient refinancing of loans, simulations, gasless transactions, and more.
One of the powerful features of the EVC is account manager functionality implemented through a smart contract called an operator. Operators can be smart contracts or EOAs that can be delegated responsibility to act on a user’s behalf. Amongst other use cases, this feature can be used to implement advanced trading and risk management strategies, including conditional orders like stop-loss and take-profit, custom liquidation flows, or intent-based systems. Developers can build their own operator smart contracts to implement risk management and position automation strategies and make them available to users as separate products.
The EVC is a multicall contract with a special user authentication layer. It allows any external contracts to be called without needing adaptor contracts. This not only means that all the functionality is accessible to both EOAs and smart contract wallets, but also allows for limitless expansion of the ecosystem through the development of new EVC-compatible products in a permissionless fashion.
Although the EVC allows only one outstanding liability at any given time, it provides each address with 256 virtual addresses (“sub-accounts”), which provide a gas-efficient way for users to isolate and manage risk without the need to maintain multiple separate wallet accounts.
Collateral direct from a user’s wallet
An alternative path to creating a collateral-only asset is to create an ERC20Collateral token, which is a simple extension to the ERC20 token standard to enforce compatibility with the EVC. Project making use of this extension can unlock an entirely new wave of composability. Users are no longer required to deposit their tokens into vaults in order to use them as collateral, they can do so directly from their wallet. This helps them retain their governance rights and other token privileges, whilst also helping avoid generating unnecessary taxable events.
Whenever the user's balance decreases (outgoing transfer/token burn), the token contract calls into the EVC to check whether the outstanding loan rules are not violated. With an addition of a simple modifier which routes transfer calls through the EVC, mentioned account status checks can be deferred until the end of a batch of multiple operations, allowing a user to freely use their tokens within a batch as long as their account is solvent at the end. ERC20Collateral also makes the token compatible with EVC sub-accounts system out of the box.
Use-cases and examples
Leverage by chaining LRT/LST/ETH vaults
- Create an vault for each major LST allowing all major LRTs as collateral.
- Create a WETH vault that allows each of those major LSTs and each of the LRTs as collateral.
- Use-case: LRTs depositors borrow LSTs, and LRTs + LSTs depositors borrow WETH, swap, re-deposit, and leverage their yield. Consequence: this special Euler WETH vault has the highest demand for borrowing of any vault in DeFi.
Leveraged liquidity provision
- Create a WETH vault and a LST vault that allow WETH/LST LP as collateral.
- Use-case: LP token holders borrow more WETH and LST against their LP tokens and deposit into an AMM to get more LP tokens.
- Consequence: LP token holders can leverage their LP positions whilst using simple, gas-efficient AMM protocols.
Impermanent loss hedge
- Create a WETH/USDC LP token vault that allows WETH and USDC as collateral.
- Use-case: WETH and USDC token holders can borrow LP tokens to hedge or go short.
- Consequence: LP token holders earn additional yield on their tokens, helping compensate against impermanent loss.
USD carry trades
- Create a custom vault pair that allows USDC to borrow USDT, and USDT to borrow USDC on high leverage.
- Use-case: if USDC APY is higher than USDT APY, users can deposit USDC, borrow USDT, swap to USDC, and re-deposit to carry out a carry trade.
- Consequence: users can hedge exposure to stablecoin depeg risk, carry out interest rate arbitrage, and profit from carry trades.
Margin-trading real-world assets
- Create a vault for USDC allowing a high-yielding RWAs as collateral, using hooks to enable secondary-transfer restrictions to be observed.
- Use-case: RWA depositors borrow USDC at lower yield, swap to more RWA, and re-deposit, looping to go long.
- Consequence: Margin trading on real-world assets as RWA depositors can leverage their yield and earn the interest rate spread on leverage
Long-term picture
The ability to lend and borrow digital assets is the foundation on which DeFi is built. Lending protocols are typically composed with decentralised exchanges (DEXs) in order to hedge risk and construct leveraged positions. In this way, borrowers pay interest to lenders, forming the foundation for capital markets in DeFi. Whilst lenders today have many options from which to earn sustainable and passive forms of yield, the trading experience for borrowers and traders remains remarkably poor.
Monolithic lending protocols restrict borrowing with limited asset selections and conservative, one-size-fits-all loan-to-value (LTV) requirements, and then punish traders with heavy fines when they face liquidation. Meanwhile, isolated lending markets offer more flexibility, but often fragment liquidity and increase net costs for traders by disallowing rehypothecation and therefore extra yield on collateral. Moreover, in many cases traders are forced to navigate multiple protocols, governance systems, and user interfaces, paying leveraged fees to each along the way. Together, these market constraints and inefficiencies mean that many traders end up turning to CeFi platforms and relying on perpetual futures markets to put on trades, rather than using decentralised spot markets. This means lower yields for DeFi lenders and, consequently, lower liquidity in less capital efficiency in DeFi across the board.
Euler v2 is a modular lending platform that aims to fix these problems and become the primary liquidity layer for DeFi. Monolithic lending protocols like Aave v3 help foster greater capital efficiency because they pool collateral used for different purposes together and enable rehypothecation. However, they only allow new collateral types to be added under restrictive economic conditions and typically only via governance actions. Isolated lending protocols like Compound v3 or Morpho Blue tend to allow greater flexibility in collateral use, but tend to fragment collateral and prevent rehypothecation, leading to lower capital efficiency.
Euler’s modular architecture helps to solve the liquidity fragmentation problem associated with isolated pools by allowing permissionless creation of vaults that can use any other vault in the broader ecosystem as collateral. This ability to connect together different types of vaults from different product lines via the EVC provides unparalleled flexibility and modularity for lenders, borrowers, builders, traders, and more.
Thanks to the modular design of the system, this can all be achieved without compromising on security or risk management. Vault-chaining via the EVC promises to enable new yield opportunities available nowhere else in DeFi today. With time, whole new product lines can be innovated and brought into the ecosystem helping to power vast network effects. Real-world assets, non-fungible tokens, IOUs for un-collateralised lending, peer-to-peer lending, oracle-free lending, and much more, are all possible directions for the growth of the ecosystem. With this design, together with other developments yet to be announced, Euler aims to become a global liquidity layer and one-stop shop for lending, borrowing, and trading on EVM-based networks.
Acknowledgements
With special thanks to Certora, Alberto Cuesta Cañada, Christoph Michel, and StErMi for helpful feedback on some of the mechanisms described herein.