From 080a51016383f0ba45e709fc8dec9fbebd997570 Mon Sep 17 00:00:00 2001 From: wadealexc Date: Thu, 14 Nov 2024 15:18:38 +0000 Subject: [PATCH] chore: update comment --- src/contracts/libraries/SlashingLib.sol | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/contracts/libraries/SlashingLib.sol b/src/contracts/libraries/SlashingLib.sol index f9f6bb681..f330df2c1 100644 --- a/src/contracts/libraries/SlashingLib.sol +++ b/src/contracts/libraries/SlashingLib.sol @@ -86,12 +86,13 @@ library SlashingLib { uint256 addedShares, uint256 slashingFactor ) internal { + // If this is the staker's first deposit for this operator, set the scaling factor to + // the inverse of slashingFactor if (existingDepositShares == 0) { - // if this is their first deposit for the operator, set the scaling factor to inverse of maxMagnitude - /// forgefmt: disable-next-item dsf._scalingFactor = uint256(WAD).divWad(slashingFactor); return; } + /** * Base Equations: * (1) newShares = currentShares + addedShares