Skip to content

Commit e067fde

Browse files
committed
docs: update delay info
1 parent dda9476 commit e067fde

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

docs/core/AllocationManager.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -837,6 +837,8 @@ Once slashing is processed for a strategy, [slashed stake is burned or redistrib
837837
* allocating magnitude to an operator set, and the magnitude becoming slashable.
838838
* @param operator The operator to set the delay on behalf of.
839839
* @param delay the allocation delay in blocks
840+
* @dev When the delay is set for a newly-registered operator (via the `DelegationManager.registerAsOperator` method),
841+
* the delay will take effect after 1 block. Else, the delay will take effect after `ALLOCATION_CONFIGURATION_DELAY` blocks.
840842
*/
841843
function setAllocationDelay(
842844
address operator,
@@ -847,15 +849,16 @@ function setAllocationDelay(
847849

848850
_Note: IF NOT CALLED BY THE `DelegationManager`, this method can be called directly by an operator, or by a caller authorized by the operator. See [`PermissionController.md`](../permissions/PermissionController.md) for details._
849851

850-
This function sets an operator's allocation delay, in blocks. This delay can be updated by the operator once set. Both the initial setting of this value and any further updates _take `ALLOCATION_CONFIGURATION_DELAY` blocks_ to take effect. Because having a delay is a requirement to allocating slashable stake, this effectively means that once the slashing release goes live, no one will be able to allocate slashable stake for at least `ALLOCATION_CONFIGURATION_DELAY` blocks.
852+
This function sets an operator's allocation delay, in blocks. This delay can be updated by the operator once set. The initial setting of this value by a newly created operator via [`DelegationManager.registerAsOperator`](./DelegationManager.md#registerasoperator) will take 1 block to take effect. The setting of this value for an operator who has already been registered in core or further updates _take `ALLOCATION_CONFIGURATION_DELAY` blocks_ to take effect. Because having a delay is a requirement to allocating slashable stake, this effectively means that once the slashing release goes live, no already-created operators will be able to allocate slashable stake for at least `ALLOCATION_CONFIGURATION_DELAY` blocks.
851853

852854
The `DelegationManager` calls this upon operator registration for all new operators created after the slashing release. For operators that existed in the `DelegationManager` _prior_ to the slashing release, **they will need to call this method to configure an allocation delay prior to allocating slashable stake to any AVS**.
853855

854856
The allocation delay's primary purpose is to give stakers delegated to an operator the chance to withdraw their stake before the operator can change the risk profile to something they're not comfortable with. However, operators can choose to configure this delay however they want - including setting it to 0.
855857

856858
*Effects*:
857859
* Sets the operator's `pendingDelay` to the proposed `delay`, and save the `effectBlock` at which the `pendingDelay` can be activated
858-
* `effectBlock = uint32(block.number) + ALLOCATION_CONFIGURATION_DELAY + 1`
860+
* If a newly registered operator in core, `effectBlock = uint32(block.number) + 1`
861+
* Else, `effectBlock = uint32(block.number) + ALLOCATION_CONFIGURATION_DELAY + 1`
859862
* If the operator has a `pendingDelay`, and if the `effectBlock` has passed, sets the operator's `delay` to the `pendingDelay` value
860863
* This also sets the `isSet` boolean to `true` to indicate that the operator's `delay`, even if 0, was set intentionally
861864
* Emits an `AllocationDelaySet` event

src/contracts/interfaces/IAllocationManager.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,8 @@ interface IAllocationManager is IAllocationManagerErrors, IAllocationManagerEven
315315
* allocating magnitude to an operator set, and the magnitude becoming slashable.
316316
* @param operator The operator to set the delay on behalf of.
317317
* @param delay the allocation delay in blocks
318+
* @dev When the delay is set for a newly-registered operator (via the `DelegationManager.registerAsOperator` method),
319+
* the delay will take effect after 1 block. Else, the delay will take effect after `ALLOCATION_CONFIGURATION_DELAY` blocks.
318320
*/
319321
function setAllocationDelay(address operator, uint32 delay) external;
320322

0 commit comments

Comments
 (0)