Skip to content

Commit 42f7d27

Browse files
0xClandestinewadealexc
authored andcommitted
docs: small slash amounts (#1088)
* docs: small slash amounts * docs: update contract docs --------- Co-authored-by: wadealexc <pragma-services@proton.me>
1 parent 69093f8 commit 42f7d27

File tree

2 files changed

+40
-2
lines changed

2 files changed

+40
-2
lines changed

docs/core/AllocationManager.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,26 @@ struct SlashingParams {
585585
}
586586
587587
/**
588-
* @notice Called by an AVS to slash an operator in a given operator set
588+
* @notice Called by an AVS to slash an operator in a given operator set. The operator must be registered
589+
* and have slashable stake allocated to the operator set.
590+
*
591+
* @param avs The AVS address initiating the slash.
592+
* @param params The slashing parameters, containing:
593+
* - operator: The operator to slash.
594+
* - operatorSetId: The ID of the operator set the operator is being slashed from.
595+
* - strategies: Array of strategies to slash allocations from (must be in ascending order).
596+
* - wadsToSlash: Array of proportions to slash from each strategy (must be between 0 and 1e18).
597+
* - description: Description of why the operator was slashed.
598+
*
599+
* @dev For each strategy:
600+
* 1. Reduces the operator's current allocation magnitude by wadToSlash proportion.
601+
* 2. Reduces the strategy's max and encumbered magnitudes proportionally.
602+
* 3. If there is a pending deallocation, reduces it proportionally.
603+
* 4. Updates the operator's shares in the DelegationManager.
604+
*
605+
* @dev Small slashing amounts may not result in actual token burns due to
606+
* rounding, which will result in small amounts of tokens locked in the contract
607+
* rather than fully burning through the burn mechanism.
589608
*/
590609
function slashOperator(
591610
address avs,

src/contracts/interfaces/IAllocationManager.sol

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,26 @@ interface IAllocationManager is IAllocationManagerErrors, IAllocationManagerEven
217217
function initialize(address initialOwner, uint256 initialPausedStatus) external;
218218

219219
/**
220-
* @notice Called by an AVS to slash an operator in a given operator set
220+
* @notice Called by an AVS to slash an operator in a given operator set. The operator must be registered
221+
* and have slashable stake allocated to the operator set.
222+
*
223+
* @param avs The AVS address initiating the slash.
224+
* @param params The slashing parameters, containing:
225+
* - operator: The operator to slash.
226+
* - operatorSetId: The ID of the operator set the operator is being slashed from.
227+
* - strategies: Array of strategies to slash allocations from (must be in ascending order).
228+
* - wadsToSlash: Array of proportions to slash from each strategy (must be between 0 and 1e18).
229+
* - description: Description of why the operator was slashed.
230+
*
231+
* @dev For each strategy:
232+
* 1. Reduces the operator's current allocation magnitude by wadToSlash proportion.
233+
* 2. Reduces the strategy's max and encumbered magnitudes proportionally.
234+
* 3. If there is a pending deallocation, reduces it proportionally.
235+
* 4. Updates the operator's shares in the DelegationManager.
236+
*
237+
* @dev Small slashing amounts may not result in actual token burns due to
238+
* rounding, which will result in small amounts of tokens locked in the contract
239+
* rather than fully burning through the burn mechanism.
221240
*/
222241
function slashOperator(address avs, SlashingParams calldata params) external;
223242

0 commit comments

Comments
 (0)