All articles
IntermediateDeFi

Vaults and Escrows: Where Your Crypto Actually Sits

You deposited into a 'vault.' What is that actually? Smart contract patterns that hold billions, explained without the buzzwords.

June 4, 2025
5 min read

Dive Deeper with AI

Click → prompt copied → paste in AI chat

You deposited ETH into Yearn. They gave you yvETH.

You deposited into Aave. You got aETH.

You deposited into Lido. You got stETH.

What the hell are these tokens? Where did your ETH go?

Welcome to vaults and escrows - the fundamental building blocks of DeFi.


The basic concept

A vault is a smart contract that:

  1. Takes your deposits
  2. Does something with them (stake, lend, yield farm)
  3. Gives you a receipt token
  4. Returns your original + yield when you withdraw

That's it. Everything else is implementation details.

The receipt token (yvETH, aETH, etc.) represents your claim on the vault's assets.


Why vaults exist

Three main reasons:

Efficiency. Instead of each person paying gas to stake, lend, or farm, the vault does it once for everyone.

Composability. Your vault receipt token can be used elsewhere. Stake in vault A, use receipt in protocol B.

Complexity abstraction. Yield strategies can be insanely complex. Vaults let you say "make my money go up" without understanding every step.


ERC-4626: The vault standard

Before 4626, every vault was different. Different interfaces. Different accounting. Different tokens.

ERC-4626 standardizes vaults like ERC-20 standardized tokens.

Core functions:

  • deposit() - put assets in
  • withdraw() - take assets out
  • convertToShares() - how many receipt tokens for X assets?
  • convertToAssets() - how many assets for X receipt tokens?

Now any protocol can integrate with any 4626 vault. Composability++.


How the math works

Simple example:

Day 1:

  • Vault has 100 ETH
  • 100 share tokens exist
  • 1 share = 1 ETH

Day 30:

  • Vault earned 10 ETH from yield
  • Still 100 share tokens
  • Now 1 share = 1.1 ETH

Your 10 shares were worth 10 ETH. Now worth 11 ETH.

The share price increases as the vault earns. No rebasing needed. Clean.


Common vault patterns

Yield aggregators (Yearn). Deposit asset, vault farms across protocols for best yield. Complex strategies, simple interface.

Lending vaults (Aave). Deposit asset, vault lends it out, you earn interest. aTokens are basically vault shares.

Staking vaults (Lido). Deposit ETH, vault stakes with validators, you get stETH. Represents staked ETH + rewards.

Autocompounders (Beefy). Deposit LP tokens, vault harvests rewards and compounds them.

Same pattern. Different strategies.


Escrow patterns

Escrow = hold funds until conditions are met.

Common uses:

Timelocks. "This ETH is locked for 90 days." DAO treasuries, vesting schedules.

Conditional release. "Release funds when oracle confirms event X." Insurance, prediction markets.

Multi-party escrow. "Release when 2 of 3 parties agree." Deals, arbitration.

Smart contracts make this trustless. The code enforces conditions, not humans.


The risks nobody mentions

Admin keys. Many vaults have admin functions. Upgrade the contract. Withdraw funds. Pause everything. Trust the team.

Strategy risk. The vault invests your assets somewhere. If that somewhere gets hacked, your assets are gone too.

Liquidity risk. Vault might invest in illiquid positions. When you want to withdraw, the liquidity might not be there.

Smart contract risk. The vault itself is code. Code has bugs. Bugs get exploited.

Oracle dependency. Some vaults rely on price feeds. Bad oracle = bad accounting = potential exploits.

Vaults abstract complexity. They don't eliminate risk.


The Yearn story

Yearn popularized yield vaults.

You deposit, say, DAI. The vault:

  1. Deposits into Compound
  2. Borrows against it
  3. Uses borrowed funds to farm CRV
  4. Sells CRV
  5. Redeposits
  6. Repeat

20+ steps, automated. You just see APY go up.

But also:

  • Multiple protocols' risks combined
  • Admin keys controlled by team
  • Strategy changes without notice
  • Past performance not guaranteed

The APY you see today might not exist tomorrow.


How to evaluate vaults

Before depositing:

Who controls upgrades? Multisig? Timelock? Single admin? DAO?

What's the strategy? Where does yield come from? What's the risk chain?

Is it audited? By whom? Multiple audits? Bug bounty?

What are the fees? Performance fees? Management fees? Withdrawal fees?

How liquid is withdrawal? Instant? Delayed? Depends on strategy?

What happens if underlying fails? Is there insurance? Who bears the loss?

Most users check none of this. They see "20% APY" and deposit.


The insurance question

Some protocols offer "insurance" on vaults.

Questions to ask:

  • Who underwrites it?
  • What's actually covered?
  • What's the claims process?
  • What if the insurer fails too?

In crypto, "insured" often means "someone wrote a smart contract that might pay out, if they have funds, if conditions are met exactly right."

Not quite the same as FDIC insurance.


The bottom line

Vaults are powerful. They let regular users access complex strategies.

But they're not magic:

  • Risk is abstracted, not eliminated
  • Yield comes from somewhere (and can disappear)
  • Smart contract risk multiplies across every protocol in the chain
  • Admin keys exist in most vaults

Use vaults if you understand:

  • What they're actually doing with your money
  • Who controls them
  • What happens when things go wrong

The receipt token in your wallet looks simple. The machinery behind it is not.

Know what you own.


Next: Wagmi - the toolkit everyone uses to build dApps.

Liked this article? Follow me!

@t0tty3
#vaults#escrow#smart-contracts#erc4626

Dive Deeper with AI

Click → prompt copied → paste in AI chat