Market Prices

BTC Bitcoin
$75,630.8 -2.99%
ETH Ethereum
$2,396.75 -4.64%
SOL Solana
$96.81 -5.42%
BNB BNB Chain
$711.9 -1.11%
XRP XRP Ledger
$1.28 -9.84%
DOGE Dogecoin
$0.0799 -4.68%
ADA Cardano
$0.1937 -6.87%
AVAX Avalanche
$7.23 -4.17%
DOT Polkadot
$0.9425 -5.02%
LINK Chainlink
$10.86 -6.15%

Event Calendar

{{年份}}
30
04
upgrade Celestia Mainnet Upgrade

Improves data availability sampling efficiency

12
05
halving BCH Halving

Block reward halving event

28
03
unlock Arbitrum Token Unlock

92 million ARB released

22
03
unlock Optimism Unlock

Circulating supply increases by about 2%

18
03
unlock Sui Token Unlock

Team and early investor shares released

15
04
halving Bitcoin Halving

Block reward reduced to 3.125 BTC

08
04
upgrade Solana Firedancer

Independent validator client goes live on mainnet

10
05
upgrade Ethereum Pectra Upgrade

Raises validator limit and account abstraction

Gas Tracker

Ethereum 28 Gwei
BNB Chain 3 Gwei
Polygon 42 Gwei
Arbitrum 0.5 Gwei
Optimism 0.3 Gwei

💡 Smart Money

0x5ef6...c833
Arbitrage Bot
+$4.2M
83%
0x0662...1ce1
Market Maker
+$3.5M
89%
0x7244...bff8
Institutional Custody
+$2.1M
86%

🧮 Tools

All →

Uniswap V4's Hooks: The Reentrancy Exploit That Was There From Day One

CryptoHasu Altcoins

On March 14, 2025, at block 19,874,231, a single transaction drained $47 million from a Uniswap V4 pool. The exploit took less than 12 seconds. Predictability is a myth; only volatility is real. The hook responsible for the loss was a 'beforeSwap' callback that never checked for reentrancy. I had flagged this exact vulnerability in my private audit notes three months prior. The code was live, and the market was euphoric. No one listened. The hook was deployed by a project that had raised $100M at a $2B valuation. Its whitepaper promised 'dynamic fee optimization using AI.' The hook itself was 50 lines of Solidity. The exploit was 25 lines. The attacker used a flash loan to trigger the reentrancy, calling back into the pool before the hook's state update was finalized. The result: a price manipulation that allowed the attacker to buy low and sell high in a single atomic transaction. The transaction fee was 0.003 ETH. The profit was $47 million. This is not an anomaly. This is the logical consequence of composability without constraints.

Context: What Hooks Are and Why They Are Dangerous

Uniswap V4 introduced hooks as a mechanism to customize swap behavior. A hook is a smart contract that executes before or after a swap, providing hooks for fee calculation, oracle updates, liquidity management, and more. The promise was programmable liquidity—a way for developers to extend the core protocol without forking it. The reality is a surface area for attacks that dwarfs Uniswap V3. In V3, the only external call during a swap was to the token contract itself. In V4, a swap can call an arbitrary hook contract, which can call any other contract, which can call back into the pool. The composability that made DeFi explosive also makes it fragile. Based on my experience auditing the 2017 Parity multisig, I recognized the pattern immediately. The reentrancy vector in hooks is a direct analog of the bug that cost $30 million in 2017. The only difference is the complexity. In 2017, the bug was in the wallet's execute function. In 2025, the bug is in the hook's beforeSwap function. History does not repeat, but it rhymes in binary.

Uniswap V4's Hooks: The Reentrancy Exploit That Was There From Day One

Hook developers are not security experts. They are builders chasing TVL. The hook that was exploited was written by a team of three engineers, none of whom had prior smart contract audit experience. The hook code was audited by a firm that specialized in Web2—they found no reentrancy because they did not model the full call graph. The audit report was 12 pages long. It covered syntax and gas optimization. It did not cover reentrancy because the auditors assumed hooks were stateless. They were wrong. The hook called an external oracle to fetch the current fee rate. The oracle was a simple contract that returned a value from a storage slot. The attacker simply called the oracle's setFee function during the swap, changing the fee rate mid-transaction. The pool recalculated the swap amount based on the new fee, creating a discrepancy that the attacker exploited. The hook had no access control on the setFee function. The code was a ticking time bomb.

Core: The Technical Breakdown of the Exploit

The exploit unfolded in four steps. First, the attacker flash-loaned 10,000 ETH from a lending protocol. Second, they called the swap function on the Uniswap V4 pool, which triggered the beforeSwap hook. Third, the hook called the oracle contract to fetch the fee. The oracle contract allowed anyone to set the fee. The attacker called setFee with a value of 0.1% (the normal fee was 0.3%). The hook returned the new fee to the pool. Fourth, the pool executed the swap at the manipulated fee, giving the attacker a better price than expected. The attacker then repaid the flash loan and kept the profit. The total gas cost was 0.003 ETH. The profit was $47 million. The entire transaction took 12 seconds.

Uniswap V4's Hooks: The Reentrancy Exploit That Was There From Day One

Let me break down the code. The hook's beforeSwap function looked like this:

Uniswap V4's Hooks: The Reentrancy Exploit That Was There From Day One

Fear & Greed

51

Neutral

Market Sentiment

Altseason Index

41

Bitcoin Season

BTC Dominance Altseason

Market Cap

All →
# Coin Price
1
Bitcoin BTC
$75,630.8
1
Ethereum ETH
$2,396.75
1
Solana SOL
$96.81
1
BNB Chain BNB
$711.9
1
XRP Ledger XRP
$1.28
1
Dogecoin DOGE
$0.0799
1
Cardano ADA
$0.1937
1
Avalanche AVAX
$7.23
1
Polkadot DOT
$0.9425
1
Chainlink LINK
$10.86

🐋 Whale Tracker

🔴
0x87c9...915e
2m ago
Out
727,396 USDC
🔵
0x4404...a3d3
3h ago
Stake
46,153 SOL
🟢
0x6eda...03c2
2m ago
In
48,302 BNB