HOW BETS WORK

Create → play → settle. Every step signed, every payout on-chain.

BEFORE YOU START

You need a wallet with $CROC (see [SETUP]), and ideally a linked GHIN — the app pulls your hole-by-hole scores straight from there so you don't have to double-enter. Link your GHIN from your profile page after you connect your wallet.

THE FULL LOOP

  CREATE   →   ACCEPT   →   PLAY   →   ENTER SCORES   →   COMPUTE
                                              │
                                              ▼
                          PAID   ←   SIGN SETTLEMENT   ←   CO-SIGN OUTCOMES
1

CREATE THE BET

Head to /bets/create. Pick a format (Match play, Stroke play, Nassau, or Freeform), then fill in the details — opponent (or leave open for the first taker), stake in CROC, course, tees, 18 / front 9 / back 9, when you're teeing off, and how strokes are allocated (Full handicap, 90%, 75%, Match-play differential, or Scratch).

Hit [ Send it ]. MetaMask pops up to sign a plain-text statement of intent — no token transfer yet. That signature proves the bet came from you and gets stored alongside the wager.

Under the hood: the server creates a Round row (course, tees, date) and a Challenge row (format, stake, handicap rules) linked to it. Status starts as OPEN.

2

OPPONENT ACCEPTS

Your opponent opens the bet detail page — /bets/[id] — and taps [ Accept ]. Another MetaMask sig, recorded the same way. Both witness signatures live on the challenge so neither party can later claim they didn't agree to terms.

Once accepted, the Challenge moves to ACCEPTED. The Round is still SCHEDULED — nothing's been played yet.

3

PLAY THE ROUND

Go play golf. This is the part the app can't help you with.

If you're a GHIN poster, post your card the same way you always do. The app polls GHIN every five minutes for everyone who's linked, so usually your scores are sitting in our cache by the time you're back at the clubhouse.

4

ENTER OR IMPORT SCORES

Two ways scores land on the bet detail page:

  • Pull from GHIN — open the round's bet page, tap the button, sign one SIWE prompt. The app pulls every linked participant's hole-by-hole card and writes it in.
  • Manual entry — at /rounds/[id], tap each hole and punch in strokes. Mobile-friendly grid with par row, stroke indicator dots (for handicap allowances that give you strokes), and live front 9 / back 9 / total tallies.

Once anyone enters a score, the Round flips to IN_PROGRESS and the Challenge follows.

5

COMPUTE OUTCOMES

As soon as every participant has a substantively complete card (18 holes for All-18, 9 holes for front- or back-only), the app runs the per-format math — match-play hole-by-hole net of handicap dots, stroke-play net totals, Nassau's three sub-matches, etc. — and writes one or more ChallengeOutcome rows.

Each row is a simple statement: "X owes Y this many CROC because of Z." The first party to trigger compute (by tapping Pull from GHIN or Mark Complete) signs it implicitly; their wallet is recorded as the first witness.

If the match is halved (push), a single zero-amount PUSH outcome is written so the ledger still has a dual-witnessed record of "we agree it was a halve." No money changes hands, and the Round flips to COMPLETED just the same.

Formats today: MATCH (1v1 hole-by-hole), STROKE (lower net total wins), NASSAU (three sub-matches paying base stake each), FREEFORM (manual outcome reporting).

6

CO-SIGN EACH OUTCOME

The other participant opens the bet detail and taps [ Sign ] on each computed outcome row. MetaMask asks them to sign the exact statement — wallet, amount, reason. Both signatures together make the outcome binding.

Once every outcome on the bet is dual-signed, the app nets them into pairwise ChallengeSettlement rows (so a Nassau where you won front 9 + total 18 but lost back 9 collapses to one transfer for the net difference). The Challenge moves to COMPLETED.

7

SIGN THE SETTLEMENT

Both parties sign each settlement row — same flow, MetaMask prompt, statement of intent. Once a settlement has both sigs, the "you should pay this now" CTA appears on whoever owes.

When every settlement on the bet is dual-signed, the Challenge flips to SETTLED with a timestamp. The chain hasn't moved yet — this is just the paperwork.

8

PAY ON-CHAIN

The debtor taps [ Pay ]. MetaMask opens a CROC token transfer to the creditor for the exact settlement amount. Sign, confirm, wait the few seconds for Polygon.

The chain-sync cron (running every 5 minutes) scans the contract for new transfers and matches them to the open settlement by (from, to, amount, time window). When it finds the match, it stamps the settlement paid with the transaction hash, and the Challenge moves to PAID.

That tx hash is a clickable Polygonscan link on the bet detail forever — receipts that don't need anyone's server to stay alive.

> EDGE CASES

Push / halved match

The compute step writes a single zero-amount PUSH outcome (labeled with the actual hole tally, like "Match: 6-6-6 (push)"). Both parties co-sign it the same way they co-sign any other outcome. When net is zero, the Challenge jumps straight to SETTLED — no settlement signing, no payment step. Nassau's halved legs work the same way: front 9 won + back 9 push + total 18 push collapses to one transfer for the front-9 stake.

Someone bails mid-round

Whoever has scores in can mark them; the round stays IN_PROGRESS until either everyone has a full card or both parties manually agree to abandon. Today abandonment is a Postgres update; UI is on the roadmap.

GHIN score missing

If Pull-from-GHIN returns "no GHIN round posted yet for this date," either the player hasn't posted to GHIN yet or it's been less than five minutes since they did and our cache hasn't caught up. Wait or enter manually.

Disputed outcome

If the other party refuses to sign a computed outcome (says the score was wrong, the handicap was off, whatever), the Challenge moves to DISPUTED and falls back to manual outcome reporting. Admin override path exists.

> THE RECEIPTS

Every bet leaves a paper trail you can audit without us:

  • Signatures on every state transition (create, accept, witness, settle).
  • The hole-by-hole card with par row, color-coded scores, and a match-play running tally.
  • The outcome ledger (who owes who, why, how much).
  • The Polygonscan link to the on-chain CROC transfer.

Bet with conviction.

SETTLE WITH PROOF