yearn-vaults-v2-subgraph
yearn-vaults-v2-subgraph copied to clipboard
Some vaults have negative balanceTokens
Request all vaults and corresponding data:
{
vaults {
id
balanceTokens
token {
symbol
}
latestUpdate {
tokensDeposited
tokensWithdrawn
}
}
}
Result: (one of the vaults, but the response contains an array of all the vaults)
{
"balanceTokens": "-67230908",
"id": "0x1ae8ccd120a05080d9a01c3b4f627f865685d091",
"latestUpdate": {
"tokensDeposited": "55042040",
"tokensWithdrawn": "122272948"
},
"token": {
"symbol": "WBTC"
}
}
Expected:
balanceTokens
should reflect the number of tokens in the vault. Should it match totalAssets
from the smart contract?
im 99% sure this was fixed by https://github.com/yearn/yearn-vaults-v2-subgraph/pull/119/files
currently unable to repro on main.
when the subgraph version is incremented, need to retest to validate the fix
@bsamuels453 Awesome! Great work. Feel free to close when you've confirmed that it's been fixed
👋
It appears that balanceTokensIdle
has the same issue