ShadowBet

ShadowBet is a decentralized betting platform powered by RedStone oracles, offering transparent, trustless, and real-time odds with minimal fees and secure on-chain settlement

Websitegithub
  • 1,250 Raised
  • 310 Views
  • 1 Judges

Categories

  • RedStone
  • ETHWarsaw

Gallery

Description

ShadowBet Commit–Reveal Prediction Market


A front‑running resistant, pari‑mutuel prediction market powered by RedStone price feeds. Users commit a hashed bet now, reveal later, and the market resolves trustlessly using RedStone’s signed historical price data.

How it works

1. Create market: Owner configures asset symbol, target price, and deadlines (commit, resolution, claim).
2. Commit: User commits a hash of (direction, salt, address) and stakes USDC. Commitments are hidden.
3. Reveal: After commit closes, users reveal direction and salt; totals per side are tallied.
4. Resolve & Claim: Anyone (via a wrapper script) sends a RedStone payload. The contract compares the oracle price at the resolution timestamp to decide winners. Winners receive pari‑mutuel payouts; losers fund the winners. Fully permissionless.


Key features

RedStone Oracle & API: Markets resolved with RedStone Oracle. Historical prices displayed on the app fetched from the RedStone API.
Commit–reveal anti‑frontrunning: Bets are hidden during commit; reveals happen only after the window closes.
Pari‑mutuel payouts: Winners split the losers’ pool proportionally to their stake.
Unrevealed stake handling: Unrevealed commitments are forfeited to the losing pool after reveal, discouraging griefing.
Robust resolution: Ties and no‑winner cases auto‑cancel for full refunds.
- Ratio and spread pairs: Cross‑asset markets like “ETH/BTC > 0.06” using multi‑feed RedStone payloads in a single resolution call.

Expansion potential

Percentage‑move markets: Bets on relative moves (e.g., “ETH up ≥10% by deadline”), resolved via RedStone’s historical price at start/end to compute percentage change.
- Beyond price feeds: As RedStone expands, add markets on proof‑of‑reserves, on‑chain activity KPIs, gas/network status, or custom data services (weather, sports) delivered as signed RedStone packages.
- Open resolution incentives: Permissionless resolution with a small “resolver tip” funded per market to encourage community‑driven, trust‑minimized settlement.


Hackaton Submission

 Working MVP deployed here, contract is on Base Sepolia network: https://shadowbet-74il.vercel.app/

Wallet address: 0x760E032A4588bb34D232D706D7C1b788aFcE56Bb

Github: https://github.com/ivaaaan/shadowbet

Bounties: RedStone, ETHWarsaw