Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong TVL of a Pool: both DailySnaphots and general #189

Open
lovelyboysaybye opened this issue Oct 21, 2023 · 0 comments
Open

Wrong TVL of a Pool: both DailySnaphots and general #189

lovelyboysaybye opened this issue Oct 21, 2023 · 0 comments

Comments

@lovelyboysaybye
Copy link

lovelyboysaybye commented Oct 21, 2023

Hello.

I tried to use v3-subgraph to get a history of the TVL of a Uniswap V3 Pool PAW-WETH, but provided TVL is differs from the dispalyed at info.uniswap

The query that I used:

  pool(id: "0xbcc489a50f0e2f09aec2d6f33ffe950cb6c39295")
  {
    token0
    {
      symbol
    }
    
    token1
    {
      symbol
    }
    totalValueLockedUSD
    totalValueLockedUSDUntracked
    poolDayData(skip: 254, first: 2)
    {
      date
      liquidity
      tvlUSD
      feesUSD
    }
  
  }
}

The result is:

  "data": {
    "pool": {
      "token0": {
        "symbol": "WETH"
      },
      "token1": {
        "symbol": "PAW"
      },
      "totalValueLockedUSD": "307115.342350543087003200973320805",
      "totalValueLockedUSDUntracked": "0",
      "poolDayData": [
        {
          "date": 1697760000,
          "liquidity": "34122936528553416844941894",
          "tvlUSD": "304371.7323612124143612744072491665",
          "feesUSD": "264.9352334225618604339229132789831"
        },
        {
          "date": 1697846400,
          "liquidity": "33984929011804727049249030",
          "tvlUSD": "307049.640867932938928334948231643",
          "feesUSD": "71.25221873508237966770740706944574"
        }
      ]
    }
  }
}

So, from the response it seemed like the TVL of 21.10.2023 and 20.10.2023 was about 300K USD, but from the info page https://info.uniswap.org/#/pools/0xbcc489a50f0e2f09aec2d6f33ffe950cb6c39295 it is equals to 53K only.

Expected, that the tvlUSD should have the same values.
image

Maybe somehow tvlUSD should be converted/fixed at my side to get similar to 53K values?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant