Introduction
This report is the first in a series designed to provide development updates and source feedback from the DAO ahead of the launch of Euler v2. It also outlines the development of new protocols being developed by Euler Labs designed to utilise or otherwise support Euler v2.
The mission for Euler is to build an integrated suite of customisable and permissionless protocols that, together, provides users with the highest performance environment in which to exchange value across all of decentralised finance.
The first of the protocols designed to support this mission is a new type of primitive and public good called Credit Vault Protocol (CVP), where users can create and deploy their own flexible Credit Vaults (CVs) in a permissionless manner. CVs will be permissionless to create, highly customisable by the creator, and can be used as building blocks to construct a wide variety of sub-protocols.
To showcase the flexibility and power of this protocol, we propose to develop three new sub-protocols on top of the CVP:
- Euler v2 - a new risk-averse base lending and borrowing protocol other protocols can inherit liquidity/yield from
- Isomorph* - a new synthetic asset protocol, initially supporting both USD and ETH denominated stablecoins
- Levr* - a new decentralised exchange and oracle protocol tightly integrated with Euler
*final name to be determined. More information on each of these protocols will be provided in future development updates. The focus of this report is to give a high-level outline of the CVP and its purpose in supporting the development of Euler v2. Any feedback or suggestions at this stage would be much appreciated.
Credit Vault Protocol
The Euler V1 core was flexible and efficient, but it was monolithic. Adapting it to all the possible use-cases and products that people desired was complicated. The interdependent nature of the markets left little room for experimentation, and the mechanisms for third-party integrations were limited.
We have distilled the core functionality required for a lending market, or really any credit-based market, into a minimal specification called the Credit Vault. These vaults are standard ERC-4626 contracts (see erc4626.info) that implement a small additional interface for interacting with other vaults via the Credit Vault Protocol (CVP).
The CVP is a permissionless smart contract based on the original Euler BaseLogic and Exec module that will be the foundation for, among other things, a rebuilt Euler V2 lending platform. However, we consider the CVP to be something of a public good, and believe it can be a common substrate for other teams and products to build upon, creating synergistic benefits for the entire DeFi ecosystem.
In addition to vault mediation, the CVP contains the functionality required to build flexible products, both for EOAs and smart contracts. Here are some of the benefits of building on the CVP:
- Batching. Multiple operations can be performed within a single batch operation, even those that concurrently affect multiple vaults. This is more convenient for UI users (no need for smart wallets), more gas efficient, and allows deferring liquidity check until the end of the batch (for flash rebalancing, setting up leveraged positions, etc).
- Simulations were a prized feature of the Euler V1 UI. The CVP exposes the optimal interface for simulating the effects of a set of operations and pre-visualising their effects in a UI.
- Sub-accounts were also a widely appreciated feature of Euler V1. They allowed users to create multiple isolated positions within their single parent account, and easily rebalance collateral/liabilities between them (no approvals needed). The CVP will allow users of any participating protocol to use sub-accounts, without requiring any special logic to be implemented by vaults.
- Operators allow users to attach external contracts to act on behalf of a sub-account. This is a generalisation of the E/DToken approval system and will unlock powerful functionality, even for EOAs. We have sketched out many possible use-cases to ensure that this system is fully general. For example, stop-loss/take-profit/trailing-stop/etc modifiers can be added to positions, or entire layered position managers such as Morpho can be built on top.
- The protocol deliberately doesn’t enforce specific properties about the assets being used as collateral or liabilities. Protocol users can therefore create vaults backed by irregular asset classes, such as NFTs, uncollateralised IOUs, or synthetics.
- As well as the primary liquidity enforcement interface, there is a set of optional hooks that vaults can implement such as a market status check. This allows vaults to enforce global-concern limits such as supply caps. These checks can also be deferred so that transient violations that are gone at the end of the transaction do not cause a failure.
- A common language for liquidations. If vaults choose, they can implement a core liquidation interface that will allow them to rely on an existing network of liquidators to keep their depositors safe.
- The CVP has been carefully designed to support nested vaults without exposing a reentrancy-based attack surface. This will allow Credit Vaults to be used as the underlying asset for other Credit Vaults. Among other things, this will provide the basis for a “base yield” feature of Euler V2 where low-risk assets can optionally be used as components of higher-yielding products.
As well as providing the above features to a common base ecosystem, their re-use also keeps a substantial amount of complexity to be kept out of the core lending/borrowing contracts, leaving them free to focus on their differentiating factors such as pricing and risk management.
Given the consolidation and network effects of lending markets, we feel that the most realistic path to unseating incumbents is an open base layer protocol that a community can be built around. Euler will lead by example by creating a standout platform on top of this base, and the DAO and token holders will have the advantage and benefits of managing the largest liquidity pools on this base, while promoting their repackaging into different third-party products that leverage the CVP infrastructure, common liquidator/keeper network, and Euler V2 base rates and liquidity depth.
Timeline
Much of the code for the CVP has already been written and is now undergoing an internal audit in collaboration with various security partners. There is no definitive timeline for launch, but we expect to release the code for public review and further auditing well ahead of any initial deployment.
Partners
We would love to get feedback from the DAO and support identifying potential users of the CVP beyond Euler. In particular, it would be good at this stage to begin discussing potential use-cases of the CVP with community groups and other builders, such as https://twitter.com/erc4626.