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

Oracle solution for dApp Staking v3 #1145

Closed
Dinonard opened this issue Jan 19, 2024 · 0 comments · Fixed by #1197
Closed

Oracle solution for dApp Staking v3 #1145

Dinonard opened this issue Jan 19, 2024 · 0 comments · Fixed by #1197
Labels
project Issue is part of an ongoing project

Comments

@Dinonard
Copy link
Member

Description

When calculating tier rewards for dApp staking v3, average ASTR price over some time period is considered.
This is to prevent rewards from getting excessively high as ASTR price rises, or them getting to small as the price falls.

Right now a permissioned solution exists, a simple pallet, StaticPriceProvider, which can be configured using privileged origin.
However, we want to have a true permissionless solution where no manual intervention is required.

Requirements

The solution should aggregate & calculate average price over some time period.
The time period is equal to the duration of period in dApp staking v3, so we can expect something from 3-6 months.
This should be done efficiently, without consuming excessive storage amount (e.g. storing a huge vec is out of question 🙂).

@Dinonard Dinonard added the project Issue is part of an ongoing project label Jan 19, 2024
@Dinonard Dinonard linked a pull request Apr 2, 2024 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project Issue is part of an ongoing project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant