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

Add HDX chainlink oracle adapter #993

Open
jak-pan opened this issue Jan 21, 2025 · 4 comments · May be fixed by #1006
Open

Add HDX chainlink oracle adapter #993

jak-pan opened this issue Jan 21, 2025 · 4 comments · May be fixed by #1006

Comments

@jak-pan
Copy link
Contributor

jak-pan commented Jan 21, 2025

We need to add oracle for money market to accept HDX

@dmoka
Copy link
Contributor

dmoka commented Jan 21, 2025

We have a similar issue supporting other use cases, we should possible merge them: #874

@jak-pan
Copy link
Contributor Author

jak-pan commented Jan 22, 2025

We have a similar issue supporting other use cases, we should possible merge them: #874

These are 2 different (quasi-opposite) issues. In this one we need to export HDX price to EVM in compatible manner to be able to use it in money market.

In the other one we want to use our EVM oracles and merge with our on-chain oracles to improve the existing on-chain checks

@mrq1911
Copy link
Member

mrq1911 commented Jan 22, 2025

precompile will emulate AggregatorInterface https://github.com/aave/aave-v3-core/blob/6099f84733fbfe8c4738e0cd8c7b4637d8e8f0a9/contracts/dependencies/chainlink/AggregatorInterface.sol#L5

mainly getAnswer function

precompile address will be encoded asset id pair, source and duration and we have to make sure there is fake code in storage for those

@mrq1911
Copy link
Member

mrq1911 commented Jan 22, 2025

bonus: refactor the way how we register oracles - see moonbeam one, its way cleaner and more safe as you explicitly define all precompile params https://github.com/moonbeam-foundation/moonbeam/blob/f9cde1f74a19cb7fb748e89784ee253136bdebf3/runtime/moonbeam/src/precompiles.rs#L126-L125

@Roznovjak Roznovjak self-assigned this Jan 22, 2025
@Roznovjak Roznovjak linked a pull request Jan 29, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants