> ## Documentation Index
> Fetch the complete documentation index at: https://blockbet.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# BlockBet Explained: Virtual Matches to USDC Payouts

> Learn how BlockBet takes you from virtual match creation through live simulation to on-chain settlement and USDC payouts on Arc Testnet.

BlockBet is a decentralised football betting DApp running on **Arc Testnet**. Every match is a fully virtual simulation — no real-world fixtures, no off-chain oracles. Club ratings drive a probability engine that sets the odds, real USDC bets flow into on-chain pools, and smart contracts settle results and hold your winnings until you claim them. This page walks you through the complete lifecycle of a match, from the moment it is created to the moment funds land in your wallet.

## The Six Leagues

BlockBet simulates matches across six top-tier football leagues, each with their own set of rated clubs:

> [card] Premier League
>
> England's top flight

> [card] La Liga
>
> Spain's top flight

> [card] Serie A
>
> Italy's top flight

> [card] Bundesliga
>
> Germany's top flight

> [card] Ligue 1
>
> France's top flight

> [card] Saudi Pro League
>
> Saudi Arabia's top flight

Every club carries eight ratings — **attack, midfield, defence, goalkeeping, overall, form, homeAdvantage,** and **awayPerformance** — which feed directly into the odds engine before each kick-off.

## Match Lifecycle

**1. Match Created**

An admin schedules a virtual fixture between two rated clubs. The contract records the match and opens the betting window. Odds are calculated immediately from club ratings and published on the BlockBet UI.

**2. Betting Window Open**

You browse live matches, pick a side (Home win, Draw, or Away win), enter your USDC stake, and confirm two transactions in MetaMask: a USDC approval and the `placeBet` (or `placeAccumulator`) call. Your bet is recorded on-chain and the pool updates. Odds can shift as more bets come in.

**3. First Half Simulated**

The match status moves to `first_half`. The simulation engine runs using club ratings and a random seed. No new bets are accepted once the match kicks off.

**4. Half-Time**

The match pauses at `halftime`. Partial scores are available in the UI. The simulation prepares the second-half run.

**5. Second Half Simulated**

Status advances to `second_half`. The simulation completes and a final score is determined. The contract records the result: **1 = Home win, 2 = Draw, 3 = Away win**.

**6. Match Finished & Resolved**

Status moves to `finished`. The contract marks the match as resolved and calculates which bets won. The result is permanently on-chain and visible in the match history.

**7. Claim Your Winnings**

Payouts are **not** sent automatically. You visit **My Bets**, find your won bet, and click **Claim winnings** to call `claimWinnings(matchId)` (singles) or `claimAccumulator(accId)` (multiples). USDC lands in your wallet as soon as the transaction confirms.

> [!NOTE]
>
> All matches are virtual — outcomes are generated by BlockBet's simulation engine and are entirely independent of real-world football results.

## Arc Testnet Details

BlockBet runs exclusively on Arc Testnet. Make sure your wallet is configured correctly before placing bets.

| Detail | Value |
| - | - |
| Network name | Arc Testnet |
| RPC URL | `https://rpc.testnet.arc.io` |
| Block explorer | [testnet.arcscan.app](https://testnet.arcscan.app) |
| Betting currency | USDC (`0x3600000000000000000000000000000000000000`) |

> [!TIP]
>
> BlockBet auto-prompts MetaMask to switch to Arc Testnet when you connect your wallet. If the prompt doesn't appear, add the network manually using the RPC URL above.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.