Uniswap V4 β what's new and what's next
ETH Uniswap V4What's new in Uniswap V4?
UniswapUniswapAn Ethereum concentrated-liquidity protocol (V3/V4). Its Solana counterpart is Orca.Read the lesson β V4 is a major upgrade. V3 was about concentrated liquidity (how to provide liquidity more efficiently). V4 is about modularity and efficiency.
Three main innovations:
- A singleton contract β one contract for every pool
- The Hooks system β programmable add-ons for every pool
- Flash Accounting β cheaper gas
The singleton contract
The V3 problem
V3 deploys a separate contract for every pool. That means:
- Thousands of separate contracts
- SwappingSwapExchanging one token for another. E.g. SOL to USDC via Jupiter.Read the lesson β between different pools = multiple transactions = more expensive
The V4 solution
The hotel analogy
V3: every pool has its own "house." To visit several pools, you travel between houses. Expensive and slow.
V4: every pool lives in a single "hotel." Moving from one pool to another is just walking from room to room. Faster and cheaper.
| Uniswap V3 | Uniswap V4 | |
|---|---|---|
| Number of contracts | 1 per pool | 1 for all |
| Multi-hop swap cost | Expensive (several transfers) | Cheap (internal accounting) |
| Creating a new pool | Expensive (millions of gas units) | Cheap |
The Hooks system β the biggest innovation
Hooks are add-ons you can "plug into" a pool. They bolt on extra logic.
Hooks = an app store
Like a phone with apps: the phone itself (the pool) works fine on its own, but with apps (hooks) it can do a lot more β calculate, monitor, automate.
What can Hooks do?
| Hook point | When it fires | What it can do |
|---|---|---|
beforeSwap | Before every swap | Adjust the fee based on market conditions |
afterSwap | After a swap | Collect stats |
beforeAddLiquidity | Before an LPLPLiquidity Provider β deposits tokens into a pool and earns a share of trading fees.Read the lesson β deposit | Check who's allowed to join |
afterAddLiquidity | After an LPLPLiquidity Provider β deposits tokens into a pool and earns a share of trading fees.Read the lesson β deposit | Auto-stake |
Hooks examples
1. Dynamic fees: Calm market = low fee. Volatile market = higher fee. Protects LPsLPLiquidity Provider β deposits tokens into a pool and earns a share of trading fees.Read the lesson β from losses.
2. Auto-reinvesting: A hook automatically reinvests earnings. Nothing to do by hand.
3. Limit orders: Set your price, and the hook executes automatically.
Flash Accounting β cheaper gas
Flash Accounting lets you perform several actions at once, checking the balance only at the end.
How it worked in V3:
Swap A β B: 2 transfers
Swap B β C: 2 transfers
Total: 4 transfers = 4x gas
How it works in V4:
Swap A β B β C: internal accounting
At the end: 2 transfers
Total: 2 transfers = 2x gas
| Operation | V3 Gas | V4 Gas | Savings |
|---|---|---|---|
| Simple swap | ~130,000 | ~100,000 | ~23% |
| SwapSwapExchanging one token for another. E.g. SOL to USDC via Jupiter.Read the lesson β through 2 pools | ~260,000 | ~150,000 | ~42% |
| SwapSwapExchanging one token for another. E.g. SOL to USDC via Jupiter.Read the lesson β through 3 pools | ~390,000 | ~180,000 | ~54% |
Native ETH β simpler
V3 required you to "wrap" ETH into WETH (an extra transaction). V4 supports native ETH directly. That means:
- No extra step
- Saves ~45,000 gas per swap
- Simpler for the user
When to use V4 vs V3?
| Situation | Recommended | Why |
|---|---|---|
| Long-term LPLPLiquidity Provider β deposits tokens into a pool and earns a share of trading fees.Read the lesson β position | V3 | Well-tested, plenty of liquidity |
| SwappingSwapExchanging one token for another. E.g. SOL to USDC via Jupiter.Read the lesson β through multiple pools | V4 | Cheaper gas |
| Need dynamic fees | V4 | HooksHookA programmable add-on for a Uniswap V4 pool β custom logic that runs before or after a trade.Read the lesson β support this |
| Frequent operations (collect, move, swap) | V4 | Lower gas adds up over many transactions |
| Maximum liquidity | V3 | Still has more TVLTVLTotal Value Locked β the total value deposited in a DeFi protocol. An indicator of how popular a protocol is. for now |
Hooks β what's worth checking before you trust one
Since anyone can build a HookHookA programmable add-on for a Uniswap V4 pool β custom logic that runs before or after a trade.Read the lesson β, it's worth asking a few questions about each one. This is standard DeFiDeFiDecentralized Finance β financial services without intermediaries, operating through smart contracts.Read the lesson β hygiene β once you know what to look for, checking takes a few minutes.
- An unaudited Hook β only pick HooksHookA programmable add-on for a Uniswap V4 pool β custom logic that runs before or after a trade.Read the lesson β that a known auditor has reviewed
- A malicious Hook β use HooksHookA programmable add-on for a Uniswap V4 pool β custom logic that runs before or after a trade.Read the lesson β recommended by the UniswapUniswapAn Ethereum concentrated-liquidity protocol (V3/V4). Its Solana counterpart is Orca.Read the lesson β Foundation that already have significant TVLTVLTotal Value Locked β the total value deposited in a DeFi protocol. An indicator of how popular a protocol is.
- A centralized Hook (the owner can change the rules) β before you put money in, check whether the logic is fixed or can be changed
You can check each of these yourself in a few minutes β the point isn't to fear HooksHookA programmable add-on for a Uniswap V4 pool β custom logic that runs before or after a trade.Read the lesson β, it's to choose deliberately.
V4 and DeFi Risk OS
DeFiDeFiDecentralized Finance β financial services without intermediaries, operating through smart contracts.Read the lesson β Risk OS platform support for V4 will arrive during Phase 2. Right now we support V3.
| Feature | V3 | V4 |
|---|---|---|
| LPLPLiquidity Provider β deposits tokens into a pool and earns a share of trading fees.Read the lesson β position tracking | Yes | Planned |
| Earnings calculation | Yes | Planned |
| IL calculator | Yes | Planned |
V3 vs V4 β in short
- V3 = concentrated liquidity (how to provide liquidity more efficiently)
- V4 = modularity + efficiency (how pools can get smarter)
V4 doesn't replace V3. Both versions run side by side. LPsLPLiquidity Provider β deposits tokens into a pool and earns a share of trading fees.Read the lesson β can choose whichever fits them better.
Once you understand SingletonSingletonA single Uniswap V4 contract shared by all pools β cheaper operations.Read the lesson β, HooksHookA programmable add-on for a Uniswap V4 pool β custom logic that runs before or after a trade.Read the lesson β, and Flash Accounting, you can evaluate a specific pool for yourself and decide whether V4 is worth it, or whether you'd rather stick with V3 β you're deciding with arguments, not gut feeling.
Up next: Let's move to SolanaSolanaA fast blockchain (under 1s, gas under $0.01). Home to the Kamino, Orca and Meteora ecosystem.Read the lesson β β the OrcaOrcaA Solana DEX with concentrated liquidity (Whirlpool). The basis of our LP strategy on the Solana network.Read the lesson β WhirlpoolWhirlpoolOrca's concentrated-liquidity engine. Works similarly to Uniswap V3, but on the Solana network.Read the lesson β protocol, with SolanaSolanaA fast blockchain (under 1s, gas under $0.01). Home to the Kamino, Orca and Meteora ecosystem.Read the lesson β speed and prices.
The best way to understand V4 is to see it side by side with V3. Takes about 10 minutes, no wallet needed.
We're ONLY exploring β don't open a position, and you don't need to connect a wallet. Remember: Uniswap = Ethereum/Arbitrum ONLY, it doesn't exist on Solana.
This is learning, not investing β use only small amounts you treat as tuition.
You just live-compared a V3 and a V4 pool β TVL, Volume, hooks β and decided for yourself which version you'd pick. Most people never run this kind of analysis.