Skip to content

release: MOOCOW [DO NOT MERGE] #1522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 19 commits into
base: release/moocow-rc.1
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions CHANGELOG/CHANGELOG-1.5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,15 @@

- Redistribution is a feature that gives Service Builders a means to not just burn, but repurpose slashed funds.
- We introduce a new operatorSet creation mechanism: [`AllocationManager.createRedistributingOperatorSets`](../docs/core/AllocationManager.md#createredistributingoperatorsets), which allows slashed funds to be redistributed to a `RedistributionRecipient`. *Note: The redistribution recipient can be set only once and is immutable*.
- *All slashed funds will now be routed to individual `SlashEscrow` contracts.* The release of funds from escrow is gated by the `SlashEscrowFactory`. The `SlashEscrowFactory` deploys individual `SlashEscrow` contracts per slash, enforces a global delay for all escrowed funds, and handles pausing/unpausing of escrowed funds.
- *All slashed funds now follow a two-step process.* During a slash, we increase burn or redistributable shares. A cronjob then handles the actual redistribution or burning of these shares.
- The original `createOperatorSets` function still exists. This function creates operatorSets whose slashed funds will eventually be burned. There is no mechanism to convert an operatorSet to be redistributing.
- See [ELIP-006](https://github.com/eigenfoundation/ELIPs/blob/main/ELIPs/ELIP-006.md) for a full description.

⛔ Breaking changes
- Funds marked for burning now go through a 4-day escrow period via `SlashEscrow` contracts. These funds are burned by calling [`SlashEscrowFactory.releaseSlashEscrow`](../docs/core/SlashEscrowFactory.md#releaseslashescrow).

📌 Future Deprecations
- The pre-redistribution burn pathway [`StrategyManager.decreaseBurnableShares`](../docs/core/StrategyManager.md#burnshares) will be deprecated in an upgrade *after* the redistribution release. This function can still be used to burn shares that have been slashed at any point prior to the redistribution upgrade.

🛠️ Security Updates
- The slashing of burned funds is no longer instantaneous. All slashed funds (burned or redistributed) now go through a 4-day escrow delay. The eventual burning or redistribution of slashed funds can be paused by the `PauserMultisig`.
- The upgradability of the `SlashEscrowFactory` is controlled by the `CommunityMultisig`. The contract will have a separate `ProxyAdmin` from the rest of the EigenLayer core protocol. Each individual `SlashEscrow` contract is an immutable clone.
- The slashing of burned funds is no longer instantaneous. All slashed funds (burned or redistributed) now go through a two-step process where shares are first marked for burning/redistribution, then processed by a cronjob. The burning or redistribution of slashed funds can be paused by the `PauserMultisig`.

🔧 Improvements
- The [`AllocationManager.slashOperator`](../docs/core/AllocationManager.md#slashoperator) function now returns a `slashId` and array of `shares` to be burned/redistributed. **The function selector remains the same.**
Expand All @@ -35,7 +31,6 @@


## Changelog

- feat(draft): `AllocationManager` redistribution support [PR #1346](https://github.com/layr-labs/eigenlayer-contracts/pull/1346)
- feat: redistribution upgrade script [PR #1396](https://github.com/layr-labs/eigenlayer-contracts/pull/1396)
- chore: bindings [PR #1422](https://github.com/layr-labs/eigenlayer-contracts/pull/1422)
Expand Down Expand Up @@ -82,4 +77,11 @@
- ci: disable delete unauthorized branches
- docs: update addresses for mainnet [PR #1341](https://github.com/layr-labs/eigenlayer-contracts/pull/1341)
- docs: enrich MAINTENANCE.md re: release branches [PR #1340](https://github.com/layr-labs/eigenlayer-contracts/pull/1340)
- ci: enable auto delete branch upon eigengit launch [PR #1339](https://github.com/layr-labs/eigenlayer-contracts/pull/1339)
- ci: enable auto delete branch upon eigengit launch [PR #1339](https://github.com/layr-labs/eigenlayer-contracts/pull/1339)
- test(redistribution-changes): passing [PR #1511](https://github.com/layr-labs/eigenlayer-contracts/pull/1511)
- fix: strategy manager gap [PR #1508](https://github.com/layr-labs/eigenlayer-contracts/pull/1508)
- refactor: remove redistribution delay [PR #1485](https://github.com/layr-labs/eigenlayer-contracts/pull/1485)
- docs(audit): note upgrade rescue flow [PR #1467](https://github.com/layr-labs/eigenlayer-contracts/pull/1467)
- fix(audit): assert redistribution recipient != burn address [PR #1466](https://github.com/layr-labs/eigenlayer-contracts/pull/1466)
- fix(audit): more reentrancy checks [PR #1450](https://github.com/layr-labs/eigenlayer-contracts/pull/1450)
- fix(audit): out-of-gas issue [PR #1459](https://github.com/layr-labs/eigenlayer-contracts/pull/1459)
4 changes: 4 additions & 0 deletions CHANGELOG/CHANGELOG-1.6.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@
- feat: release scripts for moocow and elip5
- feat: currentCheckpoint now returns finalized checkpoint
- feat: implement consolidation and withdrawal requests
- chore: update eigenpod and eigen impls addresses in holesky and hoodi by @bowenli86 in https://github.com/Layr-Labs/eigenlayer-contracts/pull/1448
- chore: add multisend parser to scripts directory by @nadir-akhtar in https://github.com/Layr-Labs/eigenlayer-contracts/pull/1486
- docs: update version matrix by @ypatil12 in https://github.com/Layr-Labs/eigenlayer-contracts/pull/1491
- chore: MOOCOW audit fixes by @wadealexc in https://github.com/Layr-Labs/eigenlayer-contracts/pull/1496
217 changes: 0 additions & 217 deletions docs/core/SlashEscrowFactory.md

This file was deleted.

8 changes: 4 additions & 4 deletions docs/core/StrategyManager.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ This method directs the `strategy` to convert the input deposit shares to tokens
## Increasing/Clearing Slashed Shares

Slashes shares are marked as burnable or redistributable. Anybody can call
`clearBurnOrRedistributableShares` to send tokens to the slash's `SlashEscrow` contract. Shares to clear are stored in `_burnOrRedistributableShares`, a nested [EnumerableMap](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/utils/structs/EnumerableMap.sol). The operatorSet and slashId are used to index into the enumerableMap of strategies to shares. The following methods handle clearing burn or redistributable shares:
`clearBurnOrRedistributableShares` to send tokens to the slash's `redistributionRecipient`. Shares to clear are stored in `_burnOrRedistributableShares`, a nested [EnumerableMap](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/utils/structs/EnumerableMap.sol). The operatorSet and slashId are used to index into the enumerableMap of strategies to shares. The following methods handle clearing burn or redistributable shares:
* [`StrategyManager.increaseBurnOrRedistributableShares`](#increaseburnorredistributableshares)
* [`StrategyManager.clearBurnOrRedistributableShares`](#clearBurnOrRedistributableShares)
* [`StrategyManager.clearBurnOrRedistributableSharesByStrategy](#clearburnorredistributableshares)
Expand Down Expand Up @@ -284,7 +284,7 @@ Anyone can then convert the shares to tokens and trigger a burn via `burnShares`
*Effects*:
* Sets `burnOrRedistributableShares` for the given `operatorSet`, `slashId`, and `strategy`
* Emits a `BurnOrRedistributableSharesIncreased` event
* See [`SlashEscrowFactory.initiateSlashEscrow`](./SlashEscrowFactory.md#initiateslashescrow)



*Requirements*:
Expand Down Expand Up @@ -320,12 +320,12 @@ function clearBurnOrRedistributableSharesByStrategy(
) external returns (uint256);
```

Anyone can call this method to transfer slashed shares to the slash's `SlashEscrow` contract. This method sets the `burnOrRedistributableShares` for the given `slashId` and `operatorSet` to 0. To accommodate the unlimited number of strategies that can be added to an operatorSet, users can also pass in a strategy to clear via `clearBurnOrRedistributableSharesByStrategy`. The strategies that haven not been cleared can be retrieved by calling `getBurnOrRedistributableShares(operatorSet, slashId)`.
Anyone can call this method to transfer slashed shares to the operator sets's `redistributionRecipient`. This method sets the `burnOrRedistributableShares` for the given `slashId` and `operatorSet` to 0. To accommodate the unlimited number of strategies that can be added to an operatorSet, users can also pass in a strategy to clear via `clearBurnOrRedistributableSharesByStrategy`. The strategies that haven not been cleared can be retrieved by calling `getBurnOrRedistributableShares(operatorSet, slashId)`.

*Effects*:
* Resets the strategy's burn or redistributable shares for the operatorSet and slashId to 0
* If the shares to remove are nonzero:
* Calls `withdraw` on the `strategy`, withdrawing shares and sending a corresponding amount of tokens to the slash's `slashEscrow` contract
* Calls `withdraw` on the `strategy`, withdrawing shares and sending a corresponding amount of tokens to the operator sets's `redistributionRecipient`
* Emits a `BurnOrRedistributableSharesDecreased`

#### `burnShares`
Expand Down
Loading