Skip to content

Commit

Permalink
Update rewards amounts for mainnet (#2210)
Browse files Browse the repository at this point in the history
# Goal
The goal of this PR is to put in the final constant values for Provider Boosting for mainnet
Closes #2201
  • Loading branch information
shannonwells authored Nov 1, 2024
1 parent 4d7a5d7 commit 79d7757
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions e2e/capacity/list_unclaimed_rewards.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ describe('Capacity: list_unclaimed_rewards', function () {
// Boosted entire eras, should have rewards
assert.equal(result[1].stakedAmount.toHuman(), '100,000,000');
assert.equal(result[1].eligibleAmount.toHuman(), '100,000,000');
assert.equal(result[1].earnedAmount.toHuman(), '380,000');
assert.equal(result[1].earnedAmount.toHuman(), '575,000');

assert.equal(result[2].stakedAmount.toHuman(), '100,000,000');
assert.equal(result[2].eligibleAmount.toHuman(), '100,000,000');
assert.equal(result[2].earnedAmount.toHuman(), '380,000');
assert.equal(result[2].earnedAmount.toHuman(), '575,000');

assert.equal(result[3].stakedAmount.toHuman(), '100,000,000');
assert.equal(result[3].eligibleAmount.toHuman(), '100,000,000');
assert.equal(result[3].earnedAmount.toHuman(), '380,000');
assert.equal(result[3].earnedAmount.toHuman(), '575,000');
});
});
2 changes: 1 addition & 1 deletion runtime/common/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ parameter_types! {
// 1:50 Capacity:Token, must be declared this way instead of using `from_rational` because of
// ```error[E0015]: cannot call non-const fn `Perbill::from_rational::<u32>` in constant functions```
pub const CapacityPerToken: Perbill = Perbill::from_percent(2);
pub const CapacityRewardCap: Permill = Permill::from_parts(3_800); // 0.38% or 0.0038 per RewardEra
pub const CapacityRewardCap: Permill = Permill::from_parts(5_750); // 0.575% or 0.00575 per RewardEra
}
pub type CapacityRewardEraLength =
ConstU32<{ prod_or_testnet_or_local!(14 * DAYS, 1 * HOURS, 50) }>;
Expand Down
6 changes: 3 additions & 3 deletions runtime/frequency/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("frequency"),
impl_name: create_runtime_str!("frequency"),
authoring_version: 1,
spec_version: 130,
spec_version: 131,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand All @@ -418,7 +418,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("frequency-testnet"),
impl_name: create_runtime_str!("frequency"),
authoring_version: 1,
spec_version: 130,
spec_version: 131,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down Expand Up @@ -586,7 +586,7 @@ impl pallet_capacity::Config for Runtime {
type RewardsProvider = Capacity;
type MaxRetargetsPerRewardEra = ConstU32<2>;
// Value determined by desired inflation rate limits for chosen economic model
type RewardPoolPerEra = ConstU128<{ currency::CENTS.saturating_mul(172_602_740u128) }>;
type RewardPoolPerEra = ConstU128<{ currency::CENTS.saturating_mul(153_424_650u128) }>;
type RewardPercentCap = CapacityRewardCap;
// Must evenly divide ProviderBoostHistoryLimit
type RewardPoolChunkLength = RewardPoolChunkLength;
Expand Down

0 comments on commit 79d7757

Please sign in to comment.