aave / aave/protocol-subgraphs
UserReserve scaledATokenBalance are wrong ?
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 150
- Forks
- 130
- PR merge metrics
- No merged PRs in 30d
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported userReserves query for the supplied id and compare currentATokenBalance with scaledATokenBalance. The payload names no source file or test, so trace the userReserves indexing and balance calculation entry points; done means explaining the negative value or correcting it and verifying the query result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, typescript
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100