Negative Balances

Hi all
I’m having some issues with balances
I frequently end up with having negative values for various addresses
I double checked the balances against the contracts themselves by calling the balanceOf and the balance is obviously positive, no matter what the liquidity is

e.g.

{
ethereum (network: bsc){
address(address: {is: “0xCb7027A23Fc5aB02802DeDb6224ebe8636D0d421”}) {
address
balances(
currency: {is: “0x3db6b57fbd2a71cbbef1c10d9ad35b3d1343de92”}
time: {till: “2021-06-25”}
) {
currency {
symbol
address
name
decimals
}
value
history {
block
value
transferAmount
timestamp
}
}
}
}
}

or

{
ethereum(network: bsc) {
address(address: {is: “0xCb7027A23Fc5aB02802DeDb6224ebe8636D0d421”}) {
balances {
currency {
address
name
symbol
decimals
}
value
}
}
}
}

Maybe bitQuery calculates balances against some smart contract events, but if the tx fails on the smart contract the calculations are not reverted.

I found this happens more frequently with low liquidity tokens (and some rug pulls too lol) but still balances should be correct as they are on the smart contract balanceOf function

Thanks for reporting this, our balance APIs are old and have few bugs,…however, we are building a new set of balance APIs. meanwhile, I have reported this to the dev team.