protocol-subgraphs icon indicating copy to clipboard operation
protocol-subgraphs copied to clipboard

UserReserve scaledATokenBalance are wrong ?

Open beyondblog opened this issue 3 years ago • 0 comments

For the convenience of locating the data, I directly queried userReserves by id

{
  userReserves(where: {
      id: "0xe813e410f1841c06e40bff0407f7f4b63bc3ff360x7ceb23fd6bc0add59e62ac25578270cff1b9f6190xd05e3e715d945b59290df0ae8ef85c1bdb684744"
    }) {
      id
      reserve {
        symbol,
        underlyingAsset
      },
      user {
        id
      }
      currentATokenBalance,
      currentStableDebt,
      scaledATokenBalance
      currentVariableDebt,
    }
  
}

I got a response like this

{
  "data": {
    "userReserves": [
      {
        "id": "0xe813e410f1841c06e40bff0407f7f4b63bc3ff360x7ceb23fd6bc0add59e62ac25578270cff1b9f6190xd05e3e715d945b59290df0ae8ef85c1bdb684744",
        "reserve": {
          "symbol": "WETH",
          "underlyingAsset": "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619"
        },
        "user": {
          "id": "0xe813e410f1841c06e40bff0407f7f4b63bc3ff36"
        },
        "currentATokenBalance": "-313884125764640270",
        "currentStableDebt": "0",
        "scaledATokenBalance": "-312335331786059929",
        "currentVariableDebt": "0"
      }
    ]
  }
}

Why is scaledATokenBalance negative?

beyondblog avatar Mar 04 '22 13:03 beyondblog