If you’ve been following the right circles on Twitter, or caught the UpOnly podcast with Tetranode, you may have heard of ERC-4626. But what is it? In plain English, ERC-4626 is a standard interface to be implemented by yield-bearing tokens.
99% of the time, the user is not going to know or care whether their token conforms to ERC-4626 or not. Essentially all tokens you interact with today conform to the ERC-20 standard. The only reason you might already know this is that “ERC-20” is used as the common name for “tokens you can move around on Ethereum“. While simple in concept, under the hood the ERC-4626 standard will enact powerful changes.
Why Do We Need ERC-4626?
There are a lot of different protocols where the underlying idea is to deposit token A into the vault, and receive back a vault token. Examples include Yearn (yDAI, yWETH), Sushi (xSUSHI), and Ohm (gOHM), to name just a few.
The token you receive back is not just an IOU from the protocol that lets you take your money back out. It represents both your underlying funds and your claim on the vault’s increase in value.
When these tokens are composable – meaning they can be easily used by other protocols – you can do things with your money that are ordinarily not available to you as a private citizen. A simple use case of this is borrowing against your future yield. Protocols are implementing increasingly complex webs of interoperable products.
ERC-4626 ensures composability between different protocol’s implementations of vault tokens. Currently, everyone implements things a little differently depending on the protocol’s needs or developer’s preference.
If you, as a protocol, want to launch a new product integrating with a different protocol’s tokens, you have to understand the subtle differences in their implementation, modify your code to work with it, test, audit your new product, and finally launch.
This leads to incompatibility, security weaknesses, and wasted developer effort. It slows protocols down. Blindly using tokens from other protocols without understanding their unique implementation can lead to exploits.
How does ERC-4626 Work?
Under the hood, ERC-4626 is very simple. I won’t do a detailed code review, the EIP is available here. Note that this is an interface, not an implementation. Users can implement this standard however they want, and protocols can automatically interact with it as long as the implementation complies to the interface.
This standard extends ERC-20 tokens, so vault tokens must comply with that interface as well. At a high level, it standardizes:
- The way users deposit and withdraw to the vault
- The functions to calculate the amount of vault token and underlying token required for deposits or withdrawals
- An interface to determine the underlying token
- Events emitted when interacting with the vault
This simple, yet powerful list of features has the potential to yield massive improvements behind the scenes.
What’s next?
This standard has attracted a lot of attention from protocols offering tokenized vaults. Tribe DAO and Rari Capital are both confirmed to be developing for the standard. Tribe founder Joey Santoro is the lead author of the EIP. Adoption outside these protocols will likely await the full release of the standard.
The EIP is currently under review and will likely be adopted once it passes. Once adopted, the Cambrian Explosion of tokenized vaults can begin…