Balancer V3

Balancer V3.
Build an AMM in an afternoon.

Balancer V3 went live in December 2024. It keeps the single-Vault idea from V2, moves the hard parts into the Vault, and opens every pool to custom logic through hooks.

Hooks

Small contracts that run at fixed points: before a swap, after a deposit, when a pool is created. They let a pool change fees or block actions without forking the protocol.

100% boosted pools

Every token in a boosted pool can sit in a yield-bearing vault such as Aave. The pool keeps a small buffer for swaps, so liquidity providers earn lending yield on almost the full balance.

A Vault that does more

Accounting, rate scaling and fee handling moved from pools into the Vault. A new pool type can be a few hundred lines of math instead of thousands of lines of plumbing.

Transient accounting

Using transient storage, the Vault tracks debts and credits during a transaction and only settles the net amount at the end. Multi-hop swaps get cheaper.

Permit2 and routers

Approvals go through Permit2, so one signature can replace an approve transaction. Routers can be swapped or extended without touching the Vault.

ERC-4626 buffers

Buffers wrap and unwrap yield tokens inside the Vault. A trader swapping USDC never needs to know the pool actually holds a lending receipt token.

Architecture

How a Balancer v3 swap flows.

Routers talk to the Vault. The Vault talks to pools, hooks and buffers. Pools only do math.

Your wallet
Router
Vaultaccounting · settlement · fees
Pool math
Hooks
4626 buffers
Hooks in practice

Pick a hook, see the idea.

These are patterns developers already build on Balancer V3. Each one is a separate contract a pool opts into at creation.

DynamicfeeHook.sol

Raise the swap fee when volatility is high and lower it when the market is calm. Liquidity providers are paid more for taking more risk.

onComputeDynamicSwapFee(params) {
  const vol = oracle.volatility();
  return base + vol * multiplier;
}
Compared

What changed from V2 to V3.

AreaBalancer V2Balancer V3
Custom logicFork a pool contractAttach a hook
Yield-bearing tokensRate providers, partial boostingNative, 100% boosted
Token approvalsApprove the VaultPermit2 signatures
Multi-hop gasSettles per batchNet settlement with transient storage
New pool type effortWeeksDays

Build on Balancer V3.

Deploy a pool, attach a hook, and the router will find it.