v3-subgraph
v3-subgraph copied to clipboard
`derivedETH` seems to be incorrect for some tokens.
I was working on a new app for Uniswap V3 when I discovered that most tokens do not return the correct value for derivedETH
in the V3 Subgraph. Seems like only the top 372 tokens return a non-zero value, even though it's relatively easy to calculate for quite a few others as well.
I tried to look at other issues and documentation and found no explanation or reason. Any insights on the issue?
Apologies for the tag @ianlapham but I'm a little stumped at this! I want to avoid loading any data outside of the official Uniswap APIs/Subgraph, so I'd really appreciate if you'd have any insights for me!
@akshatmittal Im seeing that different pools return different amounts of derivedEth
for the same pair. Some pairs return derivedEth
in terms of amount of ETH, while other pools are in terms of the derivedEth
See the token below (0x7ceb23fd6bc0add59e62ac25578270cff1b9f619
) where the token in two different pools has two different values for derivedEth
Was this the issue you were seeing? Or have you seen this before?
{ id: '0xadbf1854e5883eb8aa7baf50705338739e558e5b', txCount: '7712875', token0: { id: '0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270', symbol: 'WMATIC', decimals: '18', name: 'Wrapped Matic', totalLiquidity: '99657767.548461905133', derivedETH: '0.0005696771097544', __typename: 'Token' }, token1: { id: '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619', symbol: 'WETH', name: 'Wrapped Ether', decimals: '18', totalLiquidity: '27994.211876988614', derivedETH: '1.0000000000000000', __typename: 'Token' }, reserve0: '8147168.847674260047462784', reserve1: '4641.255601823936346685', reserveUSD: '11573907.8225523198386521', totalSupply: '139434.9313019919140210', trackedReserveETH: '9284.8769909046696084', reserveETH: '9284.8769909046696084', volumeUSD: '5643020378.3338469564428448', untrackedVolumeUSD: '5643020378.3338469559949289', token0Price: '1755.3803424384897136', token1Price: '0.0005696771097544', createdAtTimestamp: '1602275394', __typename: 'Pair', feeTier: '3000', dex: 'quickswap', poolLabel: 'WMATIC:WETH' }, { id: '0x6cf8654e85ab489ca7e70189046d507eba233613', txCount: '2315086', token0: { id: '0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270', symbol: 'WMATIC', decimals: '18', name: 'Wrapped Matic', totalLiquidity: '4546890.63329781594420056', derivedETH: '1', __typename: 'Token' }, token1: { id: '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619', symbol: 'WETH', name: 'Wrapped Ether', decimals: '18', totalLiquidity: '980.227947139662565127', derivedETH: '1751.983259562823062831228731805445', __typename: 'Token' }, reserve0: '1180683.580868085221894149', reserve1: '673.91259272802884264', reserveUSD: '1679050.363819980351040327010079651', totalSupply: '27473.596604336391457957', trackedReserveETH: '2361367.161736170443788298', reserveETH: '2361367.161736170443788298', volumeUSD: '803244885.1123210615494658844328426', untrackedVolumeUSD: '803244885.1123210615494658844328426', token0Price: '1751.983259562823062831228731805445', token1Price: '0.0005707817095521406977221689121656284', createdAtTimestamp: '1624057002', __typename: 'Pair', feeTier: '3000', dex: 'quickswap', poolLabel: 'WMATIC:WETH' }