Skip to content

Validate min_funding_bps is in range 0-10 000 at invoice creation #694

Description

@Kingsman-99

Description

min_funding_bps sets the minimum percentage of the invoice total that must be funded before release. There is no bounds check; a value above 10 000 would require more than 100% funding, making the invoice permanently unreleasable.

Acceptance Criteria

  • create_invoice returns ContractError::InvalidAmount when min_funding_bps > 10_000
  • Validation is present before any storage writes
  • Unit test: min_funding_bps = 10_001 is rejected
  • Unit test: min_funding_bps = 10_000 is accepted
  • cargo test passes

Context

  • Target file: contracts/split/src/lib.rs

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programcomplexity: highComplex feature requiring deep knowledge - 200 ptsenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions