Simple Base SwapSimple Base SwapOpen app
← All articles
Aug 28, 2026·5 min read

ERC-4626 Vaults Explained: How Onchain Yield Vaults Work

basedefierc-4626yieldsecurity
base

If you have looked at a DeFi app on Base and seen a button that says "deposit" into a vault, there is a good chance that vault follows a standard called ERC-4626. It is not a token you trade like a memecoin or an L2 gas token. It is a technical blueprint that lets different protocols build yield-bearing vaults the same way, so wallets and other apps can understand them without custom code for every single one.

This article explains what ERC-4626 actually does, how your deposit turns into "shares," and what to look at before you put funds into a vault that uses it.

What problem does ERC-4626 solve

Before this standard existed, every protocol that wanted to offer a yield vault (something you deposit a token into, and later withdraw more than you put in) built its own version of deposit and withdraw functions. That made it hard for other apps, aggregators, and wallets to interact with vaults automatically, since each one could work slightly differently under the hood.

ERC-4626 was finalized in 2022 as an extension of the familiar ERC-20 token standard. It defines one shared interface: functions like deposit, mint, withdraw, and redeem, plus the math that converts between the asset you put in and the shares you get back. Because the interface is standardized, a vault built by one team can be plugged into a dashboard, a router, or another protocol built by a completely different team, without special integration work.

Shares, not a fixed balance

The core idea in an ERC-4626 vault is that your deposit is not tracked as "you own X tokens." Instead, the vault itself issues its own ERC-20 token, usually called a share. When you deposit an asset such as USDC or ETH, the vault mints you shares in proportion to what you put in relative to everything already in the vault.

The relationship looks like this:

  • When you deposit: shares = the assets you deposit, multiplied by total shares outstanding, divided by total assets held by the vault
  • When you withdraw: assets = your shares, multiplied by total assets held by the vault, divided by total shares outstanding

As the vault earns yield (from lending interest, trading fees, staking rewards, or whatever strategy it runs), the total assets held by the vault grow, but the total number of shares does not. That means each share becomes worth a little more of the underlying asset over time. You do not receive extra tokens showing up in your wallet; instead, when you eventually redeem your shares, you get back more of the underlying asset than you deposited. This is similar to how a mutual fund share's price reflects the fund's growing value rather than paying out constant dividends.

How this differs from a liquidity pool

It is easy to confuse a yield vault with a liquidity pool, since both involve depositing tokens and receiving a receipt token back. The difference is what backs the value. A liquidity pool position (like the ones used in swaps) tracks your share of two paired assets, and its value moves with trading activity and the relative price of those two assets, which is where impermanent loss comes from. An ERC-4626 vault, by contrast, usually holds one underlying asset and directs it into a yield strategy behind the scenes, whether that is lending, restaking, or something else. The vault's share price is meant to only go up as yield accrues, not swing with a price ratio between two different tokens.

What to check before depositing

ERC-4626 standardizes the interface, but it says nothing about whether the strategy behind a specific vault is safe or sound. The standard itself does not audit code, guarantee a return, or protect you from a flawed strategy. A few practical things worth checking before you deposit into any vault, on Base or elsewhere:

  • Has the vault contract been audited, and is the audit report public and recent for the current version of the code?
  • What does the vault actually do with your deposit? A vault that lends to one borrower carries different risk than one spread across several established money markets.
  • Is there a withdrawal delay or lockup? Some vaults let you redeem shares instantly, others require a cooldown period.
  • How long has the vault been live, and does it have a meaningful amount of assets already deposited by other users? A brand new vault with almost no deposits carries more uncertainty.
  • Who can upgrade or pause the vault? Check whether the contract is owned by a single wallet or a multisig, since that affects how much trust you are placing in the team. See our article on upgradeable contracts and proxy patterns for more on this.

One known technical risk worth being aware of is what researchers call a share price manipulation, or "inflation," attack, where an attacker who deposits into an empty or very small vault can try to skew the exchange rate between shares and assets before other depositors arrive. Well built ERC-4626 vaults include specific protections against this, which is another reason an audit matters more than the label "ERC-4626 compliant" on its own.

The takeaway

ERC-4626 is a plumbing standard, not a promise of safety or return. It makes it easier for wallets and other apps to recognize and interact with yield vaults consistently, and it gives you a predictable way to reason about how your deposit is represented: as shares that grow in redeemable value rather than a token balance that changes directly. Understanding that mechanism is useful, but it is still on you to evaluate the specific vault, its strategy, and its track record before depositing any funds.

As always, none of this is financial advice. Treat yield as a variable outcome tied to real strategy risk, not a guaranteed return.

Ready to try it yourself?

Create a non-custodial wallet on Base in seconds. No account, no sign-up.

Open the web app