diff --git a/src/CSModule.sol b/src/CSModule.sol index 28486b13..23f472e2 100644 --- a/src/CSModule.sol +++ b/src/CSModule.sol @@ -94,7 +94,7 @@ contract CSModuleBase { event UnvettingFeeSet(uint256 unvettingFee); event UnvettingFeeApplied(uint256 indexed nodeOperatorId); - event ELRewardsStealingPenaltyInitiated( + event ELRewardsStealingPenaltyReported( uint256 indexed nodeOperatorId, uint256 proposedBlockNumber, uint256 stolenAmount @@ -133,6 +133,8 @@ contract CSModule is ICSModule, CSModuleBase { bytes32 public constant SIGNING_KEYS_POSITION = keccak256("lido.CommunityStakingModule.signingKeysPosition"); + uint256 public constant EL_REWARDS_STEALING_FINE = 0.1 ether; + uint256 public unvettingFee; QueueLib.Queue public queue; @@ -1034,15 +1036,18 @@ contract CSModule is ICSModule, CSModuleBase { uint256 amount ) external onlyExistingNodeOperator(nodeOperatorId) { // TODO: check role - accounting.lockBondETH(nodeOperatorId, amount); - - _checkForUnbondedKeys(nodeOperatorId); - - emit ELRewardsStealingPenaltyInitiated( + emit ELRewardsStealingPenaltyReported( nodeOperatorId, blockNumber, amount ); + + accounting.lockBondETH( + nodeOperatorId, + amount + EL_REWARDS_STEALING_FINE + ); + + _checkForUnbondedKeys(nodeOperatorId); } /// @dev Should be called by the committee. diff --git a/test/CSModule.t.sol b/test/CSModule.t.sol index 3dfb40fb..a0b78ff3 100644 --- a/test/CSModule.t.sol +++ b/test/CSModule.t.sol @@ -1674,11 +1674,11 @@ contract CsmReportELRewardsStealingPenalty is CSMCommon { csm.vetKeys(noId, 1); vm.expectEmit(true, true, true, true, address(csm)); - emit ELRewardsStealingPenaltyInitiated(noId, 100, BOND_SIZE / 2); + emit ELRewardsStealingPenaltyReported(noId, 100, BOND_SIZE / 2); csm.reportELRewardsStealingPenalty(noId, 100, BOND_SIZE / 2); uint256 lockedBond = accounting.getActualLockedBond(noId); - assertEq(lockedBond, BOND_SIZE / 2); + assertEq(lockedBond, BOND_SIZE / 2 + csm.EL_REWARDS_STEALING_FINE()); CSModule.NodeOperatorInfo memory no = csm.getNodeOperator(noId); assertEq(no.totalVettedValidators, 1);