ERC-4626

Tokenized Vault Standard

ERC-4626 is an implementation of a standard API for tokenized vaults representing shares of a single underlying token. This standard is an extension of the ERC-20 token standard that provides basic functionality for depositing and withdrawing tokens and reading balances.

The problem

Tokenized vaults on Ethereum aren't actually a new thing. Protocols like Yearn allow you to deposit your tokens into vaults and earn a yield on those tokens while they are deposited.

Other protocols achieve this in a similar way with their borrowing and lending contracts. What all of these protocols have in common is that at deposit time the user receives a vault token in return for the underlying asset. This vault token acts as a kind of IOU, and for some of these protocols, the user actually accrues more quantity of the vault token compared to the underlying asset staked over time. When the user wants to retrieve their original underlying asset it just exchanges the vault token and gets the original asset back.

The problem with these protocols is that there was no unifying standard. There's a lot of talk in the DeFi space about supporting composability composable with money legos, but it's very hard to build things from different protocols if these money legos don't actually fit together.

The solution

ERC-4626 is a game changer that attempts to solve this problem.

So again, what are vaults? Vaults are simply smart contracts and their purpose is to accrue yield as you lock your tokens inside. Each vault can have its own strategy for accruing yield but that's just an implementation detail.

An example would be depositing your DAI into a vault and receiving eDAI in return. Over time, as your DAI accrues value, the user is able to redeem more DAI in exchange for the same amount of eDAI it has. eDAI would be an example of the actual vault token or yield-bearing token. A yield-bearing token represents the shares of fractional ownership of the overall pool of DAI locked in the contract. If the amount of assets in the vault grows then the value of the user's yield-bearing token increases due to the user owning his stake in this pool.

How it works

ERC-4626 lays out a standard interface that every tokenized vault should adhere to. Firstly, every tokenized vault should be an ERC-20 token by default. On top of that, ERC-4626 adds a series of functions that can be called on this contract.

For example, the totalAssets() function returns the total amount of the underlying assets managed by the vault. Other functions such as convertToShares() lets users know how many yield-bearing tokens they will get in exchange for a certain amount of assets. The convertToAssets() function does just the opposite.

The actual standard is pretty lengthy but you can see all the details in its Ethereum Improvement Proposal (EIP).

In conclusion, this new standard is quickly being adopted by many new protocols like Exactly, and we can expect to see a number of huge benefits in the DeFi space:

  • Huge increase in interoperability.

  • Drastically reduce development time when integrating with other protocols.

  • Helps with security as everybody is basically coding to the same standard, and auditors know what to look at.

Last updated