Rule
mutually-exclusive-terminal-payout
Terminal payout remains reachable after a mutually exclusive one-time milestone.
Specimen 83 of 96 · Other active opt-ins / State and collections
- Severity
- high
- Confidence
- high
- Maturity
- experimental
- Selection
- Opt-in
- Policy intent
- not required
- Release
- v0.1.1
- Engine facts used
runtime-operationsstate-writescompleted-entries
Selection and scope#
Not selected by default. Select it with --detectors or the detectors list in nightshade.json. Either one replaces profile selection, so list every rule you want.
./.nightshade/node_modules/.bin/nightshade ./contracts --detectors mutually-exclusive-terminal-payout
./.nightshade/node_modules/.bin/nightshade detector show mutually-exclusive-terminal-payoutThe first command runs only this rule; --detectors takes a comma-separated list. The second prints the rule's metadata from your installed version.
Severity is review priority. It does not express exploitability or impact. Confidence is detector metadata, not a probability. All built-in rules are experimental.
Compiler scope: the engine supports the pinned profiles 0.28.0, 0.29.0, 0.30.0, 0.31.1, 0.33.0-rc.2, 0.34.0, 0.35.0-rc.1 and 0.35.0, with ZKIR2 by default. Support for this rule can be narrower; the rule documentation below states any narrower scope.
Corpus checks#
Synthetic corpus checks for this rule in the 0.1.1 proof run. A check counts only with compiler acceptance and complete analysis.
| Positive detected | Corrected quiet | Lookalike quiet | Other negative quiet | Incomplete |
|---|---|---|---|---|
| 1/1 | 1/1 | 1/1 | 0/0 | 0 |
No deviations were recorded for this rule.
These are behavior checks on synthetic fixtures, not a precision or recall estimate. See evaluation.
Rule documentation#
From docs/detectors/mutually-exclusive-terminal-payout.md at v0.1.1.
Availability: opt-in state-machine/effect review, no policy required. Severity/confidence: high/medium.
The rule finds a sibling one-time milestone transition (a represented Boolean false-to-true write) and a timeout/refund/release-style exported circuit that performs a canonical token payout and terminal-state write without reading the milestone state. It recognizes standard-library send lowering and reports the user call site. This is a cross-entry continuation review: censorship assumptions, commercial policy and runtime asset custody remain unproved.
An application may intentionally allow the payout independently of a sibling milestone, or may use the state solely for off-chain coordination; either can produce a valid review match. The rule compares source-level entry effects. It does not prove transaction ordering, simultaneous reachability, custody loss, or that the milestone is the application's intended completion condition.
Suppress a match#
If a match is intentional, suppress it on the line before with the exact rule ID and a reason of at least eight characters:
// nightshade-disable-next-line mutually-exclusive-terminal-payout -- Reason this match is intentionalDiagnostics cannot be suppressed, and an unmatched directive for a selected rule makes analysis incomplete. See configuration for fingerprint suppressions and baselines.