ICP Binary Options Market - Decentralized Prediction Platform
Project Highlights
ICP Binary Options Market is a decentralized prediction market platform built on the Internet Computer Protocol. It enables users to make price direction predictions on cryptocurrency pairs (starting with ICP-USD) within specified timeframes.
Key benefits:
- Decentralized price feeds
- Transparent pool-based rewards
- No intermediaries
- Secure identity management
Features
- Binary Predictions: Users can take Long/Short positions on price movements
- Pool-based Rewards: Winners share the entire pool of deposits
- Internet Identity Integration: Secure authentication and transaction signing
- Custom Timestamp: Owner-defined trading periods
- Real-time Position Updates: Live tracking of pool sizes and positions
Walkthrough Video
How to Install
Prerequisites
- dfx CLI
- Node.js >= 18
- NPM/Yarn
Local Development Setup
# Start local replica
dfx start --clean
# Deploy ICP Ledger canister
dfx deploy icp_ledger_canister
# Deploy Binary Option Market
dfx deploy binary_option_market
# Install frontend dependencies
cd icp-asset
npm install --legacy-peer-deps
npm run dev
Usage Example
For Market Owner
# Start a new trading window
dfx canister call binary_option_market startTrading
# Resolve market at end timestamp
dfx canister call binary_option_market resolveMarket
# Enable reward claims
dfx canister call binary_option_market expireMarket
For Traders (Actor Client)
// Place a Long position
await market.bid({ Long: null }, 1 * 10e7);
// Claim rewards if won
await market.claimReward();
Documentation
Detailed documentation available at:
Dependencies
Backend
- Motoko
0.7.0
- Internet Computer SDK
- ICP Ledger Canister
- Internet Identity
Frontend
- Next.js 13
- TypeScript
- Chakra UI
- DFINITY Agent
License
This project is licensed under the MIT License. See LICENSE for details.
Resources
Future Plans
Short Term (Q4 2024)
- Multi-asset support (BTC, ETH pairs)
- Advanced trading features
- Mobile-responsive interface
Medium Term (Q1-Q2 2025)
- Shared Liquidity Infrastructure
- Unified liquidity pool ecosystem
Weβre actively seeking community feedback and contributions to shape our roadmap. DM US to participate in the discussion!