feat: integrate Chainlink and Pyth price feeds for ynETHx:ETH #92
Open
matthiasmatt wants to merge 3 commits intomainfrom
Open
feat: integrate Chainlink and Pyth price feeds for ynETHx:ETH #92matthiasmatt wants to merge 3 commits intomainfrom
matthiasmatt wants to merge 3 commits intomainfrom
Conversation
…regate ynETH:USD pricing
Author
|
Tested on localnet: ❯ nibid q oracle exchange-rates| jq .
{
"exchange_rates": [
{
"pair": "b2btc:btc",
"exchange_rate": "1.000000000000000000"
},
{
"pair": "eth:usd",
"exchange_rate": "3202.390000000000000000"
},
{
"pair": "susda:usda",
"exchange_rate": "1.091440110782436700"
},
{
"pair": "uatom:uusd",
"exchange_rate": "2.845000000000000000"
},
{
"pair": "ubtc:uusd",
"exchange_rate": "95759.100000000000000000"
},
{
"pair": "ueth:uusd",
"exchange_rate": "3204.240000000000000000"
},
{
"pair": "unibi:uusd",
"exchange_rate": "0.013624000000000000"
},
{
"pair": "usda:usd",
"exchange_rate": "0.990928816247482200"
},
{
"pair": "usol:uusd",
"exchange_rate": "142.130000000000000000"
},
{
"pair": "ustnibi:unibi",
"exchange_rate": "1.384400431535055300"
},
{
"pair": "uusdc:uusd",
"exchange_rate": "1.000600000000000000"
},
{
"pair": "uusdt:uusd",
"exchange_rate": "1.001700000000000000"
},
{
"pair": "ynethx:eth",
"exchange_rate": "1.062980920000000000"
}
]
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for Chainlink and Pyth price feeds for the
ynETHx:ETHpair and enables aggregation ofynETH:USDpricing by combining these feeds. It also adds the Pyth Network as a new data source, updates the configuration and documentation to reflect these changes, and enhances testing to ensure the new features work as expected.New Data Sources and Feed Integrations:
ynETHx:ETH, including configuration for the Base network and contract address inchainlink.goand symbol mapping inconfig.go. [1] [2] [3]pyth.go), integration into the source registry (sources.go), and symbol mapping forynethx:ethandeth:usd. [1] [2] [3]Aggregate Price Calculation:
AggregatePriceProviderto compute theyneth:usdprice by multiplyingynethx:ethwith the best availableeth:usd(or fallback toueth:uusd), ensuring robust aggregation.Configuration and Documentation Updates:
README.mdto document the new Pyth data source, its configuration, and the new environment variables for the Base network.CHANGELOG.mdto reflect the addition of Chainlink and Pyth feeds and the aggregateynETH:USDpricing.Testing Enhancements:
pyth_test.go), extended aggregate price provider tests to cover the new aggregation logic and fallbacks, and updated Chainlink tests to include the newynETHx/ETHfeed. [1] [2] [3]Ethereum Network Support:
These changes collectively enhance the system’s ability to source and aggregate prices for new assets, improve configurability, and ensure reliability through robust testing.