Skip to content

Fuzz: i128 boundary amount handling #90

Description

@nanaf6203-bit

Problem Statement
Existing fuzz tests cap amount at 10^12. The i128 boundaries
(i128::MAX, i128::MIN, 0) are not exercised.

Why it matters
A tip() overflow at any cast or arithmetic step is a fatal DoS.

Technical Context
Existing proptests in src/fuzz.rs.

Expected Outcome
A fuzz that picks amounts drawn from (-1, 0, 1, i128::MAX, i128::MIN, u64::MAX, u64::MAX as i128, ...) and asserts the contract panics with
InvalidAmount or BelowMinimum rather than overflowing.

Acceptance Criteria

  • cargo test fuzz runs ≥ 1000 cases for the new range.
  • No raw panics without a typed error.

Files/Modules Likely Affected

  • src/fuzz.rs

Difficulty Easy. Estimated Effort S.

Labels
area:testing, area:fuzzing,
area:smart-contract-safety, priority:high


Imported from docs/open-issues-draft.md as draft issue #30 (commit 7becd4b). Original draft-order cross-references in this body have been remapped to current GitHub issue numbers at import time.

Metadata

Metadata

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26area:fuzzingImported from open-issues-draft.mdarea:smart-contract-safetyImported from open-issues-draft.mdarea:testingImported from open-issues-draft.mdpriority:highImported from open-issues-draft.md

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions