Multiple varied scripts for operational tasks#378
Multiple varied scripts for operational tasks#378pankajjagtapp wants to merge 8 commits intomasterfrom
Conversation
…tETH redemption manager
…uling and reverting scripts
…e and user fee settings
…iquidity decisions and rate limits
…ions, exits, and unrestaking
📊 Forge Coverage ReportGenerated by workflow run #685 |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a9198f0. Configure here.
| keccak256("CONSOLIDATION_REQUEST_LIMIT_ID"); | ||
|
|
||
| uint256 internal constant FULL_EXIT_GWEI = 2_048_000_000_000; | ||
| uint256 internal constant SECONDS_PER_DAY = 86_400; |
There was a problem hiding this comment.
Unused SECONDS_PER_DAY constant in rate-limit scripts
Low Severity
SECONDS_PER_DAY is declared in both ReduceRateLimits.s.sol and RaiseRateLimits.s.sol but is never referenced in the code. The refill-rate divisions (e.g., 1_064_960_000_000_000 / 86_400) were computed offline and hardcoded as constants, leaving SECONDS_PER_DAY as dead code.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit a9198f0. Configure here.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a9198f0ad2
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| ICreate2Factory constant mainnetCreate2Factory = ICreate2Factory(0x356d1B83970CeF2018F2c9337cDdb67dff5AEF99); | ||
|
|
||
| uint256 constant MIN_DELAY_OPERATING_TIMELOCK = 28800; // 8 hours | ||
| uint256 constant MIN_DELAY_OPERATING_TIMELOCK = 172800; // 2 days |
There was a problem hiding this comment.
Keep operating timelock delay aligned with production value
Changing MIN_DELAY_OPERATING_TIMELOCK from 28,800 to 172,800 in the shared Utils base alters every script that schedules through this constant to a 2-day delay, while the operational flow in this repo still assumes 8 hours (including the newly added whale-ops runbook). In practice this creates schedule/execute mismatches where execute transactions are attempted on the old window and revert as not-ready, delaying critical ops by an extra 40 hours. This shared constant should remain consistent with the actual timelock delay (or be read dynamically from getMinDelay()).
Useful? React with 👍 / 👎.
| uint256 stEthAfter = IERC20(lido).balanceOf(address(restaker)); | ||
| console2.log("stETH received:", stEthAfter - stEthBefore); | ||
|
|
||
| uint256 depositAmount = IERC20(lido).balanceOf(address(restaker)); |
There was a problem hiding this comment.
Avoid encoding a stale stETH deposit amount in STEP=2 batch
depositAmount is snapshotted during fork simulation and then hardcoded into the generated depositIntoStrategy calldata, but STEP=2 is executed later in production after a waiting period; if the restaker’s stETH balance changes in the meantime (e.g., redemptions or accounting drift), the batch can either fail on tx3 (insufficient balance) or leave funds undeployed. This makes the multi-tx redelegation flow brittle and should be replaced with a runtime balance-based deposit step.
Useful? React with 👍 / 👎.


Note
Medium Risk
Adds multiple mainnet operations scripts that generate and simulate Gnosis Safe/timelock transactions affecting whitelists, fee params, rate-limiter buckets, and redemption capacity; mistakes in constants/addresses or the updated operating timelock delay could lead to incorrect governance actions.
Overview
Adds several new
forge scriptoperational utilities that generate Gnosis Safe JSON + fork-simulate batched transactions for: (1) Priority withdrawal queue admin/whitelist and per-user fee parameter updates (including a 7-tx combined batch), (2) temporary raise/reduce ofEtherFiRateLimitercapacities/refill settings for exits/consolidations/unrestaking, and (3) stETH management workflows including writing Safe JSON for claiming Lido withdrawals and a 2-step EigenLayer stETH redelegation (undelegate, then complete+delegate+re-deposit).Introduces timelock-driven stETH redemption capacity “burst then revert” scripts (plus an ops checklist doc) that schedule/execute
EtherFiRedemptionManagerparameter changes via the operating timelock and validate via fork redemption tests. UpdatesUtils.MIN_DELAY_OPERATING_TIMELOCKfrom 8 hours to 2 days, and broadens Foundryfs_permissionsto allow writes underscript/operations.Reviewed by Cursor Bugbot for commit a9198f0. Bugbot is set up for automated code reviews on this repo. Configure here.