Deployment
V001.s.sol
V001 deploys and wires the launchpad contracts. Its primary finding concerns the mainnet owner default and ownership recovery; shared findings cover recipient validation, trusted-router setup and fixed deployment assumptions.
Reviewed source: script/deployment/V001.s.sol at commit bcd45b2.
Findings
| ID | Severity | Finding |
|---|---|---|
| DICES-04 | Low | The deployment script leaves a single EOA as owner on mainnet by default |
[LOW] DICES-04 · The deployment script leaves a single EOA as owner on mainnet by default
Affected modules: DicesHook.sol, TrustedRouters.sol, V001.s.sol.
Severity: Low. Type: configuration, access control.
Affected code: script/deployment/V001.s.sol:131, :306, :244-246, :323-325; src/core/TrustedRouters.sol:13.
Description
V001 refuses a mainnet run until the fee recipient, the buy-and-burn recipient and the bankroll are set. It does not do the same for the owner:
// script/deployment/V001.s.sol:306
protocolOwner = cfg.protocolOwner == address(0) ? deployer : cfg.protocolOwner;
BASE_MAINNET_PROTOCOL_OWNER is address(0) (:131), so as committed the deploying wallet stays owner and _requireWiring accepts that (:512).
Ownership is OpenZeppelin Ownable, reached through TrustedRouters. transferOwnership takes effect in one step, and renounceOwnership is callable.
Impact
All the powers in DICES-03 would sit on a hot deployer key. A one-step transfer to a mistyped address, or a renounce, removes administration permanently, including the ability to replace a faulty calculator (DICES-07) or set a missing recipient (DICES-01).
Evidence
The project's own test pins this behaviour: test_unsetOwnerKeepsTheDeployer (test/scripts/V001.t.sol:259-266) runs the script with a non-testnet configuration and a zero owner and asserts that hook.owner() is the deploying wallet. test_mainnetRequiresRecipients (:293-310) shows the other three constants are refused when unset. Both pass. So the default is deliberate; the finding is that it should not be available on mainnet.
Recommendation
- Require a non-zero
protocolOwnerthat is a contract whenisTestnetis false. - Use
Ownable2Step. - Override
renounceOwnershipto revert unless the client wants the option, and say so in the docs if they do.
Source finding: findings.md, DICES-04.
Shared findings
- DICES-01 · Medium: A zero creator or buy-and-burn recipient makes USDC-fee swaps revert — The script validates the buy-and-burn recipient, but direct hook construction still accepts zero.
- DICES-06 · Low: The launch-block guard does not stop anyone who uses the trusted router — Trusting Universal Router also exempts all of its users from the launch-block gate.
- DICES-21 · Informational: Design limits the team already documents — The script wires the fixed USDC paths and the unrestricted 10% bankroll allocation.