Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sAVAX oracle price #81

Open
sendra opened this issue Aug 18, 2022 · 0 comments
Open

sAVAX oracle price #81

sendra opened this issue Aug 18, 2022 · 0 comments

Comments

@sendra
Copy link
Contributor

sendra commented Aug 18, 2022

Describe the bug
On the Avalanche V3 subgraph the oracle price for sAVAX is set to 0x0 which makes the price always 0

  • The problem resides that the sAVAX oracle is not a chainlink one, so when trying to get the aggregator (normal behaviour on cl oracles) it fails, then it doesn't save it. This can be found on this line of the mapping proxy-price-provider/v3
  • A solution would be to create specific code for avalanche v3, that checks if the registered oracle is for asset sAVAX then add specific logic to get the cl oracle from the sAVAX oracle registered, to listen to its events. Then when an event of this specific oracle is triggered, the code would need to call the original sAVAX oracle to get latestAnswer.

To Reproduce
run this query:

{
  reserves(where:{symbol: "sAVAX"}) {
    underlyingAsset
    symbol
    price {
      priceSource
      priceInEth
    }
  }
}

on the Avlanche V3 subgraph

Expected behavior
Subgraph should have the correct pricing, listening to the correct oracle: https://snowtrace.io/address/0xc9245871D69BF4c36c6F2D15E0D68Ffa883FE1A7#readContract

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant