Skip to content

Delta security review: document the post-baseline delta, fix 2 findings - #155

Merged
Bluechip23 merged 1 commit into
mainfrom
claude/loving-albattani-eolo8l
Jun 11, 2026
Merged

Delta security review: document the post-baseline delta, fix 2 findings#155
Bluechip23 merged 1 commit into
mainfrom
claude/loving-albattani-eolo8l

Conversation

@Bluechip23

Copy link
Copy Markdown
Owner

AUDIT_DELTA.md is the internal adversarial review of every contract change since the audited baseline (618fb9d), written to hand to the external auditor: per-change security analysis, invariants checked, test evidence, and suggested external focus areas.

Two findings, both Low, both fixed here with regression tests:

DA-1: simulations on zero-reserve pools panicked the query VM. Quoting from POOL_STATE (the earlier optimistic-quote fix) exposed compute_swap's Decimal256::from_ratio division by a zero offer reserve on pre-threshold commit pools (reserves 0/0). Both query_simulation and query_reverse_simulation now return a clean "no active liquidity" error instead.

DA-2: the router accepted minimum_receive = 0. With per-hop max_spread now pinned to the pools' 5% hard cap, minimum_receive is the only end-to-end slippage protection, and zero meant none at all (~14% worst case over 3 hops vs ~1.5% before the cap change). The shared start_multi_hop entry now rejects zero on both the native and CW20 paths.

Workspace suite after fixes: 663 tests, 0 failures.

https://claude.ai/code/session_01PBHdD9Wpt5rB8eUCWQHzVw

AUDIT_DELTA.md is the internal adversarial review of every contract
change since the audited baseline (618fb9d), written to hand to the
external auditor: per-change security analysis, invariants checked,
test evidence, and suggested external focus areas.

Two findings, both Low, both fixed here with regression tests:

DA-1: simulations on zero-reserve pools panicked the query VM.
Quoting from POOL_STATE (the earlier optimistic-quote fix) exposed
compute_swap's Decimal256::from_ratio division by a zero offer
reserve on pre-threshold commit pools (reserves 0/0). Both
query_simulation and query_reverse_simulation now return a clean
"no active liquidity" error instead.

DA-2: the router accepted minimum_receive = 0. With per-hop
max_spread now pinned to the pools' 5% hard cap, minimum_receive is
the only end-to-end slippage protection, and zero meant none at all
(~14% worst case over 3 hops vs ~1.5% before the cap change). The
shared start_multi_hop entry now rejects zero on both the native and
CW20 paths.

Workspace suite after fixes: 663 tests, 0 failures.

https://claude.ai/code/session_01PBHdD9Wpt5rB8eUCWQHzVw
@Bluechip23
Bluechip23 merged commit a217f5e into main Jun 11, 2026
2 of 6 checks passed
@Bluechip23
Bluechip23 deleted the claude/loving-albattani-eolo8l branch July 7, 2026 20:18
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