Closed Destiner closed 4 years ago
Hey @Destiner , thanks for bringing this up. I am going to take a look at it first thing tomorrow when I am back at work!
This appears to be more deceiving than I would have thought. I am going to keep digging into this but I don't have a solution right now. Gonna bring in @ianlapham too and see if he can figure anything out
Hey @davekaj any luck figuring it out?
Hey @Destiner , I will take a look today and get back to you!
@Destiner I looked at this for about 2 hours and I still can't figure it out. My strongest guess is that is has to do with the code here:
https://github.com/graphprotocol/uniswap-subgraph/blob/master/src/mappings/exchange.ts#L940-L999
This is the only code that really updates user.uniTokenBalance
. My guess is that it does have to do with the recent update to synthetix. It is probably some sort of calculation bug that is slowly accumulating incorrect balances. This is because it isn't often that people do normal transfers of UNI liqiuidity tokens, but SNX has made this commonplace (over 700 tx to their contract for staking).
Without seeing anything obvious in the code for errors, I would start testing it. The next thing I would do is simplify the subgraph to only look at this exchange, and then start logging transfer data.
I can't promise that I can dig into this and fix it, we are working towards network launch and I don't have time allocated for maintaining this right now.
It is possible Ian from Uniswap will be able to help, but I'll leave that up to him to answer.
And if you see anything wrong yourself in the code, please let up know!
I see. Thanks for your help. I'll try to implement this part of the subgraph from scratch and see if it will have the same problem.
Oh well. Turns out the problem is much simpler that we thought:
https://github.com/graphprotocol/uniswap-subgraph/blob/master/src/mappings/exchange.ts#L1005-L1007
userTo
should be userFrom
on these lines.
Good catch, I will push a fix in a few hours - it takes a few days for the uniswap subgraph to sync, so we might have to wait until sunday or monday to see the results working
never version has been deployed here - https://thegraph.com/explorer/subgraph/graphprotocol/uniswap?version=pending
closing. Thanks for the catch @Destiner 👍
If for some reason this error didn't fix it (which we will see in a few days), lets reopen
It seems that for some providers of sETH/ETH pool subgraph shows incorrect balance.
Here are some of the affected providers:
I checked some other pools and they didn't seem to have this issue.
To reproduce:
vs etherscan
Recent Synthetix update might be relevant but I'm not sure how.