If I go to https://app.uniswap.org/#/add/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/3000?chain=mainnet I can see liquidity details for USDC-DAI
As far as I know, Uniswap is an constant product AMM so the liquidity inside should reflect the price
Based on the total value locked the price of ETH should be:
131.87m/91.43k which is 131000000.87/91000.43 and this is equal to 1439.55
What am I doing wrong, the correct price should be 2550.
Best Answer
You're mistaken, Uniswap v3 does not use the formula
x*y=k
for real amounts of assets. It's a concentrated liquidity AMM and uses a concentrated liquidity formula.Read Uniswap v3 whitepaper. Specifically the formula 2.2 defines liquidity in v3. If you operate with virtual reserves of
x
andy
then the relationship between price and liquidity (formulas 6.3 to 6.6) is the same as in v2. But virtual reservesx
andy
are not the same as the actual (real) token reserves in the pool, due to the concentrated liquidity feature.