DOCS —whitepaper v1.0

WalletBet.

A custodial, peer-to-peer prediction market protocol operating entirely through on-chain messaging, designed to bypass traditional platform intermediation while maintaining absolute price execution fidelity.

1. Abstract

Traditional prediction markets suffer from three distinct flaws: excessive intermediation (KYC, accounts, withdrawals), liquidity fragmentation (Automated Market Makers acting as counterparties), and complex smart contract risk.

WalletBet proposes a regressive architecture: a custodial escrow governed by open-source backend verification, resolving bets directly between discrete Solana wallets. By using on-chain transaction memos to establish intent and an automated cron-based resolver for settlement, WalletBet achieves the UX of a decentralized exchange without the associated smart contract overhead.

CORE TENET A keypair is the account.

There is no WalletBet username, password, or platform balance. A Solana keypair—either brought in from an external wallet or generated inside the app—is your identity, your auth token, and your settlement destination.

2. Authentication Paths

WalletBet accepts two classes of principal. Both resolve to a Solana keypair and authenticate the same way: a 32-byte Ed25519 signature over a server-issued nonce.

PATH A

Connect Wallet

Standard Solana wallet-adapter flow. Phantom, Solflare, Backpack, or any SIWS-capable wallet signs the nonce. Keys never leave the wallet.

PATH B

Generate Account

WalletBet generates a fresh Ed25519 keypair in-browser. The private key is shown once for backup, then stored locally. Re-login on any device is a private-key paste.

The generated-account path trades self-custody for zero-friction onboarding: no wallet extension install, no external app. The user is explicitly responsible for backing up the exported private key—there is no recovery mechanism.

3. Protocol Architecture

3.1 The Escrow Treasury

Unlike smart-contract based prediction markets (e.g. Polymarket, Polymarket), WalletBet utilizes a single, server-held Keypair known as the Treasury.

When a Market is initiated, the platform assigns it a unique, deterministic six-byte hexadecimal memo reference (e.g., WB-A1B2C3). Participants transfer SOL directly to the Treasury address, attaching this memo payload to the Solana transaction. The WalletBet backend monitors the chain, verifies the lamport delta, and indexes the deposit against the market state.

3.2 Resolution Mechanics

WalletBet eschews complex on-chain Oracles (Pyth, Switchboard) in favor of a hybrid approach:

  • Cron-Driven Verification: A secure backend worker fires iteratively to evaluate markets that have passed their resolve_at timestamp.
  • Spot Price Acquisition: The resolver fetches the current USD spot price for the designated asset via the CoinGecko API.
  • Deterministic Settlement: The resolver calculates the payout, subtracts a nominal network fee (reserved for Solana compute budgets), and executes a direct SystemProgram.transfer from the Treasury to the victor's wallet.

4. State Machine

A WalletBet market flows through a strict, linear state progression:

pending_deposit
Creator has drafted the thesis. Awaiting on-chain deposit.
open
Creator funded. Market is live on the wire waiting for a Taker.
pending_taker_deposit
Taker has claimed the slot. 10-minute lock to verify their on-chain deposit.
matched
Both sides funded. Waiting for the resolution timestamp.
resolved
Oracle price fetched, winner determined, SOL transferred.
refunded
Market expired without a Taker, or was manually cancelled. Creator refunded.

5. Risk Disclosures & Mitigations

5.1 Centralization Risk

WalletBet MVP is fundamentally a custodial platform. The Treasury wallet holds the private keys to all staked SOL. This architecture was chosen to circumvent the friction of deploying and auditing custom Anchor programs for MVP iteration. A future protocol upgrade will transition the Treasury to a non-custodial PDA (Program Derived Address).

5.2 Oracle Manipulation

By relying on a centralized Web2 API (CoinGecko), the platform assumes the risk of API outages or localized price manipulation. To mitigate this, WalletBet employs strict spot-price capture precisely at the resolve_at millisecond, and writes an immutable price_snapshots ledger record for post-resolution auditing.

5.3 Private Key Custody (Path B)

Generated-account keypairs reside in the browser's localStorage. Clearing site data, switching browsers, or losing the device without exporting the private key results in permanent loss of access to any funded markets. WalletBet displays a one-time backup dialog at generation and a persistent export affordance in the account drawer.

6. Roadmap

  • V1 (Current): Custodial matching, BTC/ETH/SOL spot prices, devnet implementation.
  • V2: Mainnet deployment, dynamic spread mechanics, arbitrary custom bets with admin arbitration.
  • V3: Smart Contract migration, non-custodial escrow, Pyth Network integration.