@@ -28,6 +28,7 @@ contract CollateralManagementContract is
2828 /// @notice The role that can slash collateral from the contract by using
2929 /// the slashPegInCollateral or slashPegOutCollateral functions
3030 bytes32 public constant COLLATERAL_SLASHER = keccak256 ("COLLATERAL_SLASHER " );
31+ uint256 public constant TOTAL_REWARD_PERCENTAGE = 10_000 ;
3132
3233 uint256 private _minCollateral;
3334 uint256 private _resignDelayInBlocks;
@@ -107,7 +108,6 @@ contract CollateralManagementContract is
107108 _minCollateral = minCollateral;
108109 _resignDelayInBlocks = resignDelayInBlocks;
109110 _rewardPercentage = rewardPercentage;
110- _penalties = 0 ;
111111 }
112112
113113 /// @notice Sets the minimum collateral required for a liquidity provider **per operation**
@@ -145,7 +145,7 @@ contract CollateralManagementContract is
145145 _pegInCollateral[quote.liquidityProviderRskAddress]
146146 );
147147 _pegInCollateral[quote.liquidityProviderRskAddress] -= penalty;
148- uint256 punisherReward = (penalty * _rewardPercentage) / 100 ;
148+ uint256 punisherReward = (penalty * _rewardPercentage) / TOTAL_REWARD_PERCENTAGE ;
149149 _penalties += penalty - punisherReward;
150150 _rewards[punisher] += punisherReward;
151151 emit Penalized (
@@ -169,7 +169,7 @@ contract CollateralManagementContract is
169169 _pegOutCollateral[quote.lpRskAddress]
170170 );
171171 _pegOutCollateral[quote.lpRskAddress] -= penalty;
172- uint256 punisherReward = (penalty * _rewardPercentage) / 100 ;
172+ uint256 punisherReward = (penalty * _rewardPercentage) / TOTAL_REWARD_PERCENTAGE ;
173173 _penalties += penalty - punisherReward;
174174 _rewards[punisher] += punisherReward;
175175 emit Penalized (
0 commit comments