aave / aave/protocol-subgraphs

Aave Arc USDC priceInEth is incorrect

Open
#86 0 comments 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

Describe the bug
Aave ARC subgraph seems to providing a incorrect priceInEth value of USDC when compared to the price returned from the on-chain Oracle (and Aave v2 sub-graph).

Screenshot 2022-11-03 at 10 44 18 AM

Screenshot 2022-11-03 at 10 24 35 AM

To Reproduce
Run any query that will return USDC price in eth
E.g

{
   users(
      first: 1,
      skip: 9,
      orderBy:id,
      orderDirection:desc,
      where:{
         borrowedReservesCount_gt:0
      }
   )
   {
      id
      collateralReserve:reserves(
         where:{
            currentATokenBalance_gt:0
            reserve_:{symbol: "USDC"}
         }
      ){
         currentATokenBalance
         reserve{
            symbol
            underlyingAsset
            price{
               priceInEth
            }
         }
      }
   }
}

Expected behavior
Price returned from subgraph to match on chain oracle price

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 Aave Arc subgraph code that produces reserve.price.priceInEth and reproduce the supplied GraphQL query. Compare the USDC result with the linked on-chain Oracle and the Aave v2 subgraph; done means the subgraph price matches the oracle value.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
api, blockchain
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.