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

Switch market price feed for LSDs to DIA fair value price feed #1111

Open
philippb90 opened this issue Jun 28, 2023 · 0 comments
Open

Switch market price feed for LSDs to DIA fair value price feed #1111

philippb90 opened this issue Jun 28, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@philippb90
Copy link

philippb90 commented Jun 28, 2023

Is your feature request related to a problem? Please describe.
Currently the bridge uses coingecko price feeds for all assets. This exposes the bridge to the risk of CG suddenly stopping to report prices for an asset with low liquidity such as vKSM. In addition to that, the price feeds or assets such as vKSM have low liquidity so the price can easily manipulated.

Describe the solution you'd like
Change the source of the price feed from Coingecko to DIAs fair value price feed for vKSM. For this we would have to query the total_backable and total_issued amounts from: https://api.diadata.org/customer/bifrost/state/KSM and multiply it with the market price (Price) of KSM which can be sourced from here: https://api.diadata.org/v1/assetQuotation/Kusama/0x0000000000000000000000000000000000000000

Additional context
Important: The API endpoint that fetches total_backable and total_issued currently only covers Bifrost parachain. Once people start bridging these assets over to Kintsugi DIA needs to add support for Kintsugi as well to aggregate both chains into one metric.

For details on the formula and methodology for the fair value price feed see here: https://docs.diadata.org/documentation/methodology/liquid-staked-derivatives-lsds-fair-pricing

@philippb90 philippb90 added the enhancement New feature or request label Jun 28, 2023
@nud3l nud3l added this to Backlog Jun 28, 2023
@github-project-automation github-project-automation bot moved this to New 🆕 in Backlog Jun 28, 2023
@nud3l nud3l moved this from New 🆕 to Todo ⏳ in Backlog Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

2 participants