Files
casino/pkg/fees/fees.go
drjones e70258c54d feat(fees): disclosed rake and rounding, with generated disclosure
Two deductions on payouts: a percentage rake and flooring to whole
satoshis. Neither can be hidden — every millisatoshi is a double-entry
posting, so each appears as its own line in the player's history and the
conservation check fails if any amount goes unaccounted.

A rake makes the advertised 99% false, so EffectiveRTPBasisPoints
computes what players actually receive and the disclosure page is
rendered from it. A test simulates 200,000 rounds and asserts the
published figure matches what was really paid.

Fixes an overflow found by the tests: gross * RakeBP exceeds int64 for
large payouts, so the multiplication is split into whole and remainder
parts.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 23:26:12 +00:00

6.3 KiB