aave / aave/protocol-subgraphs

lifetimeReserveFactorAccrued is incorrect for V3 markets

Open
#75 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
150
Forks
130
PR merge metrics
No merged PRs in 30d

Description

The accruedToTreasury value looks correct, but lifetimeReserveFactorAccrued > lifetimeSupplierInterestAccrued which does not make sense as reserve factor is a percentage of supplier interest.

Query:

{
  reserves(first: 50, orderBy: lastUpdateTimestamp, orderDirection: desc) {
      id 
      underlyingAsset
      lifetimeReserveFactorAccrued
      lifetimeSuppliersInterestEarned 
      accruedToTreasury
   }
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the supplied reserves GraphQL query and trace how lifetimeReserveFactorAccrued and lifetimeSuppliersInterestEarned are calculated for V3 markets. Compare those values with accruedToTreasury and the reserve-factor relationship. Done means the indexed lifetime values are consistent with the reported supplier interest and reserve factor.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
blockchain, data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.