aave / aave/protocol-subgraphs

Mainnet: ENS Oracle never registered - Price is zero and priceSource is 0x0

Open
#79 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

Describe the bug
ENS price is always zero, doesn't have price history, and ENS PriceSource was never registered - it's still 0x0.

Details & History:
ENS Token was added to Aave in March 2022 with Proposal 63:
https://staging.aave.com/governance/proposal/63/
And the ENS Oracle was set at block 14338029 at 07 Mar 2022:
https://etherscan.io/tx/0x47c2b4fc4c0226373a0ad1a86249f4668519447bac3504ec1cb928a9c221d35a

The corresponding AssetSourceUpdated event was emitted successfully.

But the Oracle used isn't the standard ChainLink Proxy, but a custom smart contract called EnsUsdToEnsEth that calculates ENS/ETH price from ENS_USD and USD_ETH (using two ChainLink sources):
https://etherscan.io/address/0xd4641b75015E6536E8102D98479568D05D7123Db#code

It has latestAnswer() method, but doesn't has other methods

Supposedly, this bug happens, because ENS Oracle isn't standard ChainLink proxy and doesn't have aggregator, thus doesn't pass the "try_aggregator()" call at:
https://github.com/aave/protocol-subgraphs/blob/8cc0989ffed6817176c8190c2df5eade3e732199/src/mapping/proxy-price-provider/ethereum.ts#L82

So presumably it fails there and never gets further.

To Reproduce
This query can be used in TheGraph Playground:

{
  priceOracleAsset (id: "0xc18360217d8f7ab5e7c516566761ea12ce7f9d72") {
    id
    priceSource
    priceInEth
  }
}

Expected behavior
Some workaround or exception should be made for handling the ENS oracle - it should be registered as a PriceSource and provide price updates.

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 in src/mapping/proxy-price-provider/ethereum.ts at the try_aggregator() call referenced by the issue, then reproduce the missing data with the provided priceOracleAsset GraphQL query. Trace how the ENS custom oracle is handled and verify that its PriceSource is registered and price updates are exposed for the ENS asset.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.