v3-subgraph
v3-subgraph copied to clipboard
TotalValueLockedTokenX vs Token balance of pool
Sorry, if this question is stupid, but should TotalValueLocked of some token to be equal or close to LP token balance? 14 177 942 blocks Query:
pools(where: {id: "0x290a6a7460b308ee3f19023d2d00de604bcf5b42"}) {
id
txCount
token0 {
id
decimals
name
}
token1 {
id
decimals
name
}
totalValueLockedToken0
totalValueLockedToken1
}
}
Answer:
{
"data": {
"pools": [
{
"id": "0x290a6a7460b308ee3f19023d2d00de604bcf5b42",
"txCount": "85486",
"token0": {
"id": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0",
"decimals": "18",
"name": "Matic Token"
},
"token1": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"decimals": "18",
"name": "Wrapped Ether"
},
"totalValueLockedToken0": "8423323.789566516739112524",
"totalValueLockedToken1": "4816.30806128660904193"
}
]
}
}
Token balance of pool (0x290a6a7460b308ee3f19023d2d00de604bcf5b42) at block 14177942:
matic: 6611283.796696814 weth: 3882.540883269949
Seems quite off. Is it error on my side, on the subgraph or both?