Skip to content

Commit b576a7c

Browse files
0xClandestineypatil12
authored andcommitted
docs: slashing factors rounding (#1089)
* docs: slashing factors rounding * chore: forge fmt
1 parent 5fb59b5 commit b576a7c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/contracts/core/DelegationManager.sol

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,10 @@ contract DelegationManager is
681681
});
682682
}
683683

684-
/// @dev Calculate the amount of slashing to apply to the staker's shares
684+
/// @dev Calculate the amount of slashing to apply to the staker's shares.
685+
/// @dev Be mindful of rounding in `mulWad()`, it's possible for the slashing factor to round down to 0
686+
/// even when both operatorMaxMagnitude and beaconChainSlashingFactor are non-zero. This is only possible
687+
/// in an edge case where the operator has a very low maxMagnitude.
685688
function _getSlashingFactor(
686689
address staker,
687690
IStrategy strategy,

0 commit comments

Comments
 (0)