Skip to content

Add unit tests for creator fee computation confirming correct bps application #580

Description

@Chucks1093

Summary

The creator fee is computed as a configurable bps percentage of the transaction value. Unit tests should verify the fee is computed correctly for several bps values and transaction amounts, and that the result always floors to a whole number of stroops.

Scope

  • Test 500 bps (5%) on a 1000 stroop transaction → fee is 50
  • Test 250 bps (2.5%) on a 1000 stroop transaction → fee is 25
  • Test 100 bps (1%) on a 999 stroop transaction → fee floors to 9 (not 9.99)
  • Test 0 bps → fee is always 0

Acceptance Criteria

  • 500 bps on 1000 returns 50
  • 250 bps on 1000 returns 25
  • 100 bps on 999 floors to 9
  • 0 bps always returns 0

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions