Developer finds Uniswap v3 TVL overstated by up to 25x due to virtual reserve bug
A software developer discovered a critical bug in their paid DEX data API that caused Uniswap v3 total value locked (TVL) figures to be overstated by as much as 25 times the actual amount. The error stemmed from using virtual reserves — mathematical constructs that describe liquidity curve shape — instead of real token balances held by the pool contract. For example, one WETH/USDC pool on Base was reported at $2.84 billion TVL when actual on-chain balances showed roughly $111 million. The developer has since corrected the implementation to separately report real custody balances for TVL and virtual reserves for trade depth calculations. The incident also highlighted the inadequacy of basic API response-shape testing, prompting the addition of magnitude checks and cross-source validation.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in