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

fix: update calculation of MN rewards post v20 activation #1221

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,14 @@ class BlockchainStateDataProvider @Inject constructor(
// Activated but we have to wait for the next cycle to start realocation, nothing to do
return ret
}

if (Constants.NETWORK_PARAMETERS.isV20Active(height)) {
// Once MNRewardReallocated activates, block reward is 80% of block subsidy (+ tx fees) since treasury is 20%
// Since the MN reward needs to be equal to 60% of the block subsidy (according to the proposal), MN reward is set to 75% of the block reward.
// Previous reallocation periods are dropped.
return blockValue * 3 / 4
}

val reallocCycle = superblockCycle * 3
val nCurrentPeriod: Int =
min((height - reallocStart) / reallocCycle, periods.size - 1)
Expand Down
Loading