BitMarket — LNbits extension
A prediction market extension for LNbits that allows users to create and participate in Bitcoin Lightning prediction markets. Bet on outcomes of events using Lightning Network payments with automated payouts when markets resolve.
For video content about the BitMarket extension, watch the official demo.
- Create prediction markets — set event titles, descriptions, outcomes, and resolution dates
- Place bets with Lightning — secure payments using Lightning Network invoices
- Automated payouts — winning bets automatically receive payouts when markets resolve
- Public market grid — browse all active prediction markets at /events
- Shareable market pages — individual market pages at /events/{id} for easy sharing
- Real-time updates — websocket notifications for payment confirmations
- Market liquidity tracking — see total funds locked in each market
BitMarket enables prediction markets where users can bet on binary outcomes of events using Bitcoin Lightning payments. Each market has two possible outcomes (Yes/No), and when the market resolves, winning participants receive automatic payouts based on the total liquidity in the market.
Similar to Polymarket, users can view a grid of active prediction markets and participate by placing bets with their Lightning Addresses. The platform ensures trustless operation through Lightning Network payments and automated payout mechanisms.
-
Enable the extension in LNbits.
-
Navigate to the BitMarket extension.
-
Click "New Markets" to create a prediction market.
-
Fill in market details:
- Title: Question you're predicting (e.g., "Will BTC > $100k by Dec 31?")
- Description: Additional context
- Wallet: Wallet to manage market funds
- Resolution Date: When the market will be resolved
- Oracle: Identifier of the resolution authority (optional)
-
Save the market to make it available for betting.
-
Navigate to the market grid at
/eventsto see all available markets. -
Select a market to view details and place a bet.
-
Enter your Lightning Address for receiving winnings and bet amount.
-
Choose outcome (Yes or No) and submit your bet.
-
Pay the Lightning invoice that's generated to confirm your bet.
Market owners can resolve markets when the event outcome is known:
-
Go to your market in the admin interface.
-
Click "Resolve Market" button.
-
Select the winning outcome (Yes/No) from the dropdown.
-
Click "Resolve" to finalize the market.
When a market resolves:
- All bets on the winning outcome share the total market liquidity proportionally
- Automated payouts are sent to winners' Lightning Addresses
- The market status changes to "resolved"
BitMarket provides two public interfaces:
- Market Grid at
/events: Browse all active prediction markets in a Polymarket-like grid - Individual Markets at
/events/{id}: View and participate in specific markets
Both public pages are accessible without authentication, allowing anyone to browse and participate in prediction markets.
LNbits empowers developers and merchants with modular, open-source tools for building Bitcoin-based systems — fast, free, and extendable.

