Skip to content

Add unit tests for bps calculation precision at small token amounts #330

@Chucks1093

Description

@Chucks1093

Summary
Bps calculations on very small token amounts may produce zero due to integer division truncation. Unit tests at the lower precision boundary confirm the behavior is defined and documented rather than silently losing value.

Scope

  • add unit tests that apply bps calculations to small amounts such as 1, 10, and 100 stroops
  • assert the result is the expected truncated value or the defined minimum
  • document the truncation behavior in the test if the result is zero

Acceptance Criteria

  • the test covers at least three small amount inputs
  • the expected truncated value is documented for each case
  • the tests follow existing bps helper unit test conventions

Contributor coordination: if you pick this up, reach out in Telegram for updates or clarification: https://t.me/accesslayerorg

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions