Team Cliley - 5-Minute Prediction Market for Any Token on Cardano#123
Open
Mercurial wants to merge 2 commits intopyth-network:mainfrom
Open
Team Cliley - 5-Minute Prediction Market for Any Token on Cardano#123Mercurial wants to merge 2 commits intopyth-network:mainfrom
Mercurial wants to merge 2 commits intopyth-network:mainfrom
Conversation
Team Cliley submission for Pythathon 2026. Constant-product AMM prediction market with Pyth Lazer oracle integration for real-time price feeds on Cardano (Plutus V3). Full end-to-end flow verified on Preprod: create, bet, resolve, claim.
- Bot: creates 5-min BTC/USD markets, auto-resolves via Pyth Lazer - Frontend: real-time price streaming, countdown timer, YES/NO betting - Wallet: CIP-30 via Bifrost (Nami/Eternl/Lace), real tx signing - Server: Bun.serve() with API routes, WebSocket pub/sub, Pyth streaming - Refactored CLI into shared lib/ modules (cardano, pyth, market, types) Bet flow: wallet UTxOs → server builds unsigned tx → wallet signs → finalize → submit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
How Pyth Is Used
pyth.get_updates()frompyth-network/pyth-lazer-cardano— reads verified price from withdraw-0 redeemerPOST /v1/latest_price— fetches signed price update for tx inclusion@pythnetwork/pyth-lazer-sdkWebSocket — real-time BTC price display viawss://pyth-lazer-0.dourolabs.app/v1/streamLive Demo
Bot creates 5-min markets, frontend shows live price + countdown + wallet betting:
Verified on Preprod
9d840a12...3c5d2bf0...88f97270...7d691f3c...Stack
pyth-network/pyth-lazer-cardano@pythnetwork/pyth-lazer-sdkWebSocketTeam Cliley
Files
Creates
lazer/cardano/prediction-market/containing:contracts/— Aiken smart contracts with Pyth integrationoffchain/lib/— Shared modules (cardano, pyth, market, bifrost, types)offchain/bot.ts— Market-maker botoffchain/server.ts— Bun.serve() API + WebSocket + frontendoffchain/frontend.tsx— React app with live price + wallet + bettingoffchain/cli.ts— CLI for manual operations