Skip to content

Claude/eager hamilton n9mj23 - #150

Merged
Bluechip23 merged 2 commits into
mainfrom
claude/eager-hamilton-n9mj23
Jun 10, 2026
Merged

Claude/eager hamilton n9mj23#150
Bluechip23 merged 2 commits into
mainfrom
claude/eager-hamilton-n9mj23

Conversation

@Bluechip23

Copy link
Copy Markdown
Owner

No description provided.

claude added 2 commits June 10, 2026 01:04
Fixes two pre-audit findings.

1. pool-core: a hostile CW20 on a standard pool could spoof
   cw20_msg.sender on the swap path to stamp a victim LP's shared
   rate-limit key (USER_LAST_COMMIT) and indefinitely block their
   RemoveLiquidity — freezing their only exit. Split the liquidity-op
   cooldown into its own USER_LAST_LIQUIDITY_OP map, keyed only on the
   real info.sender, so no swap (spoofed or not) can ever block a
   deposit or withdrawal. Swaps/commits keep USER_LAST_COMMIT.

2. router: hop pool_addr was never validated against the factory
   registry, so a malicious frontend could route user funds to an
   arbitrary contract with minimum_receive as the only guard. Add a
   factory PoolByAddress registry query and validate every hop
   (registration + declared pair) before any funds move; the stored
   factory_addr is now load-bearing instead of dead config.

Adds regression tests for both, plus a mock factory for the router
test harness. Full deterministic suite green (644 tests).
Replace the three prior review documents (SECURITY_REVIEW_PREAUDIT.md,
FUZZ_REVIEW.md, fuzz-stateful/FINDINGS.md) with a single consolidated
SECURITY_AUDIT.md. The report records the current findings, marks F-1
(LP withdrawal freeze) and F-2 (router hop validation) as fixed on this
branch, and notes F-9 (first-deposit reserve floor) found via the
stateful fuzz harness. FUZZING.md (run instructions) is retained.
@Bluechip23
Bluechip23 merged commit 618fb9d into main Jun 10, 2026
2 of 6 checks passed
@Bluechip23
Bluechip23 deleted the claude/eager-hamilton-n9mj23 branch June 10, 2026 01:47
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