Skip to content

Commit

Permalink
feat: slashing public devnet
Browse files Browse the repository at this point in the history
  • Loading branch information
ypatil12 committed Oct 17, 2024
1 parent 80809db commit fb7fec7
Show file tree
Hide file tree
Showing 4 changed files with 752 additions and 12 deletions.
52 changes: 52 additions & 0 deletions SLASHING_deploy_from_scratch_deployment_data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"addresses": {
"allocationManager": "0xAbD5Dd30CaEF8598d4EadFE7D45Fd582EDEade15",
"allocationManagerImplementation": "0xBFF7154bAa41e702E78Fb082a8Ce257Ce13E6f55",
"avsDirectory": "0xCa839541648D3e23137457b1Fd4A06bccEADD33a",
"avsDirectoryImplementation": "0x1362e9Cb37831C433095f1f1568215B7FDeD37Ef",
"baseStrategyImplementation": "0x61C6A250AEcAbf6b5e4611725b4f99C4DC85DB34",
"delegationManager": "0x3391eBafDD4b2e84Eeecf1711Ff9FC06EF9Ed182",
"delegationManagerImplementation": "0x4073a9B0fb0f31420C2A2263fB6E9adD33ea6F2A",
"eigenLayerPauserReg": "0xBb02ACE793e921D6a454062D2933064F31Fae0B2",
"eigenLayerProxyAdmin": "0xBf0c97a7df334BD83e0912c1218E44FD7953d122",
"eigenPodBeacon": "0x8ad244c2a986e48862c5bE1FdCA27cef0aaa6E15",
"eigenPodImplementation": "0x93cecf40F05389E99e163539F8d1CCbd4267f9A7",
"eigenPodManager": "0x8C9781FD55c67CE4DC08e3035ECbdB2B67a07307",
"eigenPodManagerImplementation": "0x3013B13BF3a464ff9078EFa40b7dbfF8fA67138d",
"emptyContract": "0x689CEE9134e4234caEF6c15Bf1D82779415daFAe",
"rewardsCoordinator": "0xa7DB7B0E63B5B75e080924F9C842758711177c07",
"rewardsCoordinatorImplementation": "0x0e93df1A21CA53F93160AbDee19A92A20f8b397B",
"strategies": [
{
"strategy_address": "0x4f812633943022fA97cb0881683aAf9f318D5Caa",
"token_address": "0x94373a4919B3240D86eA41593D5eBa789FEF3848",
"token_symbol": "WETH"
}
],
"strategyBeacon": "0x957c04A5666079255fD75220a15918ecBA6039c6",
"strategyFactory": "0x09F8f1c1ca1815083a8a05E1b4A0c65EFB509141",
"strategyFactoryImplementation": "0x8b1F09f8292fd658Da35b9b3b1d4F7d1C0F3F592",
"strategyManager": "0x70f8bC2Da145b434de66114ac539c9756eF64fb3",
"strategyManagerImplementation": "0x1562BfE7Cb4644ff030C1dE4aA5A9aBb88a61aeC",
"token": {
"tokenProxyAdmin": "0x0000000000000000000000000000000000000000",
"EIGEN": "0x0000000000000000000000000000000000000000",
"bEIGEN": "0x0000000000000000000000000000000000000000",
"EIGENImpl": "0x0000000000000000000000000000000000000000",
"bEIGENImpl": "0x0000000000000000000000000000000000000000",
"eigenStrategy": "0x0000000000000000000000000000000000000000",
"eigenStrategyImpl": "0x0000000000000000000000000000000000000000"
}
},
"chainInfo": {
"chainId": 17000,
"deploymentBlock": 2548240
},
"parameters": {
"communityMultisig": "0xBB37b72F67A410B76Ce9b9aF9e37aa561B1C5B07",
"executorMultisig": "0xBB37b72F67A410B76Ce9b9aF9e37aa561B1C5B07",
"operationsMultisig": "0xBB37b72F67A410B76Ce9b9aF9e37aa561B1C5B07",
"pauserMultisig": "0xBB37b72F67A410B76Ce9b9aF9e37aa561B1C5B07",
"timelock": "0x0000000000000000000000000000000000000000"
}
}
24 changes: 12 additions & 12 deletions docs/release/slashing/AllocationManager.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ The AllocationManager contract manages the allocation and reallocation of operat
- `ALLOCATION_CONFIGURATION_DELAY`: The delay in seconds before allocations take effect.
- Mainnet: `21 days`. Very TBD
- Testnet: `1 hour`. Very TBD
- Public Devnet: `10 minutes`
- `DEALLOCATION_DELAY`: The delay in seconds before deallocations take effect.
- Mainnet: `17.5 days`. Slightly TBD
- Testnet: `3 days`. Very TBD
- Public Devnet: `1 days`

## `setAllocationDelay`

Expand Down Expand Up @@ -81,29 +83,27 @@ Any _allocations_ (i.e. increases in the proportion of slashable stake allocated

Any _deallocations_ (i.e. decreases in the proportion of slashable stake allocated to an AVS) take after `DEALLOCATION_DELAY` seconds. This enables AVSs enough time to update their view of stakes to the new proportions and have any tasks created against previous stakes to expire.

## `clearPendingModifications`
## `clearDeallocationQueue`

```solidity
/**
* @notice This function takes a list of strategies and adds all completable modifications for each strategy,
* @notice This function takes a list of strategies and adds all completable deallocations for each strategy,
* updating the encumberedMagnitude of the operator as needed.
*
* @param operator address to complete modifications for
* @param strategies a list of strategies to complete modifications for
* @param numToClear a list of number of pending modifications to complete for each strategy
* @param operator address to complete deallocations for
* @param strategies a list of strategies to complete deallocations for
* @param numToComplete a list of number of pending deallocations to complete for each strategy
*
* @dev can be called permissionlessly by anyone
*/
function clearModificationQueue(
function clearDeallocationQueue(
address operator,
IStrategy[] calldata strategies,
uint16[] calldata numToClear
uint16[] calldata numToComplete
) external;
```

This function is used to complete pending modifications for a list of strategies for an operator. The function takes a list of strategies and the number of pending modifications to complete for each strategy. For each strategy, the function completes a modification if its effect timestamp has passed.

Completing an allocation doesn't have any material change to the protocol other than cleaning up some state and increasing code readability.
This function is used to complete pending deallocations for a list of strategies for an operator. The function takes a list of strategies and the number of pending deallocations to complete for each strategy. For each strategy, the function completes a modification if its effect timestamp has passed.

Completing a deallocation decreases the encumbered magnitude for the strategy, allowing them to make allocations with that magnitude. Encumbered magnitude must be decreased only upon completion because pending deallocations can be slashed before they are completable.

Expand All @@ -128,16 +128,16 @@ struct SlashingParams {
}
/**
* @notice Called by an AVS to slash an operator for given operatorSetId, list of strategies, and bipsToSlash.
* @notice Called by an AVS to slash an operator for given operatorSetId, list of strategies, and wadToSlash.
* For each given (operator, operatorSetId, strategy) tuple, bipsToSlash
* bips of the operatorSet's slashable stake allocation will be slashed
*
* @param operator the address to slash
* @param operatorSetId the ID of the operatorSet the operator is being slashed on behalf of
* @param strategies the set of strategies to slash
* @param wadToSlash the parts in 1e18 to slash, this will be proportional to the
* @param description the description of the slashing provided by the AVS for legibility
* operator's slashable stake allocation for the operatorSet
* @param description the description of the slashing provided by the AVS for legibility
*/
function slashOperator(
SlashingParams calldata params
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"multisig_addresses": {
"operationsMultisig": "0xBB37b72F67A410B76Ce9b9aF9e37aa561B1C5B07",
"communityMultisig": "0xBB37b72F67A410B76Ce9b9aF9e37aa561B1C5B07",
"pauserMultisig": "0xBB37b72F67A410B76Ce9b9aF9e37aa561B1C5B07",
"executorMultisig": "0xBB37b72F67A410B76Ce9b9aF9e37aa561B1C5B07",
"timelock": "0xBB37b72F67A410B76Ce9b9aF9e37aa561B1C5B07"
},
"strategyManager": {
"init_paused_status": 0,
"init_withdrawal_delay_blocks": 1
},
"eigenPod": {
"PARTIAL_WITHDRAWAL_FRAUD_PROOF_PERIOD_BLOCKS": 1,
"MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR": "32000000000"
},
"eigenPodManager": {
"init_paused_status": 115792089237316195423570985008687907853269984665640564039457584007913129639935
},
"slasher": {
"init_paused_status": 0
},
"delegation": {
"init_paused_status": 0,
"init_withdrawal_delay_blocks": 1
},
"rewardsCoordinator": {
"init_paused_status": 115792089237316195423570985008687907853269984665640564039457584007913129639935,
"CALCULATION_INTERVAL_SECONDS": 604800,
"MAX_REWARDS_DURATION": 6048000,
"MAX_RETROACTIVE_LENGTH": 7776000,
"MAX_FUTURE_LENGTH": 2592000,
"GENESIS_REWARDS_TIMESTAMP": 1710979200,
"rewards_updater_address": "0xBB37b72F67A410B76Ce9b9aF9e37aa561B1C5B07",
"activation_delay": 7200,
"calculation_interval_seconds": 604800,
"global_operator_commission_bips": 1000,
"OPERATOR_SET_GENESIS_REWARDS_TIMESTAMP": 1720656000,
"OPERATOR_SET_MAX_RETROACTIVE_LENGTH": 2592000
},
"allocationManager": {
"init_paused_status": 0,
"DEALLOCATION_DELAY": 86400,
"ALLOCATION_CONFIGURATION_DELAY": 600
},
"ethPOSDepositAddress": "0x4242424242424242424242424242424242424242"
}
Loading

0 comments on commit fb7fec7

Please sign in to comment.