doppler-bench-2026-05-23
int128 to uint128 cast in SwapRestrictorDopplerHook (regraded LOW; defense-in-depth)
What was found
AntFleet's two-model consensus review (Claude Opus 4.7 + GPT-5) ran against 3 PRs on [AntFleet/bench-doppler](https://github.com/AntFleet/bench-doppler), surfacing 3 unanimous findings on PR #2 (initializers, hooks, migrators).
---
LOW — SwapRestrictorDopplerHook int128 to uint128 cast (regraded, originally HIGH)
SwapRestrictorDopplerHook._onSwap casts balanceDelta.amount0() (int128) directly to uint128. The two-model consensus originally graded this HIGH, claiming a negative delta would wrap to ~2^128 and disable the per-address buy cap.
Regraded to LOW after maintainer pushback on __LINK0__. The cast sits inside the params.zeroForOne != isToken0 branch, which only runs when the asset is the swap output. Uniswap V4 keeps the BalanceDelta positive on the output side, so the wraparound the report described cannot occur in normal swap semantics. The fix PR was closed without merge as not a real issue. The proposed require(assetDelta > 0) remains a benign defense-in-depth hardening but is not a security fix.
---
CRITICAL (withdrawn) — RehypeDopplerHookMigrator buyback currency mismatch
Both asset-buyback and numeraire-buyback branches transfer using Currency.wrap(asset). Reviewer withdrew finding after re-checking the swap direction logic — the currency routing is correct given the swap path.
---
PR #1 (core contracts) and PR #3 (governance, tokens) — clean
No consensus findings on Airlock, Bundler, lockers, base contracts, governance, token factories, or DN404.
Evidence
- Benchmark repo: AntFleet/bench-doppler
- Initializers/hooks bench PR: AntFleet/bench-doppler#2 (3 findings)
- Core contracts bench PR: AntFleet/bench-doppler#1 (0 findings — clean)
- Governance/tokens bench PR: AntFleet/bench-doppler#3 (0 findings — clean)
- Source repo: whetstoneresearch/doppler
- Upstream fix PR: whetstoneresearch/doppler#521 — closed without merge; maintainer (Cooper Kunz) noted asset-side BalanceDelta is always positive when the asset is bought, so the wraparound is unreachable. Regraded HIGH → LOW.