Hooks.wtf

Introduction

Review notes and evidence

This report reorganises the 25 November 2026 internal review of the Dices launchpad at commit bcd45b2. Final finding IDs and severities follow the consolidated source findings, rather than the individual skill reports' local scales.

Scope and method

The source review covered every file in src/ and the deployment wiring in script/deployment/V001.s.sol. Dependencies were read where project code relied on their behavior. Later casino, rewards, bridge, forwarder and treasury phases were out of scope.

The original reviewer recorded a baseline build and test run, Slither analysis, four per-function context reviews, five separate skill reviews and a false-positive check of all 30 candidates. A separate verifier examined DICES-05 without the lead reviewer's tests and established its zero-capital form. These are descriptions of the supplied review, not new review work performed while mapping the documentation.

Recorded measureResult
Baseline tests127 passing tests in 14 suites; CI enforces 100% coverage of src/.
Original proof-of-concept run18 passing tests, including controls and a rejected gas-starvation candidate.
Independent DICES-05 verification11 passing tests, re-run by the original lead reviewer.
Static analysisSlither 0.11.5: 95 results from 101 detectors; triaged as no exploitable result, two valid optimisations and one valid zero check.
Token conformanceDicesCoin passed the recorded slither-check-erc run.
Hook bytecode23,077 bytes, leaving 1,499 bytes below the deployment size limit.
Code maturity1.7 / 4.0, with documentation, governance and transaction ordering among the weak areas.
Uniswap skill risk score19 / 33 under its main weighting; professional audit required. An alternative weighting gave 27.

The 18 and 11 proof-of-concept tests include measurements and negative controls. They are not additional findings. Their source and output are preserved in poc-tests.md and poc-tests-verify05.md.

Severity and counting

Severity reflects impact on users and the protocol; difficulty describes what an attacker needs. The final consolidated ratings are 4 Medium, 4 Low, 1 Undetermined and 13 Informational. Shared findings are counted once, regardless of the number of affected contracts.

DICES-09 remains Undetermined because the repository cannot establish whether the client agreed to the implemented fee and reserve model. The individual spec review's higher compliance ratings do not override that consolidated decision. DICES-05 retains Medium: its independent verifier considered Low appropriate unless large launch buys are routine, and the lead reviewer treated that pattern as expected for a launchpad.

Reproducing the contract tests

Download and extract the complete evidence bundle. Its 2026-11-25-skills-review/ directory contains all supplied reports, context files and Slither output, plus poc/AuditPoC.t.sol and poc/Verify05.t.sol extracted verbatim from the reports' Solidity blocks. The individual sources are also available as AuditPoC.t.sol and Verify05.t.sol.

Use a checkout of Dices-Tech/launchpad-evm-tokens at bcd45b2eea7b67477797df599443e2e8ae018f88 with its dependencies installed. The source review used Forge 1.9.0. Set DICES_REVIEW_EVIDENCE_DIR to the absolute path of the extracted 2026-11-25-skills-review directory, then run from the protocol checkout:

git rev-parse HEAD
mkdir -p test/audit-poc
cp "$DICES_REVIEW_EVIDENCE_DIR"/poc/AuditPoC.t.sol test/audit-poc/
cp "$DICES_REVIEW_EVIDENCE_DIR"/poc/Verify05.t.sol test/audit-poc/
forge test --match-path 'test/audit-poc/*' -vv

Confirm that the printed commit matches the reviewed snapshot. The tests import the project's own fixtures using relative paths, so the test/audit-poc/ location matters. The original temporary test directory was removed after the review; no source, test or deployment-script changes were part of that review.

The holder-version DICES-05 tests seed extra PoolManager USDC to model a shared deployment. testPoC11 measures that settlement dependency. The independent verifier also reproduced the zero-capital payout without extra USDC and checked escrow solvency. A passing exploit test establishes the recorded failure at this commit; it does not demonstrate a fix.

Rejected candidates

Each was a plausible concern that the check showed to be unfounded. Full reasoning is in fp-check-verification.md.

IDCandidateWhy it was rejected
R-01A caller starves qualify of gas so a swap completes without recording its priceMeasured: no gas limit does this. The hook's remaining work costs more than the 1/64 of gas it would have left
R-02Slither arbitrary-send-erc20 in CurrencySettler.settleThe transferFrom branch is unreachable; the only caller passes address(this)
R-03Slither reentrancy-eth in _afterSwapEvery callee is fixed or owner-set; the late write only ratchets upward
R-04Slither weak-prng in LiveCalculator._averageThe modulo is a ring index and a rounding test
R-05The stored conversion state is left behind, or consumed by another pool's swapNothing untrusted runs between beforeSwap and afterSwap; a failed swap reverts the write
R-06The swap pool or a third party can remove the hook's launch liquidityPositions are keyed by owner; the swap pool removes only what it added in the same swap
R-07A conversion can cost more coins than were queued and revert the swapProven from the liquidity formulas: cost ≤ inventory
R-08Starting the 24-hour clock with syncLevel at launch reaches a level earlyThe average is over a moving window; early low observations cannot raise it

Source reports

The skill names below describe tools used by the original reviewer. They do not imply that Trail of Bits or Uniswap performed or endorsed this review.

SourceContents
README.mdOriginal executive summary, priorities, method and limits.
findings.mdAll 22 consolidated findings and final ratings.
fp-check-verification.mdVerification of all 30 candidates, including eight rejections.
poc-tests.mdOriginal 18-test source, output and finding mapping.
poc-tests-verify05.mdIndependent eleven-test verification of DICES-05.
tob-audit-context.mdSystem model, actors, workflows and trust boundaries.
tob-entry-points.mdState-changing entry points and access levels.
tob-secure-workflow.mdSlither triage, security properties and proposed further checks.
tob-guidelines.mdDevelopment-guidelines review.
tob-code-maturity.mdNine-category maturity assessment.
tob-token-integration.mdToken behavior, USDC integration and settlement assumptions.
tob-spec-compliance.mdDocumentation and NatSpec compared with code.
uniswap-v4-security-foundations.mdHook permissions, delta accounting, threat model, callback gas and risk scoring.

The bundle also preserves all four per-function context files and the raw Slither reports. The source review records Trail of Bits skill versions 1.0.0–1.1.1 and Uniswap uniswap-hooks 1.6.0 from marketplace clones dated May 2026. The original README contains the precise skill and report mapping.

Cross-reference to the skill reports

The skill reports use their own numbering. This table maps them.

FindingToken integrationUniswapGuidelinesCode maturitySpec compliance
DICES-01TI-04V4SF-02, V4SF-08F-05, F-09F1, F10DIV-14
DICES-02TI-01F-01
DICES-03TI-02V4SF-01F-03F2, F8DIV-03
DICES-04V4SF-01, V4SF-08F-03F2
DICES-05F-15 (suspected)
DICES-06V4SF-03F-07F3DIV-06
DICES-07F-08F8DIV-13
DICES-08TI-10V4SF-04F-06F7DIV-04
DICES-09V4SF-11F-02F4DIV-01, 02, 05, 08, 09
DICES-10TI-11V4SF-05F-13F9
DICES-11TI-12V4SF-07F-11F6
DICES-12TI-07F-10
DICES-13TI-13F-12F11
DICES-14TI-06
DICES-15TI-05
DICES-16V4SF-12F-12DIV-10
DICES-17V4SF-11F-02F4DIV-07, 11, 12, 15, 17
DICES-18F-14DIV-10
DICES-19V4SF-09
DICES-20V4SF-06F-18
DICES-21TI-03, TI-09V4SF-10F-04F5
DICES-22TI-08V4SF-08

Review limits

  • The review was internal and tool-assisted. It is not a substitute for an independent professional audit before mainnet.
  • No fork tests or on-chain queries were performed. The Base PoolManager, Universal Router, Permit2 and USDC assumptions were taken from source and documentation.
  • No Echidna, Medusa, Halmos or Mythril run was performed. Further properties are listed in the secure-workflow report.
  • Slither could not analyse DicesHook._swapFee, DicesHook._addInitialTokenLiquidity or InternalSwapPool.closeInternalSwapPool; they were reviewed manually.
  • Dependencies received targeted review rather than a standalone audit. Key management, monitoring and incident response were not established from the repository.
  • The recorded Base Sepolia deployment predates the reviewed commit and was not compared with it.
  • The evidence describes a fixed source snapshot. No remediation review or fresh Solidity test execution is claimed by these documentation pages.
Previous
Overview