Roxy is a decentralized prediction market platform built on Bitcoin Layer 2 (Stacks blockchain) that enables users to make predictions on various outcomes, accumulate points through successful predictions, and participate in a peer-to-peer marketplace for trading points. The platform combines individual prediction capabilities with collaborative guild-based prediction systems, creating a competitive environment with comprehensive leaderboards.
- Binary Event System: Create and participate in YES/NO prediction events covering sports, price movements, and other outcomes
- Proportional Rewards: Winners receive rewards proportional to their stake in the winning pool
- Admin-Controlled Events: Secure event creation and resolution managed by contract administrators
- Multi-Event Support: Simultaneous participation across multiple prediction events
- Guild Creation: Users can form prediction guilds to pool resources and strategies
- Shared Staking: Guild members contribute points to a collective pool for larger prediction stakes
- Collective Rewards: Winnings are distributed among guild members based on contributions
- Guild Leaderboards: Track and compare guild performance metrics across the platform
- Point Trading: Buy and sell earned points using STX tokens
- Partial Purchases: Support for buying portions of listed point packages
- Protocol Fees: 2% transaction fee automatically collected by the protocol
- Listing Requirements:
- Minimum 10,000 earned points required to create listings
- 10 STX listing fee per marketplace listing
- Secure Transactions: All trades executed on-chain with automatic point transfers
- Individual Metrics: Track personal performance including total predictions, wins, losses, and win rate
- Guild Rankings: Compare guild performance across multiple metrics
- Points Tracking: Monitor total points earned and current balances
- Real-time Updates: On-chain statistics updated with each transaction
- Welcome Bonus: New users receive 1,000 starting points upon registration
- Earning Mechanism: Accumulate points by correctly predicting event outcomes
- Reward Distribution: Proportional payout system ensures fair distribution based on stake size
- Earned Points Tracking: Separate tracking of earned points for marketplace eligibility
user-points: Total point balance for each registered userearned-points: Points accumulated from winning predictions (used for marketplace selling threshold)user-names: Username registry for user identificationuser-stats: Comprehensive statistics including prediction count, wins, losses, win rate, and total points earned
events: Complete event registry containing pool sizes, status (open/closed/resolved), winner information, and metadatayes-stakes: Individual user stakes on YES outcomes per eventno-stakes: Individual user stakes on NO outcomes per event
guilds: Guild information including creator, name, total pooled points, and member countguild-members: Membership registry tracking which users belong to which guildsguild-deposits: Individual user contributions to guild point poolsguild-yes-stakes: Guild collective stakes on YES outcomes per eventguild-no-stakes: Guild collective stakes on NO outcomes per eventguild-stats: Guild-level performance metrics for leaderboard rankings
listings: Active and inactive point sale listings with seller information, point amounts, STX prices, and statusprotocol-treasury: Accumulated protocol fees from marketplace transactions and listing fees
transaction-logs: Comprehensive on-chain event log for frontend integration, tracking all major actions (registrations, staking, claims, marketplace transactions, etc.)
register(username): Register a new user and receive starting pointsstake-yes(event-id, amount): Place a YES prediction stakestake-no(event-id, amount): Place a NO prediction stakeclaim(event-id): Claim rewards from resolved events
create-listing(points, price-stx): List points for sale (requires 10,000+ earned points)buy-listing(listing-id, points-to-buy): Purchase points from marketplacecancel-listing(listing-id): Cancel an active listing
create-guild(guild-id, name): Create a new prediction guildjoin-guild(guild-id): Join an existing guilddeposit-to-guild(guild-id, amount): Contribute points to guild poolguild-stake-yes(guild-id, event-id, amount): Place guild YES stakeguild-stake-no(guild-id, event-id, amount): Place guild NO stakeguild-claim(guild-id, event-id): Claim guild rewards
create-event(event-id, metadata): Create new prediction eventsresolve-event(event-id, winner): Resolve events and set winnerswithdraw-protocol-fees(amount): Withdraw accumulated protocol fees
get-user-points(user): Query user point balanceget-earned-points(user): Query earned points (for marketplace eligibility)can-sell(user): Check if user can create marketplace listingsget-event(event-id): Get event details and statusget-listing(listing-id): Get marketplace listing informationget-protocol-treasury(): Query protocol treasury balanceget-user-stats(user): Get user leaderboard statisticsget-guild-stats(guild-id): Get guild leaderboard statistics
- Starting Points: 1,000 points for new users
- Minimum Earned for Selling: 10,000 earned points required to create marketplace listings
- Listing Fee: 10 STX per marketplace listing
- Protocol Fee: 2% (200 basis points) on all marketplace transactions
- Stacks wallet (Hiro Wallet recommended)
- STX tokens for transaction fees and marketplace purchases
- Clarinet development environment (for local testing)
- Register: Call
register(username)to create an account and receive 1,000 starting points - Participate: Stake points on prediction events using
stake-yesorstake-no - Claim Rewards: After events are resolved, use
claimto collect your winnings - Trade Points: Once you've earned 10,000+ points, create listings on the marketplace
- Join Guilds: Form or join guilds for collaborative predictions and shared rewards
The protocol collects fees to support development, rewards, and governance:
- Marketplace Fee: 2% of each point sale transaction
- Listing Fee: 10 STX per marketplace listing creation
- Treasury Management: Admin can withdraw accumulated fees via
withdraw-protocol-fees
