Commit d9e0c7a
feat: add
**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]>SlashingWithdrawalRouter (#1358)1 parent 6c0a035 commit d9e0c7a
File tree
64 files changed
+3967
-1398
lines changed- .github/configs
- lib
- script
- deploy
- devnet
- local
- output/devnet
- releases
- v.1.5.0-redistribution
- v1.4.1-slashing
- utils
- src
- contracts
- core
- interfaces
- mixins
- permissions
- pods
- strategies
- test
- harnesses
- integration
- tests/eigenpod
- mocks
- unit
- mixins
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
64 files changed
+3967
-1398
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
3 | 7 | | |
4 | 8 | | |
5 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | 4 | | |
8 | 5 | | |
9 | 6 | | |
| |||
13 | 10 | | |
14 | 11 | | |
15 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
- CONTRIBUTING.md+13-1
- README.md+4-4
- foundry.toml+3-1
- package.json+1-1
- src/Base.sol+16-9
- src/Script.sol+1
- src/StdChains.sol+26-3
- src/StdCheats.sol+14-2
- src/StdConstants.sol+30
- src/StdUtils.sol-17
- src/Test.sol+1
- src/Vm.sol+347-8
- src/interfaces/IERC1155.sol+1-1
- src/interfaces/IERC4626.sol+1-1
- src/interfaces/IERC6909.sol+72
- src/interfaces/IERC721.sol+1-1
- src/interfaces/IERC7540.sol+150
- src/interfaces/IERC7575.sol+241
- src/mocks/MockERC20.sol-234
- src/mocks/MockERC721.sol-231
- test/CommonBase.t.sol+44
- test/StdAssertions.t.sol-4
- test/StdChains.t.sol+7-8
- test/StdCheats.t.sol+45-24
- test/StdConstants.t.sol+38
- test/StdStorage.t.sol+20-3
- test/Vm.t.sol+2-2
- test/compilation/CompilationScript.sol+1-1
- test/compilation/CompilationScriptBase.sol+1-1
- test/compilation/CompilationTest.sol+1-1
- test/compilation/CompilationTestBase.sol+1-1
- test/mocks/MockERC20.t.sol-441
- test/mocks/MockERC721.t.sol-721
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| 67 | + | |
| 68 | + | |
66 | 69 | | |
67 | 70 | | |
68 | 71 | | |
| |||
214 | 217 | | |
215 | 218 | | |
216 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
217 | 223 | | |
218 | 224 | | |
219 | 225 | | |
| |||
235 | 241 | | |
236 | 242 | | |
237 | 243 | | |
238 | | - | |
| 244 | + | |
239 | 245 | | |
240 | 246 | | |
241 | 247 | | |
| |||
264 | 270 | | |
265 | 271 | | |
266 | 272 | | |
| 273 | + | |
| 274 | + | |
267 | 275 | | |
268 | 276 | | |
269 | 277 | | |
| |||
537 | 545 | | |
538 | 546 | | |
539 | 547 | | |
540 | | - | |
| 548 | + | |
541 | 549 | | |
542 | | - | |
| 550 | + | |
543 | 551 | | |
544 | 552 | | |
545 | 553 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| 71 | + | |
| 72 | + | |
69 | 73 | | |
70 | 74 | | |
71 | 75 | | |
| |||
221 | 225 | | |
222 | 226 | | |
223 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
224 | 231 | | |
225 | 232 | | |
226 | 233 | | |
| |||
241 | 248 | | |
242 | 249 | | |
243 | 250 | | |
244 | | - | |
| 251 | + | |
245 | 252 | | |
246 | 253 | | |
247 | 254 | | |
| |||
269 | 276 | | |
270 | 277 | | |
271 | 278 | | |
| 279 | + | |
| 280 | + | |
272 | 281 | | |
273 | 282 | | |
274 | 283 | | |
| |||
538 | 547 | | |
539 | 548 | | |
540 | 549 | | |
541 | | - | |
| 550 | + | |
542 | 551 | | |
543 | 552 | | |
544 | 553 | | |
| |||
Lines changed: 0 additions & 52 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| |||
76 | 80 | | |
77 | 81 | | |
78 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
79 | 87 | | |
80 | 88 | | |
81 | 89 | | |
| |||
88 | 96 | | |
89 | 97 | | |
90 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
91 | 103 | | |
92 | 104 | | |
93 | 105 | | |
| |||
148 | 160 | | |
149 | 161 | | |
150 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
151 | 167 | | |
152 | 168 | | |
153 | 169 | | |
| |||
318 | 334 | | |
319 | 335 | | |
320 | 336 | | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
321 | 358 | | |
322 | 359 | | |
323 | 360 | | |
| |||
0 commit comments