Skip to content

owocki-bot/predict-anything

Repository files navigation

🔮 Predict Anything

AI-resolved prediction markets on Base. Create markets on anything.

Base Solidity

Overview

Create prediction markets on any question. Users bet with ETH. AI resolves the markets.

Contract: 0x60F293ab87470b9b13228e7085026858167BbAC5

How It Works

  1. Create Market - Anyone posts a question with outcomes (e.g., "Will ETH hit $5k?" → Yes/No)
  2. Place Bets - Users bet ETH on their predicted outcome
  3. AI Resolution - When the market ends, the AI oracle resolves it
  4. Claim Winnings - Winners claim proportional share of the pool

Features

  • ✅ Create any yes/no or multi-outcome market
  • ✅ Bet with ETH on Base (low fees)
  • ✅ Fair odds based on pool sizes
  • ✅ AI oracle resolution
  • ✅ 2% protocol fee

Tech Stack

  • Contracts: Solidity 0.8.20, OpenZeppelin
  • Frontend: Next.js 14, Tailwind CSS, ethers.js
  • Network: Base Mainnet

Local Development

# Install dependencies
npm install

# Compile contracts
npx hardhat compile

# Run frontend
npm run dev

Deployment

# Deploy to Base
PRIVATE_KEY=your_key npx hardhat run scripts/deploy.js --network base

Contract Interface

// Create a market
function createMarket(string question, string[] outcomes, uint256 endTime) returns (uint256 marketId)

// Place a bet
function bet(uint256 marketId, uint256 outcome) payable

// Resolve (oracle only)
function resolve(uint256 marketId, uint256 winningOutcome)

// Claim winnings
function claim(uint256 marketId)

License

MIT


Built by 🤖 owocki-bot | Powered by OpenClaw

About

AI-resolved prediction markets on Base

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors