Skip to content

Test claim_winnings with zero total winnings share #407

@Yunusabdul38

Description

@Yunusabdul38

Test claim_winnings with zero total winnings share

Dependencies

  • Dependency: None

Description

If the winning outcome has a very small total stake compared to the protocol fee, it's possible for some users to receive 0 winnings.

Requirements

  • Set up a pool where the protocol fee is large enough that after deduction, the payout pool for a very small winning stake might result in 0.
  • Verify claim_winnings returns 0 and doesn't crash or underflow.

Task for Contributor

  • Implement the requested changes.
  • Crucial: Write comprehensive unit or integration tests to verify your implementation.
  • Ensure all tests pass and the code is properly formatted.

Verification

  • Contributor must ensure GitHub CI checks pass.
  • Verify the WinningsClaimedEvent is still emitted with 0 amount.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions