ErotemeEroteme

Resolution & Payouts

How betting pools resolve and winners get paid.

Market Resolution

When Polymarket resolves the market, the cron job detects it and settles the pool:

Polymarket resolves → Cron job detects → resolvePool() called
├── Database: pool.resolved = true, pool.creatorWon = true/false
├── On-chain: contract.resolvePool(poolId, marketOutcome)
└── Status: "resolved"

Resolution timing depends entirely on when Polymarket settles — could be hours or days after the event.

Payout Calculations

If Creator Wins

Creator receives: their stake + all counter-bets - 2% fee
Viewers receive: nothing (lost their bets)

If Viewers Win

Each viewer receives: their bet + matched amount - 2% fee
Creator receives: unfilled pot only (if any)

Worked Example

Pool: Creator staked 100 USDC on YES
Bets: Viewer A (50 USDC), Viewer B (30 USDC)
Total pot: 180 USDC (100 + 50 + 30)
Remaining unfilled: 20 USDC

If YES wins (creator correct):
├── Creator gets: 100 + 80 - 1.6 (2% of 80) = 178.4 USDC
└── Viewers get: nothing

If NO wins (viewers correct):
├── Viewer A gets: 50 + 50 - 1.0 (2% of 50) = 99.0 USDC
├── Viewer B gets: 30 + 30 - 0.6 (2% of 30) = 59.4 USDC
└── Creator gets: 20 USDC (unfilled portion only)

Withdrawing Winnings

After resolution, winners can withdraw at any time — there is no deadline.

  1. Go to the prediction page or your unclaimed winnings dashboard
  2. Click Withdraw Winnings
  3. Confirm the transaction
  4. USDC is transferred from the smart contract to your wallet

Platform Fees

The 2% fee is taken from the losing side's stake:

  • Fees accumulate in the contract's accumulatedFees variable
  • Contract owner can withdraw via withdrawFees(address)
  • Withdrawal is manual — must be called by the owner wallet

Edge Cases

No Bets Placed

  • On resolution, no on-chain settlement is needed
  • Creator can cancel and reclaim their full stake at any time

Partial Fill

  • Only the matched portion is at risk
  • Unmatched stake is returned to the creator after resolution

Failed On-Chain Resolution

  • Retried automatically on the next cron job run
  • Manual resolution available via admin dashboard

On this page