Show the net prize as the jackpot instead of the gross pool
GET /rounds/current's jackpot_sats was the full pool (participant_count * bet_amount_sats), which overstates what the winner actually receives once the 30% commission is taken out at payout time. Apply the same 70% split rounds/scheduler.py uses so the number shown during the round already matches the real payout, without surfacing the fee itself in the UI/docs. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -52,6 +52,12 @@ async def current_round(request: Request, session: AsyncSession = Depends(get_se
|
||||
closes_at = opened_at + timedelta(seconds=config.round_duration_seconds)
|
||||
await session.commit()
|
||||
|
||||
# Shown to players as "jackpot": the winner's 70% share of the pool (same
|
||||
# split rounds/scheduler.py applies at payout time), not the full pool —
|
||||
# what's displayed should match what the winner actually receives.
|
||||
pool_amount_sats = participant_count * config.bet_amount_sats
|
||||
jackpot_sats = pool_amount_sats * 70 // 100
|
||||
|
||||
return CurrentRoundResponse(
|
||||
server_time=datetime.now(timezone.utc).isoformat(),
|
||||
round_id=round_.id,
|
||||
@@ -60,7 +66,7 @@ async def current_round(request: Request, session: AsyncSession = Depends(get_se
|
||||
closes_at=closes_at.isoformat(),
|
||||
participant_count=participant_count,
|
||||
bet_amount_sats=config.bet_amount_sats,
|
||||
jackpot_sats=participant_count * config.bet_amount_sats,
|
||||
jackpot_sats=jackpot_sats,
|
||||
draw_animation_seconds=config.draw_animation_seconds,
|
||||
winner_user_id=round_.winner_user_id,
|
||||
winner_amount_sats=round_.winner_amount_sats,
|
||||
|
||||
@@ -29,8 +29,7 @@ Dopo l'accesso vedi, in ordine:
|
||||
- **timer** che conta alla rovescia il tempo rimanente prima della
|
||||
chiusura del round
|
||||
- **giocatori**: quanti hanno già piazzato una bet in questo round
|
||||
- **jackpot**: il totale in PLM che verrà distribuito (70% al vincitore,
|
||||
30% in fee)
|
||||
- **jackpot**: quanto riceverà chi vince questo round
|
||||
3. **Tab di navigazione** con quattro sezioni:
|
||||
|
||||
### Estrazione del vincitore
|
||||
|
||||
Reference in New Issue
Block a user