Portfolio & Winnings
Your positions and winnings are readable directly from the chain. Connect your wallet and your full history is available instantly.
Viewing Your Positions
There are two places to see your bets:
- My Bets tab (
/predict/portfolio) — shows all positions across every market: active bets, claimable winnings, and resolved history. Includes aggregate stats (total staked, win rate, total earnings). - Market detail page (
/predict/[marketId]) — the Your Position panel shows your stake, shares, status, and a Withdraw button for that specific market.
Position States
| Status | Meaning |
|---|---|
| Active | Market not yet resolved. Your stake is locked. |
| Won | Market resolved in your favour. Winnings are claimable. |
| Lost | Market resolved against your position. No payout. |
| Claimed | You have already withdrawn your winnings. |
| Pending | Resolution proposed but dispute window still open. |
Claiming Winnings
Once a market resolves in your favour, a Withdraw button appears on both the market detail page and the My Bets page. The payout breakdown is shown before you confirm:
Gross payout = your winning shares × total pool / total winning shares Claim fee = gross payout × 0.5% You receive = gross payout − claim fee
Clicking Withdraw sends a single transaction calling claimReward() on the market contract. The net amount is transferred directly to your wallet in the same block — there is no withdrawal queue or delay.
How Payout is Calculated
Winners split the entire pool (both YES and NO stakes) proportionally by their share of the winning pool. A user who staked early on the winning side (when odds were less favourable) holds more shares per USDC staked and therefore receives a larger proportion of the payout.
Example:
Market resolves YES. yesPool = 30 USDC (total YES stakes after fees) noPool = 70 USDC (total NO stakes after fees) totalPool = 100 USDC Alice staked 10 USDC YES early → received 23.3 yesShares Bob staked 20 USDC YES late → received 13.3 yesShares Total yesShares = 36.6 Alice gross payout = 23.3 / 36.6 × 100 = 63.7 USDC Alice claim fee = 63.7 × 0.5% = 0.32 USDC Alice receives = 63.4 USDC (6.4× her stake)
Portfolio Stats
The My Bets page shows aggregate stats computed from your on-chain positions:
- Total Staked — sum of all stakes across all markets
- Total Earnings — sum of all claimed payouts
- Win Rate — wins / (wins + losses) for resolved markets
- Markets Participated — count of markets with any position
How Positions are Read
The frontend calls getUserPosition(address) on every deployed market contract in a single batched RPC call. Positions with totalStaked == 0 are filtered out. The portfolio refreshes every 30 seconds automatically.