From 79d77578fd0167233fe89cff02369c1f1c709d66 Mon Sep 17 00:00:00 2001 From: Shannon Wells Date: Fri, 1 Nov 2024 14:27:26 -0700 Subject: [PATCH] Update rewards amounts for mainnet (#2210) # Goal The goal of this PR is to put in the final constant values for Provider Boosting for mainnet Closes #2201 --- e2e/capacity/list_unclaimed_rewards.test.ts | 6 +++--- runtime/common/src/constants.rs | 2 +- runtime/frequency/src/lib.rs | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/e2e/capacity/list_unclaimed_rewards.test.ts b/e2e/capacity/list_unclaimed_rewards.test.ts index d77d657616..6ed2b1661e 100644 --- a/e2e/capacity/list_unclaimed_rewards.test.ts +++ b/e2e/capacity/list_unclaimed_rewards.test.ts @@ -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'); }); }); diff --git a/runtime/common/src/constants.rs b/runtime/common/src/constants.rs index 9613263ec8..a1474cadcf 100644 --- a/runtime/common/src/constants.rs +++ b/runtime/common/src/constants.rs @@ -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::` 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) }>; diff --git a/runtime/frequency/src/lib.rs b/runtime/frequency/src/lib.rs index 8f8d9f0e2f..026f04a641 100644 --- a/runtime/frequency/src/lib.rs +++ b/runtime/frequency/src/lib.rs @@ -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, @@ -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, @@ -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;