Repository navigation
feat: governance pause controls, MembershipManager wind-down, blacklist seizure - #503
0xpanicError wants to merge 7 commits into
Conversation
Drop PAUSER_UNTIL_COOLDOWN, the PauserCooldownStillActive error, the per-pauser cooldown check in _pauseUntil, and the lastPauseTimestamp getter. A pauser can now re-pause as soon as the current timed pause expires or is lifted. MIN_PAUSE_DURATION and MAX_PAUSE_DURATION are unchanged. The lastPauseTimestamp mapping stays in PausableUntilStorage as __gap_0 so the namespaced storage layout is preserved for upgraded proxies. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
📊 Forge Coverage ReportGenerated by workflow run #837 |
Pausable.unpause() and PausableUntil.unpauseUntil() move from onlyOperatingMultisig to onlySuperGuardian. pause() stays with the operating multisig and pauseUntil() keeps its existing gating (guardian, or super guardian on eETH/weETH). No storage changes. Tests: TestSetup grants SUPER_GUARDIAN_ROLE to the addresses that already unpause (owner, alice, admin); per-suite unpauser helpers and negative unpause tests now use SUPER_GUARDIAN_ROLE / OnlySuperGuardian. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
EtherFiOracle now inherits PausableUntil instead of Pausable, so the guardian can pauseUntil() the oracle and the super guardian can lift it early. submitReport already uses whenNotPaused, which PausableUntil extends to also check the timed pause. Storage layout is unchanged: PausableUntil keeps its state at a namespaced slot. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
| import "@etherfi/governance/utils/DeprecatedOZPausable.sol"; | ||
|
|
||
| contract EtherFiOracle is Initializable, DeprecatedOZOwnable, DeprecatedOZPausable, UUPSUpgradeable, IEtherFiOracle, Pausable { | ||
| contract EtherFiOracle is Initializable, DeprecatedOZOwnable, DeprecatedOZPausable, UUPSUpgradeable, IEtherFiOracle, PausableUntil { |
There was a problem hiding this comment.
Oracle omitted from pause duration config
Medium Severity
EtherFiOracle now mixes in PausableUntil, but the upgrade playbook never calls setPauseUntilDuration on it. After upgrade, duration stays 0 and pauseUntil falls back to MIN_PAUSE_DURATION (8 hours) with no PAUSE_UNTIL_* constant, operating-batch call, or post-config check. ROLE_MIGRATION.md still says exactly the 11 prior contracts get a duration, and the guardian / operating-timelock tables omit oracle pauseUntil and setPauseUntilDuration.
Reviewed by Cursor Bugbot for commit 575f166. Configure here.
Replaces the user exits (unwrapForEEthAndBurn, requestWithdraw, requestWithdrawAndBurn, claim, claimBatch) with an operating-multisig forceExit(tokenIds, owners). It burns each NFT and transfers the eETH backing it, minus the burn fee, to the owner. The fee is capped at the NFT's value and stays in the contract as eETH. No LiquidityPool write path is called. sweepRemainingFunds(recipient) sends leftover eETH and ETH out once every tier vault has zero vault shares. Storage layout is unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Drops the membershipManager immutable, deposit(address,address), requestMembershipNFTWithdraw, and MembershipManager as an allowed withdraw() caller (only the redemption manager remains). Removes the field from ILiquidityPool.ConstructorAddresses and the two functions from the interface. Storage layout is unchanged (the field was an immutable). The archived MembershipManagerV0 test fixture loses its two exits that called requestMembershipNFTWithdraw. Upgrade scripts get minimal compile fixes only. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit bb8e7e2. Configure here.
| // prevent transfers for several blocks after a withdrawal to prevent frontrunning | ||
| membershipNFT.incrementLock(_tokenId, withdrawalLockBlocks); | ||
|
|
||
| claim(_tokenId); |
There was a problem hiding this comment.
Sweep blocked by leftover vault shares
High Severity
sweepRemainingFunds treats tierVaults.totalVaultShares == 0 as “every NFT has exited,” but forceExit can only decrement the vault share stored on still-living tokens. Historical unwrap/requestWithdrawAndBurn paths converted ETH value back to vault shares (flooring twice) then deleted the token, leaving remainder vault shares in the tier with no NFT attached. Those ghost shares cannot be cleared, so the sweep reverts after a full wind-down and retained fee eETH plus leftover ETH stay trapped.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit bb8e7e2. Configure here.
… weETH eETH and weETH get seizeBlacklistedFunds(user, recipient), gated by onlyUpgradeTimelock. It moves the user's entire balance to the recipient and only works while the user is blacklisted (Blacklister.blacklistedUntil in the future). The recipient must not be blacklisted. eETH moves shares directly with _transferShares. weETH sets a transient flag for the one transfer, so _beforeTokenTransfer skips its pause and blacklist checks; the flag is cleared before the call returns. Both work while the token is paused. IBlacklister gains the blacklistedUntil getter Blacklister already exposes. No storage changes. SEC-875. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Blacklister gets isBlacklisted(user), true while blacklistedUntil[user] is in the future, and nonBlacklisted uses it. eETH and weETH's seizeBlacklistedFunds call it instead of comparing blacklistedUntil to block.timestamp themselves. IBlacklister swaps blacklistedUntil for isBlacklisted. Blacklister storage is unchanged; it now needs an upgrade alongside the tokens. SEC-875. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>


Governance and deprecation changes. One commit each (changes 4 and 5 are the MembershipManager wind-down).
1. Remove pauser cooldown (
429c93b2)PAUSER_UNTIL_COOLDOWN, thePauserCooldownStillActiveerror, and the per-pauser cooldown check inPausableUntil._pauseUntil. A pauser can re-pause as soon as the current timed pause expires or is lifted.lastPauseTimestamp(address)getter, since nothing writes the value anymore. Nothing insrc,test, orscriptcalled it. This is an ABI change for any off-chain caller.MIN_PAUSE_DURATION,MAX_PAUSE_DURATION, and the fallback to MIN when the duration is unset.ROLE_MIGRATION.md§3.2, which described the 7-day cooldown.2. Gate unpause to the super guardian (
bacf91b4)Pausable.unpause()andPausableUntil.unpauseUntil()move fromonlyOperatingMultisigtoonlySuperGuardian.pause()stays with the operating multisig.pauseUntil()keeps its gating (guardian, or super guardian on eETH/weETH).SUPER_GUARDIAN_ROLEcomment inRoleRegistry.Affected contracts (all inherit the base change, no overrides):
PausableUntil: EETH, WeETH, LiquidityPool, Liquifier, EtherFiRestaker, CumulativeMerkleRewardsDistributor, WithdrawRequestNFT, EtherFiRedemptionManager, PriorityWithdrawalQueue, WeETHWithdrawAdapter, AuctionManager, EtherFiNodesManagerPausableonly: EtherFiOracle, NodeOperatorManager, EtherFiRateLimiter, MembershipManager (src/archive)3. Timed pause on EtherFiOracle (
575f1668)EtherFiOracleinheritsPausableUntilinstead ofPausable, matching the other converted contracts.pauseUntil()the oracle and the super guardian canunpauseUntil()it.submitReportalready useswhenNotPaused, which now also checks the timed pause.setPauseUntilDurationisn't called on the oracle, a guardian pause lasts the 8-hour minimum.4. MembershipManager wind-down (
17c49a3c)unwrapForEEthAndBurn,requestWithdraw,requestWithdrawAndBurn,claim,claimBatch.forceExit(tokenIds, owners)(operating multisig): burns each NFT and transfers its eETH, minus the burn fee, to the owner. The fee is capped at the NFT's value and stays in the contract as eETH. No LiquidityPool write call.sweepRemainingFunds(recipient)(operating multisig): sends leftover eETH and ETH once every tier vault has zero vault shares.5. Remove MembershipManager paths from LiquidityPool (
bb8e7e2a)membershipManagerimmutable,deposit(address,address),requestMembershipNFTWithdraw, and MembershipManager as awithdraw()caller.withdraw()is now redemption-manager only.ILiquidityPool.ConstructorAddressesand both functions from the interface.LiquidityPool.solandILiquidityPool.solno longer mention MembershipManager.SourceOfFunds.ETHER_FANstays: removing it would renumberDELEGATED_STAKINGin emitted events.MembershipManagerV0(test fixture only) loses its two exits that calledrequestMembershipNFTWithdraw. Upgrade scripts get minimal compile fixes only.Rollout order
forceExitevery holder in batches, built from aTransferSingle/TransferBatchsnapshot of MembershipNFT.sweepRemainingFundsto the treasury.Step 4 can't strand holders: after step 1 no MembershipManager path calls LiquidityPool.
6. Seize a blacklisted address's eETH and weETH (
093d80de,1505ebb4, SEC-875)seizeBlacklistedFunds(user, recipient), gated byonlyUpgradeTimelock, modelled onWithdrawRequestNFT.seizeInvalidRequest.recipient, and only whileBlacklister.isBlacklisted(user)is true. The recipient must not be blacklisted and can't be zero._transferShares. weETH sets a transient flag (tstore) for the one transfer so_beforeTokenTransferskips its pause and blacklist checks, and clears it before returning. Both work while the token is paused.BlacklistergetsisBlacklisted(user)(true whileblacklistedUntil[user]is in the future), andnonBlacklistednow uses it.IBlacklistergainsisBlacklisted. Blacklister must be upgraded in the same batch as eETH and weETH, or the tokens' seize call reverts against the old Blacklister.Storage layout
PausableUntilStoragesits at a namespaced slot. ThelastPauseTimestampmapping stays as the last struct field, renamed__gap_0per the repo's convention for retired fields. Existing per-pauser entries remain in storage, unread.forge inspectslot/offset/label output is identical before and after forMembershipManager(30 entries) andLiquidityPool(19 entries).forge inspect EtherFiOracle storageLayoutis identical before and after;PausableUntilstate sits at a namespaced slot.forge inspectoutput is identical before and after forEETH(12 entries),WeETH(21 entries) andBlacklister(5 entries); weETH's seize flag is transient storage.Rollout notes
SUPER_GUARDIAN_ROLEbefore or in the same batch as the upgrades. Otherwise a single key can unpause every contract.revokeFastcan revokeSUPER_GUARDIAN_ROLE. If every holder is revoked, nothing can be unpaused until the registry owner grants the role again.Tests
Change 1: removed cooldown tests and
lastPauseTimestampassertions inPausableUntil.t.sol. Added tests that the same pauser can re-pause right after expiry and after an early unpause.EETH/WeETHcooldownEnforcedtests becamesamePauserCanRepauseAfterUnpause. Removed thevm.warp(1_700_000_000)that existed only to clear the first-pause cooldown.Change 2:
TestSetupgrantsSUPER_GUARDIAN_ROLEto owner, alice and admin, the addresses tests already unpause as. Per-suite unpauser helpers grantSUPER_GUARDIAN_ROLE. Negative unpause tests expectOnlySuperGuardian.Change 4: 11 new tests in
MembershipManagerForceExit.t.sol(payout, fee retained, fee cap, batch, access control, wrong owner, length mismatch, sweep gating and payout, user exits removed).MembershipDeprecationUpgradeFork.t.solnow rehearsesforceExiton four real mainnet holders (needs RPC).V0MigrationFork.t.solkeeps only the migration checks.Change 5: LP tests for the removed paths are deleted;
test_membershipManagerEntryPointsRemovedpins that the three entry points are gone andwithdraw()rejects MembershipManager. Gated-callerwithdrawtests use the redemption manager.Change 3: 6 new tests in
EtherFiOracle.t.solcoveringpauseUntilgating,submitReportblocked and unblocked,unpauseUntilgating and not-paused revert, andsetPauseUntilDurationgating.Change 6: 11 new tests in
EETH.t.solandWeETH.t.sol: full-balance seizure, works while paused and paused-until, upgrade-timelock gating, not-blacklisted and expired-blacklist reverts, zero and blacklisted recipient reverts, and (weETH) a blacklisted sender's normal transfer still reverts after a seizure in the same transaction. OneBlacklist.t.soltest pinsisBlacklistedto the same window asnonBlacklisted, including the expiry second.Ran locally on this branch:
forge build: passes.forge test --no-match-path 'test/{fork-tests,integration-tests,behaviour-tests}/**': 908 passed, 100 failed. All 100 fail on the fork RPC (HTTP 403);masterhas the same 100 failures.Not run: fork, integration, and behaviour suites (no RPC).
🤖 Generated with Claude Code
Note
High Risk
Changes governance who can unpause, removes membership/user LP flows in favor of forced exits, and adds timelock-gated token seizures—security- and funds-critical areas requiring careful rollout ordering.
Overview
Pausing drops the per-pauser
PausableUntilcooldown so guardians can re-arm timed pauses as soon as one ends or is lifted; unpause for indefinite and timed pauses moves from the operating multisig to super guardian across shared pause bases (including EtherFiOracle, which now mixes inPausableUntil).Membership is wound down: user withdraw/unwrap/claim paths are removed in favor of multisig
forceExit(burn NFTs, pay owners eETH minus capped burn fee) andsweepRemainingFundsafter vaults empty. LiquidityPool drops the membership immutable and membership-only deposit/withdraw/request paths; livewithdrawis redemption-manager only. Deploy/upgrade scripts and interfaces follow the slimmer constructor.Compliance:
Blacklister.isBlacklistedis exposed; eETH and weETH add upgrade-timelockseizeBlacklistedFundsto move an entire blacklisted balance to a non-blacklisted recipient, including while paused (weETH uses a transient skip of transfer hooks).Reviewed by Cursor Bugbot for commit 1505ebb. Bugbot is set up for automated code reviews on this repo. Configure here.