Rule
zero-transfer-retained-list-review
Review zero-inclusive actual transfers paired with retained List append for the exact user recipient.
Specimen 79 of 96 · Other active opt-ins / Token, coin and value transfers
- Severity
- info
- Confidence
- varies
- Maturity
- experimental
- Selection
- Opt-in
- Policy intent
- not required
- Release
- v0.1.1
- Engine facts used
canonical-invocation-snapshotsall-predicatesexact-collection-selectorscompleted-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 zero-transfer-retained-list-review
./.nightshade/node_modules/.bin/nightshade detector show zero-transfer-retained-list-reviewThe 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 |
|---|---|---|---|---|
| 3/3 | 2/2 | 3/4 | 3/5 | 2 |
Deviations recorded for this rule:
| Case | Kind | Expected to observed lines | Issue |
|---|---|---|---|
| manifest.json / zeroListGrowth50/drafts/zero-list50/controls/intentional-zero-linked-growth.compact | lookalike | [12] to [12] | control hit |
| manifest.json / zeroListGrowth50/drafts/zero-list50/controls/append-then-reset.compact | negative | [] to [] | incomplete or unvalidated |
| manifest.json / zeroListGrowth50/drafts/zero-list50/controls/append-then-pop.compact | negative | [] to [] | incomplete or unvalidated |
These are behavior checks on synthetic fixtures, not a precision or recall estimate. See evaluation.
Rule documentation#
From docs/detectors/zero-transfer-retained-list-review.md at v0.1.1.
Availability: opt-in informational review.
The rule flags a supported same-history pattern in which a zero-value transfer coexists with retained growth of a recipient List. It does not infer that the List is a reward, balance, or security-critical counter.
A positive amount assertion on the actual sent value, including a later atomic assertion, excludes the observation. Independent amount parameters, matching names, shared dependencies and wildcard storage paths cannot establish the relation. Unknown recipient/key congruence, unsupported effects, exhausted budgets, checkpoint composition and later overlapping destructive writes produce incomplete diagnostics. Later List pushes preserve earlier appends. The observation shares the existing 40,000 entry steps, 256 histories and 50,000 cumulative abstract values across preparation, capture, matching and emission, without retries.
An application may intentionally record zero-value events or retain a List entry for bookkeeping. Review the List's role before changing that behavior; the source relationship alone does not prove a free economic benefit or deployed impact.
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 zero-transfer-retained-list-review -- 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.