-
Notifications
You must be signed in to change notification settings - Fork 21
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
rewards halvening #577
rewards halvening #577
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would we not like to gate this feature by date comparison since these rewards are usually calculated in the context of a DateTime range “epoch” period and go ahead and merge this well ahead of the event?
I mean we could but it does add additional risk and will make it that bit more difficult to test and verify before going live. I think merging on the day is likely the best scenario here. The plan is to implement the reward curve into the code post this halving |
Would it make more sense to define some constant that is halving? So instead of having to manually halve all of the constants in the tests, we can just divide them by the constant? |
826a2b8
to
60c6ce1
Compare
@@ -18,7 +18,7 @@ const DEFAULT_PREC: u32 = 15; | |||
lazy_static! { | |||
// TODO: year 1 emissions allocate 30% of total to PoC with 6% to beacons and 24% to witnesses but subsequent years back | |||
// total PoC percentage off 1.5% each year; determine how beacons and witnesses will split the subsequent years' allocations | |||
static ref REWARDS_PER_DAY: Decimal = (Decimal::from(65_000_000_000_u64) / Decimal::from(365)) * Decimal::from(1_000_000); // 178_082_191_780_822 | |||
static ref REWARDS_PER_DAY: Decimal = (Decimal::from(32_500_000_000_u64) / Decimal::from(366)) * Decimal::from(1_000_000); // 88_797_814_207_650.273224043715847 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the 366 because 2024 is a leap year? Are rewards not allocated per 365 days?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct its due to 2024 being a leap year which is accounted for in the number of days
This updates the iot and mobile verifier to account for the rewards halvening to be applied in August