'Why can't I verify the Uniswap-v2 token volume of the next day using The Graph

I focus on one pair and use pairDayDatas in order to get the values of reserve0 and reserve1 of this liquidity pool on a specific day, for example at timestamp 1593993600.

Next, I use the same method above in order to get the values of reserve0 and reserve1 of the liquidity pool on the next day, at timestamp 1594080000 (= 1593993600 + 86400, 86400s per day).

But when I query all events (mint, swap, burn) between these 2 timestamps, I take reserve0 (at timestamp 1593993600) + all minted token 0 + all swapped amount in of token 0 - all burned token 0 - all swapped amount out of token 0, I do not get the value of reserve0 on the next day (at timestamp 1594080000)

I don't understand why, can anyone help me? Thanks a lot!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source