How DeFi Vaults Work: One Button, a Stack of Trust

How DeFi Vaults Work: One Button, a Stack of Trust

The first time I hovered over a “Deposit” button on a vault app, I stopped. I wanted to know what I was actually signing before I clicked. That question is what this post answers: how DeFi vaults work, from the inside, told by someone with no computer science degree who reads the machine before trusting it.

Here’s the promise. By the end you’ll be able to picture what happens to your money after you deposit — the shares, the strategy, the yield — and you’ll have the exact inspection list I run before I trust any DeFi vault with a single dollar.

I’ll walk both sides honestly. One side says a vault is a clean, professional way to earn on-chain yield without babysitting positions. The other says it’s one button hiding a whole stack of things you now trust. Then I’ll tell you where I actually land.

What a DeFi vault really is

Let me give you the plain definition first, the one I wish I’d read on day one.

A DeFi vault is a smart contract that pools deposits from many users, runs an automated strategy with that pooled money, and gives each depositor a share token that tracks their slice of the growing pool. You put in an asset, you get back shares. The strategy earns yield, the pool grows, and each share becomes worth slightly more of the underlying asset over time.

That’s it. No magic, no “money printer.” A vault is a program that holds your money and does a repeatable job with it.

The job is usually auto-compounding. On your own, you’d have to claim rewards, swap them, and redeposit — over and over, paying gas each time. The vault does that loop for everyone at once, so the cost is shared and the compounding never sleeps. That convenience is real, and it’s the whole reason these pools exist.

Yearn Finance built the primitive most people copied. If you want the canonical mechanics of how a vault claims, swaps, and redeposits rewards, the Yearn docs still read as the clearest reference, and I treat their yVault design as the textbook example rather than a recommendation.

Flow diagram showing how a DeFi vault works — deposit asset, mint shares, strategy earns yield, pool grows, then redeem shares for more of the underlying asset.

Deposit, shares, strategy, yield: the walkthrough

Here’s the loop, step by step, the way I mapped it for myself.

1. You deposit. You send an asset — often a stablecoin like USDC — into the vault contract. If you’re fuzzy on why USDC holds its value in the first place, that’s its own machine; I broke it down in my piece on how stablecoins keep their peg.

2. The vault mints shares. In return, the vault gives you a share token (sometimes called a receipt token). Those shares are your claim on the pool. Early on, one share might equal one USDC. That ratio matters more than it looks.

3. The strategy goes to work. The vault hands the pooled deposits to a strategy contract. The strategy is the actual money-making logic. It might lend the pool on a lending market, provide liquidity, or farm rewards somewhere else.

4. Yield accrues. As the strategy earns, it compounds the gains back into the pool. The total assets held by the vault rise, but the number of shares stays the same. So each share now claims a bigger slice.

5. You redeem. When you withdraw, you burn your shares and the vault gives you back the underlying asset — hopefully more than you put in, because your shares are worth more of the pool than when you deposited.

The mental trick that finally made this click for me: the share count never changes, the asset-per-share ratio does. You don’t “earn tokens.” Your shares quietly become worth more of the underlying. That single idea explains the whole design.

Diagram of the asset-per-share ratio inside a DeFi vault — a fixed share count while total pooled assets rise, so each share redeems for more of the asset over time.

ERC-4626, explained without the jargon

You’ll see “ERC-4626” everywhere in vault write-ups, and it sounds like a part number. In practice it’s simpler than it reads.

ERC-4626 is a shared blueprint for tokenized vaults. Before it, every vault invented its own deposit and withdraw functions, so wallets and apps had to learn each one separately. The standard gave them a common vocabulary: deposit, mint, withdraw, redeem, and a way to read totalAssets and the asset-per-share ratio.

The non-developer payoff is real. A standard vault is easier for tools to inspect, easier to plug into other apps, and less likely to hide a weird custom function. The official ethereum.org ERC-4626 explainer walks through shares and redemptions cleanly, and the finalized EIP-4626 specification is the primary source if you want the exact function list.

Standard doesn’t mean safe. It means legible. A well-labeled box can still hold a bad strategy. Keep those two ideas apart — I didn’t at first.

The case for vaults: convenience that’s actually earned

Let me steelman the optimistic side, because it isn’t wrong.

A vault removes real, tedious work. Manual compounding is a chore, and on a small position the gas costs can eat most of your gains. Pooling deposits spreads that cost across everyone, so the vault can compound far more efficiently than you could alone.

There’s also a strategy-quality argument. A good vault encodes a professional strategy — how to lend, when to rebalance, how to harvest rewards — that most of us would never build correctly by hand. You’re renting expertise, and the strategy runs the same disciplined loop at 3 a.m. that it does at noon.

And there’s composability. Because vault shares are just tokens, other apps can use them. Your yield-bearing share can become collateral elsewhere. That’s genuinely useful, and it’s why the vault became a base layer of DeFi rather than a niche product.

So far, the marketing pages are right. The problem is what they leave out.

The case against: one button, a stack of trust

Here’s the other side, and it’s the side almost nobody selling a vault will say plainly.

A vault doesn’t remove risk. It bundles it. When you deposit, you’re not trusting one thing. You’re trusting a stack, and each layer can fail on its own.

  • The vault contract — the box holding your funds. A bug here exposes the whole pool.
  • The strategy contract — the logic moving the money. And here’s the part that surprised me: on many vaults, the strategy can be swapped by whoever controls the vault. The box you inspected yesterday can run different code tomorrow.
  • The downstream protocols — wherever the strategy deploys the money. If the strategy lends on a lending market, you now carry that market’s risk too. If you want to see how one of those underlying engines actually prices yield, I traced it in how Aave interest rates are set.
  • The oracle — the price feed the strategy relies on. If it reports a wrong price, the strategy can be liquidated or drained around it.

Stack those up and you get the honest picture: a vault is one button sitting on top of four trust assumptions. The convenience is real. So is the fact that it hides the risk behind a single tap.

There’s a quieter danger too. Depositing usually means granting a token approval to the vault contract — sometimes an unlimited one. If that contract is compromised, or the strategy behind it turns malicious, that standing approval is a door left open. I wrote a full walkthrough of how those approvals drain wallets and how to revoke a token approval, because a vault is exactly where a forgotten approval sits quietly for months.

Four-layer trust stack infographic for how DeFi vaults work — vault contract, strategy contract, downstream protocols, and price oracle stacked as dependencies.

Vault vs staking vs a savings account

The comparison that fixed my mental model was setting a vault next to two things people wrongly equate it with.

Savings account Staking DeFi vault
Who holds your money A regulated bank The blockchain protocol A smart contract + strategy
Where yield comes from Bank lends deposits Securing the network An automated on-chain strategy
Auto-compounding Manual or fixed Sometimes Usually the whole point
Main risk Bank failure (often insured) Slashing, lockups Smart-contract + strategy + oracle risk
Can you exit instantly Usually yes Often has an unbonding period Depends on the strategy’s liquidity
Who can change the rules Regulator + bank Protocol governance Whoever controls the vault

A savings account has a name, an address, and a regulator. A vault has code and a curator. That’s not automatically worse — it’s differently accountable, and the accountability is something you have to verify yourself instead of assuming.

A yield aggregator, by the way, is just a vault (or a set of vaults) that hunts for the best available yield across protocols and moves the money accordingly. Same primitive, more active strategy. More moving parts means more layers in the trust stack.

What broke: where I was wrong about vaults

I got three things wrong early, and each one cost me either money or a bad scare.

I read a vault as a savings account. My first mental model was “on-chain high-yield savings.” That framing hid every risk in the stack. A savings account can’t have its strategy rewritten overnight. A vault can. Once I stopped picturing a bank and started picturing a running program with an owner, my whole checklist changed.

I thought “audited” meant “safe.” I saw an audit badge and relaxed. But an audit is a snapshot of specific code at a specific date. It doesn’t cover a strategy that gets swapped afterward, and it doesn’t promise the downstream protocols are sound. I now read “audited” as “someone checked this version once,” not “this is safe forever.”

I forgot an approval. I once withdrew everything from a vault and mentally closed the book. Months later I found the token approval was still live — the vault could still move that asset if I ever held it again. Nothing bad happened, but nothing bad happening was luck, not design. Now I revoke approvals when I exit, the same way I’d cancel a card I stopped using.

The through-line: every mistake came from imagining the vault as a place instead of a program someone controls. That reframe is the most useful thing I can hand you.

The read-before-you-deposit framework

This isn’t a rating system and it names no “best” vault. It’s the set of questions I run before I trust any vault, in the order I run them.

  1. Who’s the curator? Someone chooses and can change the strategy. Is that a known team, a multisig, an anonymous wallet? The more anonymous the control, the more the “swap the strategy” risk matters.
  2. What’s the audit history — and the date? Not “is there a badge,” but who audited, when, and whether the current strategy is the one that was reviewed.
  3. How long has the money been there? A vault holding real deposits through market stress for a year tells you more than a fresh one advertising a headline number. Track record beats promise.
  4. Is there a timelock and a multisig on changes? A timelock means the controller can’t rewrite the strategy instantly and silently — you’d get warning. That’s one of the strongest structural safeguards.
  5. What are the actual withdrawal terms? Can you exit anytime, or is there a lockup, a delayed queue, or a moment when the strategy’s assets aren’t liquid? I assumed “anytime” once and was wrong.
  6. What downstream protocols does the strategy touch? Every protocol the money flows into is a layer you inherit. If the strategy leans on a lending market and an oracle, you now carry both.
  7. What am I approving? Check whether the deposit grants an unlimited approval, and plan to revoke it when you leave.

If a vault fails several of these, that’s not a signal to short it or to “spot a rug.” But an opaque curator, a stale audit, and vague withdrawal terms together are exactly the profile I break down in how to spot a rug pull. A vault is a place where those red flags hide behind a professional-looking button.

Notice what this framework does not do. It doesn’t tell you a yield number, and it doesn’t predict anything. It tells you how to read the machine. That’s the only part I can honestly hand off, because the machine is inspectable and the future isn’t.

Where I actually land

After all that, here’s my real position, and it’s not the tidy “vaults good” or “vaults bad” either side wants.

A vault is a legitimate piece of financial machinery. The auto-compounding is real, the strategy expertise is real, the composability is real. I don’t think the primitive is a scam, and I use the mental model constantly to read the rest of DeFi.

But the convenience and the risk are the same feature. The single button that saves you the compounding chore is the same button that hides the four-layer trust stack. You can’t accept one without the other. So the only responsible way I’ve found to use a vault is to un-hide the stack before I deposit — run the seven questions, treat “audited” as a dated snapshot, and revoke my approval on the way out.

That’s the whole framework. Not which vault. How to see the one you’re looking at.

FAQ

What is a DeFi vault in simple terms? It’s a smart contract that pools many users’ deposits, runs an automated strategy to earn yield, and gives each depositor a share token tracking their slice of the pool. You deposit an asset and receive shares; as the strategy earns, each share becomes worth more of the underlying asset.

How do you make money with a DeFi vault? Yield accrues through the strategy — often lending or providing liquidity — which compounds gains back into the pool. Your share count stays fixed while the asset-per-share ratio rises, so when you redeem, your shares claim more of the underlying than when you deposited. The size of that yield varies and isn’t guaranteed.

Are DeFi vaults safe? What are the risks? A vault bundles risk rather than removing it. You inherit smart-contract risk in the vault, strategy risk (the logic can sometimes be swapped), oracle risk from price feeds, and the risk of every downstream protocol the strategy touches. “Audited” means a version was reviewed once, not that it’s safe forever.

What’s the difference between a DeFi vault and a yield aggregator? A yield aggregator is a type of vault that actively hunts for higher yield across multiple protocols and reallocates the pooled money accordingly. It’s the same share-based primitive with a more active, multi-protocol strategy — which usually means more moving parts and more trust layers to inspect.

What is ERC-4626 and why does it matter? ERC-4626 is a shared standard for tokenized vaults. It defines common functions — deposit, mint, withdraw, redeem — so wallets and apps can read and interact with any compliant vault the same way. It makes vaults more legible and composable, but a standard interface doesn’t make the underlying strategy safe.

Can you withdraw from a DeFi vault anytime? Sometimes, but not always. Withdrawal depends on the strategy’s liquidity. Some vaults let you redeem instantly; others have lockups, delayed withdrawal queues, or moments when the deployed assets aren’t liquid. Check the withdrawal terms before depositing, and remember gas costs apply to the exit too.

Is a DeFi vault the same as staking or a savings account? No. A savings account is held by a regulated bank; staking secures a blockchain and often has unbonding periods. A vault is a smart contract running an automated strategy, controlled by a curator who can change the rules. The yield sources and the risks are different in each.


Next in the Crypto Mental Models series: reading a live vault on a block explorer — how to check the asset-per-share ratio, the strategy address, and whether the controller can swap the code, without trusting the app’s own dashboard.


seonjae — Korean office worker documenting his transition into AI systems, agents, and vibe coding — without a CS background. Shipping in public.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *