diff --git a/contracts/contracts/system_contracts/consensus/PublicDelegation/PublicDelegationStorage.sol b/contracts/contracts/system_contracts/consensus/PublicDelegation/PublicDelegationStorage.sol index c05673357..950f11d73 100644 --- a/contracts/contracts/system_contracts/consensus/PublicDelegation/PublicDelegationStorage.sol +++ b/contracts/contracts/system_contracts/consensus/PublicDelegation/PublicDelegationStorage.sol @@ -26,7 +26,7 @@ abstract contract PublicDelegationStorage is IPublicDelegation { uint256 public constant VERSION = 1; - uint256 public constant MAX_COMMISSION_RATE = 3e3; // 30% + uint256 public constant MAX_COMMISSION_RATE = 1e4; // 100% uint256 public constant COMMISSION_DENOMINATOR = 1e4; diff --git a/contracts/test/CnV3/cnStakingV3.test.ts b/contracts/test/CnV3/cnStakingV3.test.ts index 80110b56c..f4ff7e460 100644 --- a/contracts/test/CnV3/cnStakingV3.test.ts +++ b/contracts/test/CnV3/cnStakingV3.test.ts @@ -771,7 +771,7 @@ describe("CnStakingV3 tests", function () { ); // check public delegation contract - expect(await pd1.MAX_COMMISSION_RATE()).to.equal(3e3); + expect(await pd1.MAX_COMMISSION_RATE()).to.equal(1e4); expect(await pd1.COMMISSION_DENOMINATOR()).to.equal(1e4); expect(await pd1.CONTRACT_TYPE()).to.equal("PublicDelegation"); expect(await pd1.VERSION()).to.equal(1); @@ -786,7 +786,7 @@ describe("CnStakingV3 tests", function () { // Too high commission rate const pdParam = new ethers.utils.AbiCoder().encode( ["tuple(address, address, uint256, string)"], - [[deployer.address, deployer.address, 3001, "GC"]] + [[deployer.address, deployer.address, 10001, "GC"]] ); await expect( diff --git a/contracts/test/PublicDelegation/publicDelegation.test.ts b/contracts/test/PublicDelegation/publicDelegation.test.ts index 23368df67..ba7b834b6 100644 --- a/contracts/test/PublicDelegation/publicDelegation.test.ts +++ b/contracts/test/PublicDelegation/publicDelegation.test.ts @@ -100,7 +100,7 @@ describe("PublicDelegation tests", function () { }); it("#updateCommissionRate: can't set commissionRate to more than MAX_COMMISSION_RATE", async function () { const { pd1 } = await loadFixture(cnV3PublicDelegationFixture); - await expect(pd1.updateCommissionRate(3001)).to.be.revertedWith( + await expect(pd1.updateCommissionRate(10001)).to.be.revertedWith( "Commission rate is too high." ); });