Skip to content

Commit

Permalink
chore: typos
Browse files Browse the repository at this point in the history
  • Loading branch information
ypatil12 committed Feb 19, 2025
1 parent cf9a938 commit 5961884
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion docs/core/AllocationManager.md
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ AVSs use slashing as a punitive disincentive for misbehavior. For details and ex

In order to slash an eligible operator, the AVS specifies which operator set the operator belongs to, the `strategies` the operator should be slashed for, and for each strategy, the _proportion of the operator's allocated magnitude_ that should be slashed (given by `wadsToSlash`). An optional `description` string allows the AVS to add context to the slash.

Once triggered in the `AllocationManager`, slashing is instant and irreversable. For each slashed strategy, the operator's `maxMagnitude` and `encumberedMagnitude` are decreased, and the allocation made to the given operator set has its `currentMagnitude` reduced. See [TODO - Accounting Doc]() for details on how slashed amounts are calculated.
Once triggered in the `AllocationManager`, slashing is instant and irreversible. For each slashed strategy, the operator's `maxMagnitude` and `encumberedMagnitude` are decreased, and the allocation made to the given operator set has its `currentMagnitude` reduced. See [TODO - Accounting Doc]() for details on how slashed amounts are calculated.

There are two edge cases to note for this method:
1. In the process of slashing an `operator` for a given `strategy`, if the `Allocation` being slashed has a `currentMagnitude` of 0, the call will NOT revert. Instead, the `strategy` is skipped and slashing continues with the next `strategy` listed. This is to prevent an edge case where slashing occurs on or around a deallocation's `effectBlock` -- if the call reverted, the entire slash would fail. Skipping allows any valid slashes to be processed without requiring resubmission.
Expand Down
2 changes: 1 addition & 1 deletion docs/core/accounting/SlashingEdgeCase.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,4 @@ Scenario B:

In scenario B, 50% of Alice’s currently proven assets are slashed, along with a commensurate decrease in the AVSs attributable slashed amount. In both cases Alice’s withdrawable shares and the AVSs attributable slashed amount decrease by the same percentage.

We acknowledge this edge case. A benefit of this system is that stakers are incentivized to immediatley prove BC slashed. Eigen Labs runs an off-chain process (EigenPod Health Checker) that monitors BC slashings and starts checkpoints as needed. Conversely, when Native-ETH burning is implemented, AVSs are incentivized to immediately exit stakers from the BC to recoup the maximum possible attributable slashed amount.
We acknowledge this edge case. A benefit of this system is that stakers are incentivized to immediately prove BC slashed. Eigen Labs runs an off-chain process (EigenPod Health Checker) that monitors BC slashings and starts checkpoints as needed. Conversely, when Native-ETH burning is implemented, AVSs are incentivized to immediately exit stakers from the BC to recoup the maximum possible attributable slashed amount.
2 changes: 1 addition & 1 deletion script/deploy/devnet/deploy_from_scratch.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ contract DeployFromScratch is Script, Test {
// Create a proxy beacon for base strategy implementation
strategyBeacon = new UpgradeableBeacon(address(baseStrategyImplementation));

// Strategy Factory, upgrade and initalized
// Strategy Factory, upgrade and initialized
eigenLayerProxyAdmin.upgradeAndCall(
ITransparentUpgradeableProxy(payable(address(strategyFactory))),
address(strategyFactoryImplementation),
Expand Down
2 changes: 1 addition & 1 deletion script/utils/ExistingDeploymentParser.sol
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ contract ExistingDeploymentParser is Script, Logger {
}

function logInitialDeploymentParams() public {
console.log("==== Parsed Initilize Params for Initial Deployment,==");
console.log("==== Parsed Initialize Params for Initial Deployment,==");

console.log("executorMultisig", executorMultisig);
console.log("operationsMultisig", operationsMultisig);
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/core/StrategyManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ contract StrategyManager is
* @param depositSharesToRemove The amount of deposit shares to decrement
* @dev If the amount of shares represents all of the staker`s shares in said strategy,
* then the strategy is removed from stakerStrategyList[staker] and 'true' is returned. Otherwise 'false' is returned.
* Also returns the user's udpated deposit shares after decrement.
* Also returns the user's updated deposit shares after decrement.
*/
function _removeDepositShares(
address staker,
Expand Down
2 changes: 1 addition & 1 deletion src/test/integration/IntegrationChecks.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ contract IntegrationCheckUtils is IntegrationBase {
assertTrue(delegationManager.isDelegated(address(staker)),
"check_Redelegate_State: staker should not be delegated");
assert_ValidWithdrawalHashes(withdrawals, withdrawalRoots,
"check_Redelegate_State: calculated withdrawl should match returned root");
"check_Redelegate_State: calculated withdrawal should match returned root");
assert_AllWithdrawalsPending(withdrawalRoots,
"check_Redelegate_State: stakers withdrawal should now be pending");
assert_Snap_Added_QueuedWithdrawals(staker, withdrawals,
Expand Down
4 changes: 2 additions & 2 deletions src/test/integration/users/User.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ contract User is Logger, IDelegationManagerTypes, IAllocationManagerTypes {
/// Allocation Manager Methods
/// -----------------------------------------------------------------------

/// @dev Allocates randomly accross the operator set's strategies with a sum of `magnitudeSum`.
/// @dev Allocates randomly across the operator set's strategies with a sum of `magnitudeSum`.
/// NOTE: Calling more than once will lead to deallocations...
function modifyAllocations(
AllocateParams memory params
Expand Down Expand Up @@ -456,7 +456,7 @@ contract User is Logger, IDelegationManagerTypes, IAllocationManagerTypes {
int256 delta = tokenDeltas[i];

if (strat == BEACONCHAIN_ETH_STRAT) {
// If any balance update has occured, a checkpoint will pick it up
// If any balance update has occurred, a checkpoint will pick it up
_startCheckpoint();
if (pod.activeValidatorCount() != 0) {
_completeCheckpoint();
Expand Down
2 changes: 1 addition & 1 deletion src/test/integration/users/User_M2.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ contract User_M2 is User {
int256 delta = tokenDeltas[i];

if (strat == BEACONCHAIN_ETH_STRAT) {
// If any balance update has occured, a checkpoint will pick it up
// If any balance update has occurred, a checkpoint will pick it up
_startCheckpoint();
if (pod.activeValidatorCount() != 0) {
_completeCheckpoint_M2();
Expand Down
2 changes: 1 addition & 1 deletion src/test/unit/AllocationManagerUnit.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3816,7 +3816,7 @@ contract AllocationManagerUnitTests_removeStrategiesFromOperatorSet is Allocatio
cheats.prank(defaultAVS);
allocationManager.removeStrategiesFromOperatorSet(defaultAVS, defaultOperatorSet.id, strategies);

// The orginal strategy should still be in the operator set.
// The original strategy should still be in the operator set.
assertEq(
allocationManager.getStrategiesInOperatorSet(defaultOperatorSet).length, 1, "should not be strat of set"
);
Expand Down
12 changes: 6 additions & 6 deletions src/test/unit/DelegationUnit.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ contract DelegationManagerUnitTests is EigenLayerUnitTestSetup, IDelegationManag
// Redeploy StrategyManagerMock with DM
strategyManagerMock = StrategyManagerMock(payable(address(new StrategyManagerMock(delegationManager))));

// Deploy DelegationManager implmentation and upgrade proxy
// Deploy DelegationManager implementation and upgrade proxy
delegationManagerImplementation = new DelegationManagerHarness(
IStrategyManager(address(strategyManagerMock)),
IEigenPodManager(address(eigenPodManagerMock)),
Expand Down Expand Up @@ -1330,7 +1330,7 @@ contract DelegationManagerUnitTests_Initialization_Setters is DelegationManagerU
assertEq(delegationManager.domainSeparator(), expectedDomainSeparator, "sanity check");
}

/// @notice Verifies that the DelegationManager cannot be iniitalized multiple times
/// @notice Verifies that the DelegationManager cannot be initialized multiple times
function test_initialize_revert_reinitialization() public {
cheats.expectRevert("Initializable: contract is already initialized");
delegationManager.initialize(address(this), 0);
Expand Down Expand Up @@ -2124,7 +2124,7 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests {
delegationManager.delegationApproverSaltIsSpent(delegationManager.delegationApprover(defaultOperator), salt),
"salt somehow spent too early?"
);
// Set staker shares in BeaconChainStrategy and StrategyMananger
// Set staker shares in BeaconChainStrategy and StrategyManager
strategyManagerMock.addDeposit(staker, strategyMock, shares);
eigenPodManagerMock.setPodOwnerShares(staker, beaconShares);
(IStrategy[] memory strategiesToReturn, uint256[] memory sharesToReturn) =
Expand Down Expand Up @@ -2214,7 +2214,7 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests {
_setOperatorMagnitude(defaultOperator, beaconChainETHStrategy, maxMagnitudeBeacon);
_setOperatorMagnitude(defaultOperator, strategyMock, maxMagnitudeStrategy);

// 2. Set staker shares in BeaconChainStrategy and StrategyMananger
// 2. Set staker shares in BeaconChainStrategy and StrategyManager
strategyManagerMock.addDeposit(defaultStaker, strategyMock, shares);
eigenPodManagerMock.setPodOwnerShares(defaultStaker, beaconShares);
(IStrategy[] memory strategiesToReturn, uint256[] memory sharesToReturn) =
Expand Down Expand Up @@ -2700,7 +2700,7 @@ contract DelegationManagerUnitTests_delegateTo is DelegationManagerUnitTests {
expiry
);

// Set staker shares in BeaconChainStrategy and StrategyMananger
// Set staker shares in BeaconChainStrategy and StrategyManager
uint256[] memory depositScalingFactors = new uint256[](2);
depositScalingFactors[0] = uint256(WAD);
depositScalingFactors[1] = uint256(WAD);
Expand Down Expand Up @@ -6485,7 +6485,7 @@ contract DelegationManagerUnitTests_slashingShares is DelegationManagerUnitTests
cheats.prank(address(allocationManagerMock));
delegationManager.slashOperatorShares(defaultOperator, strategyMock, WAD, 0);

// Complete withdrawal as tokens and assert that we call back into teh SM with 100 tokens
// Complete withdrawal as tokens and assert that we call back into the SM with 100 tokens
IERC20[] memory tokens = strategyMock.underlyingToken().toArray();
cheats.expectCall(
address(strategyManagerMock),
Expand Down
2 changes: 1 addition & 1 deletion src/test/unit/EigenPodManagerUnit.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ contract EigenPodManagerUnitTests_WithdrawSharesAsTokensTests is EigenPodManager
assertEq(eigenPodManager.podOwnerDepositShares(defaultStaker), int256(0), "Shares not reduced to 0");
}

function test_withdrawSharesAsTokens_m2NegativeShares_partialDefecitReduction() public {
function test_withdrawSharesAsTokens_m2NegativeShares_partialDeficitReduction() public {
// Shares to initialize & withdraw
int256 sharesBeginning = -100e18;
uint256 sharesToWithdraw = 50e18;
Expand Down

0 comments on commit 5961884

Please sign in to comment.