User Journey
User Journey
A complete walkthrough of how a user interacts with BetBit from start to finish.
Scenario
Alex and Sam want to wager $50 USDC on an upcoming NBA game. Alex thinks the Lakers will win; Sam thinks the Celtics will. They agree: loser pays the winner $50. BetBit handles the escrow so neither party has to trust the other.
Step 1: Alex Creates an Account
Alex visits vip.betbitsports.com and sees the landing page with a sign-up form. He enters a username, email, and password, then clicks "Create Account."
Behind the scenes, the app prompts his browser to create a WebAuthn passkey. On his phone, this means a fingerprint scan or Face ID. On his laptop, it might be a Touch ID prompt or a security key tap. This passkey will be used to sign all blockchain transactions. No seed phrase. No MetaMask. No extension to install.
Once the passkey registers, BetBit deploys a smart contract wallet (ERC-4337 account) for Alex on Avalanche. This wallet address is linked to his account. Alex doesn't see any of this. To him, he just signed up for an app.
Alex now sees his dashboard, which shows a USDC balance and an empty wager list.
Step 2: Alex Gets Test USDC
Since this is the Fuji testnet, Alex needs test USDC. He visits the settings page where there's a "Mint Test USDC" button. One tap mints 1,000 MockUSDC to his smart wallet. His balance updates to $1,000.00.
On mainnet, this step would be replaced by an on-ramp (buying USDC with a credit card or bank transfer).
Step 3: Alex Creates a Wager
Alex clicks "Create Wager" on his dashboard and walks through a three-step form:
Step 1: Amount & Deadline: Alex sets the wager amount to $50 and the funding deadline to 7 days from now. This gives Sam a week to accept and deposit. He also sets the outcome deadline to 14 days. This is enough time for the game to happen and both parties to submit results.
Step 2: Details: Alex writes a description: "Lakers vs Celtics, March 15 game. I take Lakers to win." He can optionally add a mediator's contact info (a trusted friend who'd resolve any dispute), but for this wager he skips it.
Step 3: Review & Confirm: Alex sees a summary: $50 wager, 7-day funding deadline, 14-day outcome deadline. He confirms.
The app batches two operations into a single transaction: approve the escrow contract to spend Alex's USDC, then call createWager on the smart contract. Alex sees a passkey prompt. One fingerprint scan and both operations execute atomically. The Pimlico paymaster covers the gas fee, so Alex pays zero AVAX.
The contract pulls a small creation fee (2 USDC) and a creation deposit (5 USDC, refundable if the wager is cancelled) from Alex's wallet. It creates the wager in PENDING state.
Alex is redirected to the wager detail page. He sees a shareable invite link and a button to copy it.
Step 4: Alex Shares the Invite Link
Alex copies the invite link and sends it to Sam via WhatsApp: "Here's our Lakers/Celtics bet. Deposit your $50 here."
The link looks like: https://vip.betbitsports.com/invite/abc123xyz
Step 5: Sam Accepts the Wager
Sam taps the link on his phone. The invite page loads showing the wager details: $50, Lakers vs Celtics, deadline in 7 days. Sam doesn't have an account yet, so he taps "Sign Up to Accept."
Sam creates an account the same way Alex did: username, email, password, passkey registration. His smart wallet is deployed. He mints some test USDC.
After signup, Sam is redirected back to the invite page. He now sees a "Deposit $50 to Accept" button. He taps it, scans his fingerprint, and the app sends a batched UserOperation (approve + deposit). The wager state transitions:
PENDING → PARTIALLY_FUNDED (Alex already deposited when creating)
PARTIALLY_FUNDED → ACTIVE (Sam's deposit completes funding)
Both Alex and Sam now see the wager as "Active: Awaiting Event" on their dashboards. $100 total USDC sits in the smart contract escrow. Neither party can withdraw until outcomes are submitted and the contract settles.
Step 6: The Game Happens
The Lakers beat the Celtics. Alex won his prediction.
Step 7: Both Submit Outcomes
Alex opens the wager on his dashboard and taps "Submit Outcome." He selects "I Won" and optionally writes a note: "Lakers won 112-98." He taps his passkey to submit.
The contract records Alex's outcome (WON) and transitions the wager to AWAITING_OUTCOME. Importantly, Sam cannot see what Alex submitted. The UI shows "Waiting for opponent's submission" with no indication of Alex's choice. This blind submission prevents gaming.
Sam opens the wager and sees "Submit Your Outcome." Being honest, he selects "I Lost." He confirms with his passkey.
Now both outcomes are recorded on-chain. The contract evaluates the truth table:
WON
LOST
Alex wins
Since Alex submitted WON and Sam submitted LOST, the outcomes agree. Alex is the winner. The contract auto-settles: state transitions to SETTLED, and Alex is marked as the winner with $100 USDC (minus the 5% protocol fee) available for withdrawal.
No mediator needed. No dispute. The honest reporting by both parties made settlement instant and automatic.
Step 8: Alex Withdraws
Alex sees "You won! Withdraw your funds" on the wager page. He taps "Withdraw," scans his fingerprint, and the contract sends him $95 USDC (the $100 pool minus 5% protocol fee). His balance updates immediately.
The wager is now complete. Both parties can see the final result, the transaction hash, and the settlement details on their profile's transaction history page.
What If They Disagreed?
If both Alex and Sam had submitted "WON" (both claiming victory), the truth table maps that to a draw. Both get their $50 back.
If the outcomes conflict in a way the truth table can't resolve automatically (e.g., one submits WON and the other submits DRAW), the wager moves to DISPUTED state. A mediator, either pre-selected or assigned by the protocol, reviews the situation and submits a ruling. There's a 48-hour appeal window before the ruling is executed, giving either party a chance to flag concerns.
What If Someone Doesn't Submit?
If the outcome deadline passes and one party hasn't submitted, the contract applies a late submission penalty to the silent party. If only one party submitted WON and the other stayed silent, the submitter wins by default (after penalty deduction from the silent party). If neither submitted, both get refunded.
Summary of States a User Sees
Pending
"Waiting for opponent to join"
Share invite link, cancel wager
Partially Funded
"Waiting for deposit" + who deposited
Wait or deposit (if they haven't)
Active
"Awaiting Event"
Wait for the event to happen
Awaiting Outcome
"Submit Your Outcome"
Choose WON / LOST / DRAW
Disputed
"Dispute: Mediator Reviewing"
Wait for mediator ruling
Settled
"You Won!" or "You Lost"
Withdraw funds (winner)
Refunded
"Wager Refunded"
Withdraw refunded amount
Expired
"Wager Expired"
Withdraw any deposited funds
Last updated