Rule

shielded-burn-amount-width

An exported amount is forwarded unchanged to a canonical shielded burn whose coin and API amount types are wider.

Release v0.1.1View Markdown

Specimen 70 of 96 · Other active opt-ins / Token, coin and value transfers

Severity
info
Confidence
high
Maturity
experimental
Selection
Opt-in
Policy intent
not required
Release
v0.1.1
Engine facts used
resolved-source canonical-stdlib-calls resolved-types

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.

Shell
./.nightshade/node_modules/.bin/nightshade ./contracts --detectors shielded-burn-amount-width
./.nightshade/node_modules/.bin/nightshade detector show shielded-burn-amount-width

The 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 detectedCorrected quietLookalike quietOther negative quietIncomplete
2/22/22/20/00

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/shielded-burn-amount-width.md at v0.1.1.

Availability: opt-in. Severity: info. Confidence: high.

Resolved symbol identity excludes user-defined namesakes. Immutable local aliases, disclosure, identity/widening casts and linear pure helper return forwarding preserve the exact parameter/recipient identity. Arithmetic, mutable aliases, non-pure wrapper calls, complex helper control flow, callback bodies and captured parameters are outside this certificate. Ordinary recipient payments stay quiet.

This is a syntactic type relationship, including source branches and loop bodies, not a successful-history claim. Intentional small burns can match. Available balances, feasible transactions, proof success, inability to split burns and deployed impact are not proved. Review the intended limit before widening an API. The bounded owned-model pass emits rule-scoped incompleteness on exhaustion.

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:

Compact
// nightshade-disable-next-line shielded-burn-amount-width -- Reason this match is intentional

Diagnostics cannot be suppressed, and an unmatched directive for a selected rule makes analysis incomplete. See configuration for fingerprint suppressions and baselines.

References#