-
Notifications
You must be signed in to change notification settings - Fork 94
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
feat(kmd): reduce KMD AUR from 5% to 0.01% starting at nS7HardforkHeight #1841
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.
LGTM. Do we need to ship this now or wait until the hardfork?
This can be shipped now. The new AUR of 0,01% is applied to new utxos/transactions starting from nS7HardforkHeight and not old ones according to this comment KomodoPlatform/komodo#584 (review) Related code excerpt in mm2 |
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.
LGTM, I have just a minor comment
minutes -= 59; | ||
let accrued = (value / 10_512_000) * minutes; | ||
let mut accrued = (value as f64 * AUR_PER_MINUTE) as u64 * minutes; |
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.
Just curious to know, what's the purpose of introducing floating point arithmetic here, making a conversion from integer to float and vice versa, using drop_mutability!
macros instead of simple:
let accrued = if height >= N_S7_HARDFORK_HEIGHT {
(value / 10_512_000) * minutes / 500
} else {
(value / 10_512_000) * minutes
};
KMD interest calculation is adjusted to reduce AUR (Active User Rewards) from 5% to 0.01% starting from KMD block height
3484958
(Fri Jun 30 2023) according to KIP-0001fixes #1840