diff --git a/contracts/RewardPool/IRewardPool.sol b/contracts/RewardPool/IRewardPool.sol index 28d98574..eadcfafc 100644 --- a/contracts/RewardPool/IRewardPool.sol +++ b/contracts/RewardPool/IRewardPool.sol @@ -250,4 +250,11 @@ interface IRewardPool { * @return Amount delegated (in MATIC wei) */ function totalDelegationOf(address validator) external view returns (uint256); + + /** + * @dev Should be called only by the Governance. + * @notice Changes the minDelegationAmount + * @param newMinDelegation New minimum delegation amount + */ + function changeMinDelegation(uint256 newMinDelegation) external; } diff --git a/contracts/RewardPool/modules/DelegationRewards.sol b/contracts/RewardPool/modules/DelegationRewards.sol index c2bc3e6e..0d7834ee 100644 --- a/contracts/RewardPool/modules/DelegationRewards.sol +++ b/contracts/RewardPool/modules/DelegationRewards.sol @@ -1,24 +1,29 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.17; -import "./../RewardPoolBase.sol"; import "./Vesting.sol"; -import "./../../common/Errors.sol"; import "./RewardsWithdrawal.sol"; +import "./../RewardPoolBase.sol"; import "./../libs/DelegationPoolLib.sol"; import "./../libs/VestingPositionLib.sol"; +import "./../../common/Errors.sol"; + abstract contract DelegationRewards is RewardPoolBase, Vesting, RewardsWithdrawal { using DelegationPoolLib for DelegationPool; using VestingPositionLib for VestingPosition; + /// @notice A constant for the minimum delegation limit + uint256 public constant MIN_DELEGATION_LIMIT = 1 ether; /// @notice Keeps the delegation pools mapping(address => DelegationPool) public delegationPools; // @note maybe this must be part of the ValidatorSet /// @notice The minimum delegation amount to be delegated uint256 public minDelegation; + error InvalidMinDelegation(); + // _______________ Initializer _______________ function __DelegationRewards_init(uint256 newMinDelegation) internal onlyInitializing { @@ -26,9 +31,7 @@ abstract contract DelegationRewards is RewardPoolBase, Vesting, RewardsWithdrawa } function __DelegationRewards_init_unchained(uint256 newMinDelegation) internal onlyInitializing { - // TODO: all requre statements should be replaced with Error - require(newMinDelegation >= 1 ether, "INVALID_MIN_DELEGATION"); - minDelegation = newMinDelegation; + _changeMinDelegation(newMinDelegation); } // _______________ External functions _______________ @@ -368,6 +371,13 @@ abstract contract DelegationRewards is RewardPoolBase, Vesting, RewardsWithdrawa emit PositionRewardClaimed(msg.sender, validator, sumReward); } + /** + * @inheritdoc IRewardPool + */ + function changeMinDelegation(uint256 newMinDelegation) external onlyRole(DEFAULT_ADMIN_ROLE) { + _changeMinDelegation(newMinDelegation); + } + // _______________ Public functions _______________ /** @@ -403,6 +413,11 @@ abstract contract DelegationRewards is RewardPoolBase, Vesting, RewardsWithdrawa // _______________ Private functions _______________ + function _changeMinDelegation(uint256 newMinDelegation) private { + if (newMinDelegation < MIN_DELEGATION_LIMIT) revert InvalidMinDelegation(); + minDelegation = newMinDelegation; + } + function _noRewardConditions(VestingPosition memory position) private view returns (bool) { // If still unused position, there is no reward if (position.start == 0) { diff --git a/contracts/ValidatorSet/modules/Staking/IStaking.sol b/contracts/ValidatorSet/modules/Staking/IStaking.sol index 99c9c709..94c170b2 100644 --- a/contracts/ValidatorSet/modules/Staking/IStaking.sol +++ b/contracts/ValidatorSet/modules/Staking/IStaking.sol @@ -7,6 +7,9 @@ interface IStaking { event Staked(address indexed validator, uint256 amount); event Unstaked(address indexed validator, uint256 amount); + error InvalidCommission(uint256 commission); + error InvalidMinStake(); + /** * @notice Sets commission for validator. * @param newCommission New commission (100 = 100%) @@ -37,4 +40,11 @@ interface IStaking { * @param amount Amount to unstake */ function unstake(uint256 amount) external; + + /** + * @dev Should be called by the Governance. + * @notice Changes minimum stake required for validators. + * @param newMinStake New minimum stake + */ + function changeMinStake(uint256 newMinStake) external; } diff --git a/contracts/ValidatorSet/modules/Staking/Staking.sol b/contracts/ValidatorSet/modules/Staking/Staking.sol index a590eaba..e8536d95 100644 --- a/contracts/ValidatorSet/modules/Staking/Staking.sol +++ b/contracts/ValidatorSet/modules/Staking/Staking.sol @@ -17,6 +17,8 @@ abstract contract Staking is LiquidStaking, StateSyncer { + /// @notice A constant for the minimum stake limit + uint256 public constant MIN_STAKE_LIMIT = 1 ether; /// @notice A constant for the maximum comission a validator can receive from the delegator's rewards uint256 public constant MAX_COMMISSION = 100; /// @notice A state variable to keep the minimum amount of stake @@ -38,8 +40,8 @@ abstract contract Staking is } function __Staking_init_unchained(uint256 newMinStake) internal onlyInitializing { - if (newMinStake < 1 ether) revert InvalidMinStake(newMinStake); - minStake = newMinStake; + _changeMinStake(newMinStake); + } // _______________ External functions _______________ @@ -91,6 +93,13 @@ abstract contract Staking is emit Unstaked(msg.sender, amount); } + /** + * @inheritdoc IStaking + */ + function changeMinStake(uint256 newMinStake) external onlyOwner { + _changeMinStake(newMinStake); + } + // _______________ Internal functions _______________ function _register( @@ -145,6 +154,11 @@ abstract contract Staking is emit CommissionUpdated(validator, newCommission); } + function _changeMinStake(uint256 newMinStake) private { + if (newMinStake < MIN_STAKE_LIMIT) revert InvalidMinStake(); + minStake = newMinStake; + } + // slither-disable-next-line unused-state,naming-convention uint256[50] private __gap; } diff --git a/contracts/common/Errors.sol b/contracts/common/Errors.sol index 13184c7c..7b33bc5e 100644 --- a/contracts/common/Errors.sol +++ b/contracts/common/Errors.sol @@ -7,5 +7,3 @@ error DelegateRequirement(string src, string msg); error InvalidSignature(address signer); error ZeroAddress(); error SendFailed(); -error InvalidCommission(uint256 commission); -error InvalidMinStake(uint256 minStake); diff --git a/docs/RewardPool/IRewardPool.md b/docs/RewardPool/IRewardPool.md index 7907a93e..cbbfe10b 100644 --- a/docs/RewardPool/IRewardPool.md +++ b/docs/RewardPool/IRewardPool.md @@ -81,6 +81,22 @@ Returns the total reward that is generated for a position |---|---|---| | reward | uint256 | for the delegator | +### changeMinDelegation + +```solidity +function changeMinDelegation(uint256 newMinDelegation) external nonpayable +``` + +Changes the minDelegationAmount + +*Should be called only by the Governance.* + +#### Parameters + +| Name | Type | Description | +|---|---|---| +| newMinDelegation | uint256 | New minimum delegation amount | + ### claimDelegatorReward ```solidity diff --git a/docs/RewardPool/RewardPool.md b/docs/RewardPool/RewardPool.md index 459f6889..63cc0557 100644 --- a/docs/RewardPool/RewardPool.md +++ b/docs/RewardPool/RewardPool.md @@ -123,6 +123,23 @@ function MAX_RSI_BONUS() external view returns (uint256) +#### Returns + +| Name | Type | Description | +|---|---|---| +| _0 | uint256 | undefined | + +### MIN_DELEGATION_LIMIT + +```solidity +function MIN_DELEGATION_LIMIT() external view returns (uint256) +``` + +A constant for the minimum delegation limit + + + + #### Returns | Name | Type | Description | @@ -383,6 +400,22 @@ Returns the total reward that is generated for a position |---|---|---| | reward | uint256 | for the delegator | +### changeMinDelegation + +```solidity +function changeMinDelegation(uint256 newMinDelegation) external nonpayable +``` + +Changes the minDelegationAmount + +*Should be called only by the Governance.* + +#### Parameters + +| Name | Type | Description | +|---|---|---| +| newMinDelegation | uint256 | New minimum delegation amount | + ### claimDelegatorReward ```solidity @@ -1735,6 +1768,17 @@ error DelegateRequirement(string src, string msg) | src | string | undefined | | msg | string | undefined | +### InvalidMinDelegation + +```solidity +error InvalidMinDelegation() +``` + + + + + + ### InvalidRSI ```solidity diff --git a/docs/RewardPool/RewardPoolBase.md b/docs/RewardPool/RewardPoolBase.md index 84d2c424..1777db32 100644 --- a/docs/RewardPool/RewardPoolBase.md +++ b/docs/RewardPool/RewardPoolBase.md @@ -81,6 +81,22 @@ Returns the total reward that is generated for a position |---|---|---| | reward | uint256 | for the delegator | +### changeMinDelegation + +```solidity +function changeMinDelegation(uint256 newMinDelegation) external nonpayable +``` + +Changes the minDelegationAmount + +*Should be called only by the Governance.* + +#### Parameters + +| Name | Type | Description | +|---|---|---| +| newMinDelegation | uint256 | New minimum delegation amount | + ### claimDelegatorReward ```solidity diff --git a/docs/RewardPool/modules/DelegationRewards.md b/docs/RewardPool/modules/DelegationRewards.md index 42402c47..4c307320 100644 --- a/docs/RewardPool/modules/DelegationRewards.md +++ b/docs/RewardPool/modules/DelegationRewards.md @@ -123,6 +123,23 @@ function MAX_RSI_BONUS() external view returns (uint256) +#### Returns + +| Name | Type | Description | +|---|---|---| +| _0 | uint256 | undefined | + +### MIN_DELEGATION_LIMIT + +```solidity +function MIN_DELEGATION_LIMIT() external view returns (uint256) +``` + +A constant for the minimum delegation limit + + + + #### Returns | Name | Type | Description | @@ -281,6 +298,22 @@ Returns the total reward that is generated for a position |---|---|---| | reward | uint256 | for the delegator | +### changeMinDelegation + +```solidity +function changeMinDelegation(uint256 newMinDelegation) external nonpayable +``` + +Changes the minDelegationAmount + +*Should be called only by the Governance.* + +#### Parameters + +| Name | Type | Description | +|---|---|---| +| newMinDelegation | uint256 | New minimum delegation amount | + ### claimDelegatorReward ```solidity @@ -1525,6 +1558,17 @@ error DelegateRequirement(string src, string msg) | src | string | undefined | | msg | string | undefined | +### InvalidMinDelegation + +```solidity +error InvalidMinDelegation() +``` + + + + + + ### InvalidRSI ```solidity diff --git a/docs/RewardPool/modules/StakingRewards.md b/docs/RewardPool/modules/StakingRewards.md index 60c69baa..2589332d 100644 --- a/docs/RewardPool/modules/StakingRewards.md +++ b/docs/RewardPool/modules/StakingRewards.md @@ -281,6 +281,22 @@ Returns the total reward that is generated for a position |---|---|---| | reward | uint256 | for the delegator | +### changeMinDelegation + +```solidity +function changeMinDelegation(uint256 newMinDelegation) external nonpayable +``` + +Changes the minDelegationAmount + +*Should be called only by the Governance.* + +#### Parameters + +| Name | Type | Description | +|---|---|---| +| newMinDelegation | uint256 | New minimum delegation amount | + ### claimDelegatorReward ```solidity diff --git a/docs/ValidatorSet/ValidatorSet.md b/docs/ValidatorSet/ValidatorSet.md index fbc07066..61003217 100644 --- a/docs/ValidatorSet/ValidatorSet.md +++ b/docs/ValidatorSet/ValidatorSet.md @@ -38,6 +38,23 @@ A constant for the maximum comission a validator can receive from the delegator& +#### Returns + +| Name | Type | Description | +|---|---|---| +| _0 | uint256 | undefined | + +### MIN_STAKE_LIMIT + +```solidity +function MIN_STAKE_LIMIT() external view returns (uint256) +``` + +A constant for the minimum stake limit + + + + #### Returns | Name | Type | Description | @@ -229,6 +246,22 @@ function bls() external view returns (contract IBLS) |---|---|---| | _0 | contract IBLS | undefined | +### changeMinStake + +```solidity +function changeMinStake(uint256 newMinStake) external nonpayable +``` + +Changes minimum stake required for validators. + +*Should be called by the Governance.* + +#### Parameters + +| Name | Type | Description | +|---|---|---| +| newMinStake | uint256 | New minimum stake | + ### changeWithdrawalWaitPeriod ```solidity @@ -1433,18 +1466,13 @@ error InvalidCommission(uint256 commission) ### InvalidMinStake ```solidity -error InvalidMinStake(uint256 minStake) +error InvalidMinStake() ``` -#### Parameters - -| Name | Type | Description | -|---|---|---| -| minStake | uint256 | undefined | ### InvalidSignature diff --git a/docs/ValidatorSet/modules/Staking/IStaking.md b/docs/ValidatorSet/modules/Staking/IStaking.md index cd26a7bc..8d2fe495 100644 --- a/docs/ValidatorSet/modules/Staking/IStaking.md +++ b/docs/ValidatorSet/modules/Staking/IStaking.md @@ -10,6 +10,22 @@ ## Methods +### changeMinStake + +```solidity +function changeMinStake(uint256 newMinStake) external nonpayable +``` + +Changes minimum stake required for validators. + +*Should be called by the Governance.* + +#### Parameters + +| Name | Type | Description | +|---|---|---| +| newMinStake | uint256 | New minimum stake | + ### register ```solidity @@ -161,3 +177,33 @@ event Unstaked(address indexed validator, uint256 amount) +## Errors + +### InvalidCommission + +```solidity +error InvalidCommission(uint256 commission) +``` + + + + + +#### Parameters + +| Name | Type | Description | +|---|---|---| +| commission | uint256 | undefined | + +### InvalidMinStake + +```solidity +error InvalidMinStake() +``` + + + + + + + diff --git a/docs/ValidatorSet/modules/Staking/Staking.md b/docs/ValidatorSet/modules/Staking/Staking.md index aa7b1f8c..d16c9da5 100644 --- a/docs/ValidatorSet/modules/Staking/Staking.md +++ b/docs/ValidatorSet/modules/Staking/Staking.md @@ -38,6 +38,23 @@ A constant for the maximum comission a validator can receive from the delegator& +#### Returns + +| Name | Type | Description | +|---|---|---| +| _0 | uint256 | undefined | + +### MIN_STAKE_LIMIT + +```solidity +function MIN_STAKE_LIMIT() external view returns (uint256) +``` + +A constant for the minimum stake limit + + + + #### Returns | Name | Type | Description | @@ -127,6 +144,22 @@ function bls() external view returns (contract IBLS) |---|---|---| | _0 | contract IBLS | undefined | +### changeMinStake + +```solidity +function changeMinStake(uint256 newMinStake) external nonpayable +``` + +Changes minimum stake required for validators. + +*Should be called by the Governance.* + +#### Parameters + +| Name | Type | Description | +|---|---|---| +| newMinStake | uint256 | New minimum stake | + ### changeWithdrawalWaitPeriod ```solidity @@ -860,6 +893,17 @@ error InvalidCommission(uint256 commission) |---|---|---| | commission | uint256 | undefined | +### InvalidMinStake + +```solidity +error InvalidMinStake() +``` + + + + + + ### InvalidSignature ```solidity diff --git a/test/LiquidityToken/LiquidityToken.test.ts b/test/LiquidityToken/LiquidityToken.test.ts index f4252c8d..cf253c69 100644 --- a/test/LiquidityToken/LiquidityToken.test.ts +++ b/test/LiquidityToken/LiquidityToken.test.ts @@ -36,7 +36,7 @@ describe("LiquidityToken", async function () { return { token }; } - it("should have default admin role set", async () => { + it("should have default admin role set", async () => { const { token } = await loadFixture(deployFixture); expect(await token.DEFAULT_ADMIN_ROLE()).equal(governerRole); }); diff --git a/test/RewardPool/APR.test.ts b/test/RewardPool/APR.test.ts index 3bf8dfdb..86449e16 100644 --- a/test/RewardPool/APR.test.ts +++ b/test/RewardPool/APR.test.ts @@ -18,8 +18,10 @@ export function RunAPRTests(): void { it("should initialize correctly", async function () { const { rewardPool } = await loadFixture(this.fixtures.initializedValidatorSetStateFixture); const managerRole = await rewardPool.MANAGER_ROLE(); + const adminRole = await rewardPool.DEFAULT_ADMIN_ROLE(); - expect(await rewardPool.hasRole(managerRole, this.signers.system.address)).to.be.true; + expect(await rewardPool.hasRole(managerRole, this.signers.governance.address)).to.be.true; + expect(await rewardPool.hasRole(adminRole, this.signers.governance.address)).to.be.true; expect(await rewardPool.base()).to.be.equal(INITIAL_BASE_APR); expect(await rewardPool.macroFactor()).to.be.equal(INITIAL_MACRO_FACTOR); expect(await rewardPool.rsi()).to.be.equal(0); @@ -90,7 +92,7 @@ export function RunAPRTests(): void { it("should set base", async function () { const { rewardPool } = await loadFixture(this.fixtures.initializedValidatorSetStateFixture); - await rewardPool.connect(this.signers.system).setBase(1500); + await rewardPool.connect(this.signers.governance).setBase(1500); expect(await rewardPool.base()).to.be.equal(1500); }); @@ -109,7 +111,7 @@ export function RunAPRTests(): void { it("should set macro", async function () { const { rewardPool } = await loadFixture(this.fixtures.initializedValidatorSetStateFixture); - await rewardPool.connect(this.signers.system).setMacro(10000); + await rewardPool.connect(this.signers.governance).setMacro(10000); expect(await rewardPool.macroFactor()).to.be.equal(10000); }); @@ -128,7 +130,7 @@ export function RunAPRTests(): void { it("should revert when trying to set higher rsi", async function () { const { rewardPool } = await loadFixture(this.fixtures.initializedValidatorSetStateFixture); - await expect(rewardPool.connect(this.signers.system).setRSI(20000)).to.be.revertedWithCustomError( + await expect(rewardPool.connect(this.signers.governance).setRSI(20000)).to.be.revertedWithCustomError( rewardPool, "InvalidRSI" ); @@ -137,7 +139,7 @@ export function RunAPRTests(): void { it("should set rsi to zero, if the input is lower than the minimum", async function () { const { rewardPool } = await loadFixture(this.fixtures.initializedValidatorSetStateFixture); const newRSI = MIN_RSI_BONUS.div(2); // ensure it will be lower than the min - await rewardPool.connect(this.signers.system).setRSI(newRSI); + await rewardPool.connect(this.signers.governance).setRSI(newRSI); expect(await rewardPool.rsi()).to.be.equal(0); }); @@ -145,7 +147,7 @@ export function RunAPRTests(): void { it("should set rsi", async function () { const { rewardPool } = await loadFixture(this.fixtures.initializedValidatorSetStateFixture); - await rewardPool.connect(this.signers.system).setRSI(12000); + await rewardPool.connect(this.signers.governance).setRSI(12000); expect(await rewardPool.rsi()).to.be.equal(12000); }); diff --git a/test/RewardPool/RewardPool.test.ts b/test/RewardPool/RewardPool.test.ts index b0d55e88..db75f481 100644 --- a/test/RewardPool/RewardPool.test.ts +++ b/test/RewardPool/RewardPool.test.ts @@ -16,7 +16,7 @@ import { } from "../helper"; export function RunStakingClaimTests(): void { - describe("claim position reward", function () { + describe("Claim position reward", function () { it("should not be able to claim when active", async function () { const { stakerValidatorSet, systemValidatorSet, rewardPool } = await loadFixture( this.fixtures.newVestingValidatorFixture diff --git a/test/ValidatorSet/Delegation.test.ts b/test/ValidatorSet/Delegation.test.ts index df0297b1..59c89639 100644 --- a/test/ValidatorSet/Delegation.test.ts +++ b/test/ValidatorSet/Delegation.test.ts @@ -5,7 +5,7 @@ import * as hre from "hardhat"; // eslint-disable-next-line camelcase import { VestManager__factory } from "../../typechain-types"; -import { VESTING_DURATION_WEEKS, WEEK } from "../constants"; +import { ERRORS, VESTING_DURATION_WEEKS, WEEK } from "../constants"; import { calculatePenalty, claimPositionRewards, commitEpoch, commitEpochs, getUserManager } from "../helper"; import { RunDelegateClaimTests, @@ -14,6 +14,43 @@ import { } from "../RewardPool/RewardPool.test"; export function RunDelegationTests(): void { + describe("Change minDelegate", function () { + it("should revert if non-default_admin_role address try to change MinDelegation", async function () { + const { rewardPool } = await loadFixture(this.fixtures.delegatedFixture); + + const adminRole = await rewardPool.DEFAULT_ADMIN_ROLE(); + + await expect( + rewardPool.connect(this.signers.validators[0]).changeMinDelegation(this.minDelegation.mul(2)) + ).to.be.revertedWith(ERRORS.accessControl(this.signers.validators[0].address.toLocaleLowerCase(), adminRole)); + + expect(await rewardPool.minDelegation()).to.be.equal(this.minDelegation); + }); + + it("should revert if MinDelegation is too low", async function () { + const { rewardPool } = await loadFixture(this.fixtures.delegatedFixture); + + const newLowMinDelegation = this.minStake.div(2); + + await expect( + rewardPool.connect(this.signers.governance).changeMinDelegation(newLowMinDelegation) + ).to.be.revertedWithCustomError(rewardPool, "InvalidMinDelegation"); + + expect(await rewardPool.minDelegation()).to.be.equal(this.minDelegation); + }); + + it("should change MinDelegation by default_admin_role address", async function () { + const { rewardPool } = await loadFixture(this.fixtures.delegatedFixture); + + const newMinDelegation = this.minDelegation.mul(2); + + await expect(rewardPool.connect(this.signers.governance).changeMinDelegation(newMinDelegation)).to.not.be + .reverted; + + expect(await rewardPool.minDelegation()).to.be.equal(newMinDelegation); + }); + }); + describe("Delegate", function () { it("should revert when delegating zero amount", async function () { const { validatorSet } = await loadFixture(this.fixtures.withdrawableFixture); diff --git a/test/ValidatorSet/Staking.test.ts b/test/ValidatorSet/Staking.test.ts index 94a1b09e..6bdda6e7 100644 --- a/test/ValidatorSet/Staking.test.ts +++ b/test/ValidatorSet/Staking.test.ts @@ -8,6 +8,38 @@ import { calculatePenalty, commitEpochs, getValidatorReward, registerValidator } import { RunStakingClaimTests } from "../RewardPool/RewardPool.test"; export function RunStakingTests(): void { + describe("Change minStake", function () { + it("should revert if non-Govern address try to change min stake", async function () { + const { validatorSet } = await loadFixture(this.fixtures.registeredValidatorsStateFixture); + + await expect(validatorSet.connect(this.signers.validators[0]).changeMinStake(this.minStake)).to.be.revertedWith( + "Ownable: caller is not the owner" + ); + }); + + it("should revert if minStake is too low", async function () { + const { validatorSet } = await loadFixture(this.fixtures.registeredValidatorsStateFixture); + + const newMinStakeLow = this.minStake.div(2); + + await expect( + validatorSet.connect(this.signers.governance).changeMinStake(newMinStakeLow) + ).to.be.revertedWithCustomError(validatorSet, "InvalidMinStake"); + + expect(await validatorSet.minStake()).to.be.equal(this.minStake); + }); + + it("should change min stake by Govern address", async function () { + const { validatorSet } = await loadFixture(this.fixtures.registeredValidatorsStateFixture); + + const newMinStake = this.minStake.mul(2); + + await expect(validatorSet.connect(this.signers.governance).changeMinStake(newMinStake)).to.not.be.reverted; + + expect(await validatorSet.minStake()).to.be.equal(newMinStake); + }); + }); + describe("Stake", function () { it("should allow only registered validators to stake", async function () { // * Only the first three validators are being registered diff --git a/test/fixtures.ts b/test/fixtures.ts index 6d6df520..0fef3fed 100644 --- a/test/fixtures.ts +++ b/test/fixtures.ts @@ -83,7 +83,7 @@ async function initializedValidatorSetStateFixtureFunction(this: Mocha.Context) validatorSet.address, this.signers.rewardWallet.address, this.minDelegation, - this.signers.system.address + this.signers.governance.address ); await liquidToken.initialize("Liquidity Token", "LQT", this.signers.governance.address, systemValidatorSet.address); await systemValidatorSet.initialize( @@ -192,7 +192,7 @@ async function stakedValidatorsStateFixtureFunction(this: Mocha.Context) { ); // set the rsi to the minimum value - await rewardPool.connect(this.signers.system).setRSI(MIN_RSI_BONUS); + await rewardPool.connect(this.signers.governance).setRSI(MIN_RSI_BONUS); await validatorSet.connect(this.signers.validators[0]).stake({ value: this.minStake.mul(2) }); await validatorSet.connect(this.signers.validators[1]).stake({ value: this.minStake.mul(2) });