Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
gpsanant committed Sep 13, 2024
1 parent 957a347 commit 9cde7ac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/contracts/core/DelegationManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -427,13 +427,17 @@ contract DelegationManager is
uint256 shares,
uint256 proportionPodBalanceDecrease
) external onlyEigenPodManager {
// read doc to understand this

// a_n
uint256 scaledSharesBefore =
shares
* beaconChainScalingFactors[staker] / SlashingLib.PRECISION_FACTOR
* depositScalingFactors[staker][beaconChainETHStrategy] / SlashingLib.PRECISION_FACTOR;

beaconChainScalingFactors[staker] = beaconChainScalingFactors[staker] * (SlashingLib.PRECISION_FACTOR - proportionPodBalanceDecrease) / SlashingLib.PRECISION_FACTOR;

// a_{n+1}
uint256 scaledSharesAfter =
shares
* beaconChainScalingFactors[staker] / SlashingLib.PRECISION_FACTOR
Expand Down

0 comments on commit 9cde7ac

Please sign in to comment.