Skip to content

CYS3-05: Mutable Module Adapters Can Strand Protocol State - #541

Merged
evercoinx merged 2 commits into
mainfrom
serge/CYS305
May 9, 2026
Merged

CYS3-05: Mutable Module Adapters Can Strand Protocol State#541
evercoinx merged 2 commits into
mainfrom
serge/CYS305

Conversation

@evercoinx

@evercoinx evercoinx commented May 7, 2026

Copy link
Copy Markdown
Contributor

Note

Medium Risk
Tightens SSPRouter.setAdapter with new revert conditions that can block deployments or upgrades if wiring/order is wrong, and permanently prevents adapter replacement after vault registration.

Overview
Prevents unsafe adapter configuration in SSPRouter.setAdapter by rejecting non-contract addresses, requiring the candidate adapter to have granted SSP_ROUTER_ROLE to the router, and blocking adapter replacement once any vault is registered for that module.

Updates the adapter setup script and all tests to wire adapters first via adapter.setRouter(router) before calling setAdapter, and adds new router unit tests covering the new AdapterNotContract, AdapterReplacementBlocked, and AdapterNotWired reverts.

Reviewed by Cursor Bugbot for commit 70f3ec0. Bugbot is set up for automated code reviews on this repo. Configure here.

@evercoinx evercoinx self-assigned this May 7, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1f57e7d. Configure here.

Comment thread test/unit/SlashingManager.t.sol
@dB2510 dB2510 changed the title fix: implement CYS3-05 fix CYS3-05: Mutable Module Adapters Can Strand Protocol State May 7, 2026
@evercoinx
evercoinx requested a review from dB2510 May 9, 2026 04:11
@evercoinx
evercoinx merged commit 73a277c into main May 9, 2026
2 checks passed
@evercoinx
evercoinx deleted the serge/CYS305 branch May 9, 2026 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants