Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some vaults have negative balanceTokens #55

Open
jstashh opened this issue Apr 19, 2021 · 3 comments
Open

Some vaults have negative balanceTokens #55

jstashh opened this issue Apr 19, 2021 · 3 comments
Labels
bug Something isn't working help wanted Extra attention is needed p0 Priority 0 - Blocker, showstopper or important feature

Comments

@jstashh
Copy link

jstashh commented Apr 19, 2021

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?

@storming0x storming0x added bug Something isn't working high labels May 18, 2021
@salazarguille salazarguille added help wanted Extra attention is needed p0 Priority 0 - Blocker, showstopper or important feature and removed high labels Sep 30, 2021
@bsamuels453
Copy link

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

@jstashh
Copy link
Author

jstashh commented Dec 12, 2021

@bsamuels453 Awesome! Great work. Feel free to close when you've confirmed that it's been fixed

@Majorfi
Copy link

Majorfi commented Apr 8, 2022

👋
It appears that balanceTokensIdle has the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed p0 Priority 0 - Blocker, showstopper or important feature
Projects
None yet
Development

No branches or pull requests

5 participants