feat: Reentrancy Guard and permissonless claim#379
Open
pankajjagtapp wants to merge 1 commit intopankaj/feat/security-upgradesfrom
Open
feat: Reentrancy Guard and permissonless claim#379pankajjagtapp wants to merge 1 commit intopankaj/feat/security-upgradesfrom
pankajjagtapp wants to merge 1 commit intopankaj/feat/security-upgradesfrom
Conversation
…drawRequestNFT contracts
📊 Forge Coverage ReportGenerated by workflow run #686 |
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
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.
…drawRequestNFT contracts
Note
Medium Risk
Touches core deposit/withdraw and withdrawal-claim paths by adding
nonReentrantmodifiers; while intended as a safety hardening, it can inadvertently block legitimate call patterns or introduce upgrade/storage issues if misapplied.Overview
Adds a new
ReentrancyGuardNamespacedmixin that stores the reentrancy status flag in a fixed keccak-based storage slot so it can be safely added to existing UUPS upgradeable contracts without shifting storage.Applies
nonReentrantto key state-changing entrypoints inLiquidityPool(deposits, withdrawals, withdrawal requests, and validator creation/funding flows) andWithdrawRequestNFT(claimWithdrawandbatchClaimWithdraw) to prevent re-entrancy during ETH transfers and cross-function re-entry.Introduces extensive tests, including an attacker contract to prove re-entry is blocked, unit tests validating the guard slot doesn’t collide with existing storage, and a mainnet fork test that upgrades live proxies and asserts sequential storage is byte-identical pre/post-upgrade.
Reviewed by Cursor Bugbot for commit f45de34. Bugbot is set up for automated code reviews on this repo. Configure here.