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

Made rewards_apy_percentage configurable up to 2 decimal places. #106

Merged
merged 2 commits into from
Oct 8, 2024

Conversation

isaacdoidge
Copy link

See #105.

@isaacdoidge isaacdoidge merged commit a1fbe15 into dev Oct 8, 2024
1 check passed
@isaacdoidge isaacdoidge deleted the issue-105 branch October 8, 2024 14:32
genesis_config.rewards_apy_percentage > 0 && genesis_config.rewards_apy_percentage < 100,
"Rewards APY must be > 0% and < 100%"
genesis_config.rewards_apy_percentage > 0 && genesis_config.rewards_apy_percentage < APY_PRECISION,
"Rewards APY must between >= 1 (i.e. 0.01%) and < 10,000 (i.e. 100%)"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@isaacdoidge , I am confused, if we need precision for 3 decimal places, shouldn't 1 mean 0.001% and 100000 should be 100%?

@@ -88,6 +90,8 @@ pub struct GenesisConfiguration {
pub min_voting_threshold: u64,
pub recurring_lockup_duration_secs: u64,
pub required_proposer_stake: u64,
// The APY rewards rate specified as a percentage plus 3 decimals of precision.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It says 3 decimal precision here but at other places I see values of 1000 for 10%. @isaacdoidge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants