Skip to main content

Euler v2 Lite Paper - The Modular Lending Platform

By Euler Labs

Introduction

Euler v2 is a modular lending platform with two main components at launch: 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 three 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.

The three initial classes of vault are:

Core: is an opinionated vault class for creating governed lending products designed to provide risk managed, capital efficient lending and borrowing. Together, the Core vaults give rise to a lending product similar to Euler v1 or Aave v3, but with many new features designed to provide a better user experience, particularly for borrowers and traders.

Edge: is a more flexible standard for creating ungoverned vaults. Modular and designed to give users the freedom to create their own lending markets in a permissionless fashion, Euler Edge will form the base-layer for a more free-market approach to risk management. Edge vaults are isolated markets, similar to those in Kashi, FraxLend, or Morpho Blue. However, Edge vaults are more capital efficient, because they enable vault creators to allow borrowing against multiple collateral vaults at once, borrowing against yield-bearing collateral, and borrowing against collateral used by other Edge vaults.

Escrow: is a simple vault class for enabling any type of ERC20 token to be made available for use as collateral by other vaults. These vaults do not earn depositors any yield, because there is no lending and borrowing in an Escrow vault itself, but these vaults can be connected to an unlimited number of other vaults for use as collateral. Escrow vaults help protect lenders by ensuring collateral can always be accessed for liquidations if needed, and help protect borrowers by ensuring they can always close a position when needed, and can protect their collateral from those seeking to short-sell their tokens or use them to manipulate governance votes.

In addition to these products, the EVK lets more advanced users custom-build their own vaults outside of the Euler product specifications to suit their individual needs. Ultimately, the EVK is agnostic about oracles, interest rate models, governance, upgradability, and more. Advanced users could deploy Edge-like vaults with governance support or custom liquidation flows or real-world assets (RWAs) with compliance restrictions, for example. Developers could create their own Core-like lending product in parallel to the one governed by Euler DAO. Whatever type of vaults builders create, the important thing is that, thanks to the EVC and its modular approach, new vaults can always be connected to other vaults in the ecosystem.

On top of the new modular architecture, the EVK comes equipped with a range of other powerful new features designed to help users. Listed below are just some of the new features users can expect to see.

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.

Nested vaults

Vaults are usually tokenised by vault shares and these shares themselves present interesting opportunities for lending and borrowing. For example, a lender of USDC from Euler Core might additionally opt to lend their eUSDC vault shares to holders of a more exotic collateral asset. By lending their eUSDC tokens the lender earns additional eUSDC yield on top of the base USDC yield they are already earning from the main Core pool. The borrowers in this example can take eUSDC and withdraw USDC. Nesting vaults therefore enables lenders to opt-in to riskier collateral types or loan-to-value configurations without increasing the risk to other lenders, and enables borrowers access to pre-existing liquidity with novel collateral types. Such nested vaulting is typically ill-advised or not possible at all on other protocols, but because of Euler’s modular architecture, it’s not only possible, but safer and manageable for most users of the platform. Vault shares from Euler v2 can be more easily integrated into other types of protocol too, presenting intriguing opportunities for future innovation.

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 Edge vault for each major LST allowing all major LRTs as collateral.
  • Create a WETH Edge 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 Edge vault has the highest demand for borrowing of any vault in DeFi.

Leveraged liquidity provision

  • Create a WETH Edge vault and a LST Edge 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 Edge 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.

Long positions on long-tail assets

  • Create an nested Edge vault allowing lending and borrowing of eUSDC tokens from the USDC Core vault to more longer-tail collateral types, such as CRV.
  • Use-case: CRV depositors borrow eUSDC tokens and withdraw the USDC. If they want, they can then swap USDC to CRV, and repeat, giving a long-position on CRV.
  • Consequence: nesting vaults allows holders of longer-tail collateral types such as CRV to borrow against their assets or go long, whilst allowing depositors in the USDC Core market to opt-in to riskier collateral types and earn more yield only if it suits them.

Margin-trading real-world assets

  • Create an Edge vault for USDC allowing a high-yielding RWA 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 Edge vaults that can use any other vault in the broader ecosystem as collateral, including governed vaults from a more capital efficient Core. 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 Alberto Cuesta Cañada, Christoph Michel, and StErMi for helpful feedback on some of the mechanisms described herein.