Skip to content

madewithai/pancakeswap-prediction-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PancakeSwap Prediction Bot

A small bot that places Bull or Bear bets on PancakeSwap Prediction (BSC). It runs in the background, reads past round results, and only bets when its internal “edge” score is high enough.


Contact me for more profitable bots

Telegram Support

What it does

  • Connects to the BNB prediction contract on BSC (you can point it at ETH/BTC contracts too via config).
  • Every 15 seconds it checks the current round and the last ~20 rounds.
  • If the strategy says “bet” and we’re still in the betting window (before lock), it sends one bet at your chosen size.

No UI, no dashboard—just a single process. You run it and watch your wallet or logs.


How the strategy works (plain English)

  • Momentum
    It looks at recent rounds: did price go up or down more often? Recent rounds count more than older ones. It only bets when one side is clearly ahead (above a minimum “edge” you can set).

  • Streak reversal
    If the last 3 (or more) rounds were all Bull or all Bear, it assumes a reversion and bets the opposite side once.

  • Safety

    • Won’t bet in the lock window (too close to round end).
    • Respects a max bet size.
    • You can add a short “cooldown” after a loss so it skips the next round or two.

So: it’s a mix of “follow recent trend” and “fade long streaks,” with simple risk limits.


Setup

  1. Clone / open the project

    cd pancakeswap-prediction-bot
  2. Install

    npm install
  3. Configure

    • Copy .env.example to .env.
    • Set PRIVATE_KEY to the wallet that will place bets (BNB for gas + bet amount).
    • Adjust optional vars if you want (see below).
  4. Run

    npm run dev

    Or build and run:

    npm run build
    npm start

Environment variables

Variable What it does
BSC_RPC_URL RPC endpoint (default: public BSC).
PRIVATE_KEY Wallet private key (must have BNB).
PREDICTION_CONTRACT Prediction contract address (default: BNB prediction).
BET_AMOUNT_BNB Default bet size in BNB (e.g. 0.01).
MAX_BET_BNB Cap per bet (e.g. 0.05).
MIN_EDGE_SCORE Only bet when momentum score ≥ this (e.g. 0.58).
LOOKBACK_ROUNDS How many past rounds to use (e.g. 20).
STREAK_REVERSAL_THRESHOLD After this many same outcomes, bet the opposite (e.g. 3).
COOLDOWN_ROUNDS_AFTER_LOSS Rounds to skip after a loss (e.g. 0 or 1).

Contracts (BSC)

  • BNB: 0x18B2A687610328590Bc8F2e5fEdDe3b582A49cdA
  • BTC: 0x48781a7d35f6137a9135Bbb984AF65fd6AB25618
  • ETH: 0x7451F994A8D510CBCB46cF57D50F31F188Ff58F5

Set PREDICTION_CONTRACT to the one you want.


Disclaimer

Prediction markets are risky. This bot is for education and experimentation. Past round data does not guarantee future results. Only use funds you can afford to lose and review the code before running with real BNB.

About

PancakeSwap prediction bot · Automated Bull/Bear betting on BSC (Binance Smart Chain). Momentum + streak-reversal strategy, configurable risk, private key. BNB ETH BTC prediction market, Node.js, viem, TypeScript.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors