-
Notifications
You must be signed in to change notification settings - Fork 431
feat: redistribution upgrade script #1396
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
Merged
ypatil12
merged 7 commits into
release-dev/redistribution
from
yash/redistribution-upgrade-script
May 30, 2025
Merged
feat: redistribution upgrade script #1396
ypatil12
merged 7 commits into
release-dev/redistribution
from
yash/redistribution-upgrade-script
May 30, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bb4b8eb
to
e1108eb
Compare
5b5e7b7
to
df9a5ad
Compare
bowenli86
approved these changes
May 25, 2025
7e82d53
to
d88ee4f
Compare
94b4c37
to
99f0022
Compare
nadir-akhtar
approved these changes
May 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one tiny nit
**Motivation:** We want to hold slashed funds in escrow temporarily to maintain protocol security (prevent malicious actors from draining the contracts). **Modifications:** - Add `SlashingWithdrawalRouter`. **Result:** The `SlashingWithdrawalRouter` contract is added for managing slashed funds in the EigenLayer protocol. It provides a mechanism to handle the burning or redistribution of slashed shares after a delay period, ensuring proper handling of slashed funds while maintaining protocol security. --------- Co-authored-by: Yash Patil <[email protected]> test(redistribution): add unit tests (#1383) **Motivation:** We want to ensure `SlashingWithdrawalRouter` has appropriate unit test coverage. **Modifications:** - Add more unit tests. **Result:** 90% coverage. refactor: remove `v` prefix from `SemVerMixin` (#1385) **Motivation:** Slashing was deployed with using a `v` prefix, thus we're simply going to drop the prefix moving forward. **Modifications:** Prefix removed, and tests updated. **Result:** SemVerMixin no longer requires a `v` prefix. feat: escrow funds in unique clone contracts (#1387) **Motivation:** Current implementation is broken by rebase tokens. **Modifications:** - Rename SWR -> `SlashEscrowFactory`. - Add factory logic that deploys clones unique to their slash ID. **Result:** Funds will now be stored in clone contracts unique to their slash ID. fix: review issues (#1391) **Motivation:** We want to resolve any review issues that arise. **Modifications:** - Use larger of strategy or global delay: @non-fungible-nelson - Fix storage overrides noted from `Deprecated_OwnableUpgradeable` @wadealexc - Use `EnumerableSet` instead of `EnumerableSetUpgradaeable` since it doesn't contain storage - Add missing event in `initialize()`. - Prevent `address(0)` during `createRedistributableOperatorSets` for event sanitation. - Improve check legibility @wadealexc **Result:** Current review concerns have been addressed. fix: storage checker (#1394) **Motivation:** Storage checker didn't have ALM added. Also we needed to fix the deprecated ownable mixing. **Modifications:** Fix mixing to inherit from `ContextUpgradeable`. Add ALM to storage-diff.json. **Result:** Correct storage checks. --------- Co-authored-by: Yash Patil <[email protected]> chore: use internal getters; update `isOperatorRedistributable` (#1401) **Motivation:** We want to use internal getters wherever possible for style. **Modifications:** - Use `getRedistributionRecipient` in `isOperatorRedistributable` - Update `isOperatorRedistributable` to get all allocated/registered sets and then check if slashable and redistributable set for each - More comprehensive unit tests **Result:** Cleaner code + tests passing chore: rename burnable -> burnOrRedistributable; fix storage gap; remove poc code (#1397) **Motivation:** Burn shares naming is confusing, since shares are burnOrRedistributable **Modifications:** - For the new withdrawal path, call it `burnOrRedistributable`, so `burnOrRedistributableSharesIncreased` or `burnOrRedistributableSharesDecreased` - Bring back `burnableSharesDecreased` event for the legacy burn path - Rename `_operatorSetBurnableShares` to `_burnOrRedistributableShares` - Fix the storage gap, since `_burnOrRedistributableShares` is a mapping pointing to an enumerable map, not an enumerable map - Remove POC withdrawal queue code from the DM **Result:** Cleaner Redistribution code chore: remove dm/alm code size optimizations (#1398) **Motivation:** We have several code size optimizations in the DM/ALM. These are not needed anymore with the ownable deprecation. We can add in future upgrade if we want. **Modifications:** Remove all internal `_check` and modifiers. Make `slashOperatorShares` in the DM return to the original non-arrayified method. **Result:** Smaller code diff for redistribution. test: full coverage `SlashEscrowFactory` + `SlashEscrow` (#1403) **Motivation:** We want to ensure we have full coverage unit tests for `SlashEscrowFactory` and `SlashEscrow` in preparation for audits. **Modifications:** - Adds checks for all view methods. **Result:** Brings coverage up to 100% for all branches/fns/etc. feat: redistribution upgrade scripts chore: remove added code fix: epm paused status for sepolia chore: format fix: typo Co-authored-by: bowenli86 <[email protected]>
a656897
to
65f8f65
Compare
0xClandestine
added a commit
that referenced
this pull request
May 30, 2025
**Motivation:** Redistribution upgrade script. **Modifications:** **Deployment Process:** 1. `SlashingEscrowFactory` and `SlashEscrow` are two _new_ deployed contracts a. We deploy a new proxyAdmin to upgrade the `SlashingEscrowFactory`. The owner of this proxyAdmin is the community multisig 3. Upgrades the following contracts: a. DelegationManager b. AllocationManager c. Strategymanager d. EigenPodManager e. EigenStrategy f. StrategyBeacon g. StrategyBaseTVLLimits (pre-longtail strats) **Zeus Config Updates:** In Zeus config, we add a `GLOBAL_SLASH_DELAY` value. On all testnets (preprod, testnet, testnet-hoodi, tesnet-sepolia) this value is 5 blocks (1 min). On mainnet this value is 28,800 (4 days in blocks) Run `zeus env show <environment>` to double check. **Important Checks:** 1. Ensure the `_globalBurnOrRedistributionDelay` is properly set 2. Upgradability of the `SlashEscrowFactory` is controlled by a new `SlashEscrowProxyAdmin`. The owner of this contract is the `CommunityMultisig`. **Result:** Updated deploy scripts. --------- Co-authored-by: clandestine.eth <[email protected]> Co-authored-by: bowenli86 <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation:
Redistribution upgrade script.
Modifications:
Deployment Process:
SlashingEscrowFactory
andSlashEscrow
are two new deployed contractsa. We deploy a new proxyAdmin to upgrade the
SlashingEscrowFactory
. The owner of this proxyAdmin is the community multisiga. DelegationManager
b. AllocationManager
c. Strategymanager
d. EigenPodManager
e. EigenStrategy
f. StrategyBeacon
g. StrategyBaseTVLLimits (pre-longtail strats)
Zeus Config Updates:
In Zeus config, we add a
GLOBAL_SLASH_DELAY
value. On all testnets (preprod, testnet, testnet-hoodi, tesnet-sepolia) this value is 5 blocks (1 min). On mainnet this value is 28,800 (4 days in blocks)Run
zeus env show <environment>
to double check.Important Checks:
_globalBurnOrRedistributionDelay
is properly setSlashEscrowFactory
is controlled by a newSlashEscrowProxyAdmin
. The owner of this contract is theCommunityMultisig
.Result:
Updated deploy scripts.