feat(kmd): reduce KMD AUR from 5% to 0.01% starting at nS7HardforkHeight#1841
feat(kmd): reduce KMD AUR from 5% to 0.01% starting at nS7HardforkHeight#1841
Conversation
onur-ozkan
left a comment
There was a problem hiding this comment.
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 GLEECBTC/komodo-daemon#584 (review) Related code excerpt in mm2 |
caglaryucekaya
left a comment
There was a problem hiding this comment.
LGTM, I have just a minor comment
| // Some of these lines are ported as is from Komodo codebase | ||
| 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.
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