Implement BitOracle Pro Prediction Market Protocol#1
Open
peace-source wants to merge 6 commits intomainfrom
Open
Implement BitOracle Pro Prediction Market Protocol#1peace-source wants to merge 6 commits intomainfrom
peace-source wants to merge 6 commits intomainfrom
Conversation
…acle Pro - Define administrative constants including contract owner and error codes. - Set up platform configuration state variables such as oracle address, minimum stake, fee percentage, and market counter. - Create a data map for market data structure to store market details including start price, end price, stakes, blocks, and resolution status. This commit establishes the foundational elements required for the BitOracle Pro prediction market protocol.
- Add `create-market` function to initialize new prediction markets with start price, start block, and end block. - Add `make-prediction` function to allow users to place stakes on active markets with specified predictions and stake amounts. - Include necessary assertions and error handling for market creation and prediction staking. - Update market and user prediction data maps accordingly. This commit enables the core functionalities for creating markets and making predictions in the BitOracle Pro protocol.
- Implement `resolve-market` function to finalize market with the end price, ensuring only the oracle can resolve and market is not already resolved. - Implement `claim-winnings` function to allow users to claim their winnings from resolved markets, including fee deduction and payout. - Add read-only functions `get-market` and `get-user-prediction` to fetch market and user prediction details. This commit completes the core functionalities for resolving markets and claiming winnings in the BitOracle Pro protocol.
- Implement `set-oracle-address` to update the oracle address, ensuring only the contract owner can perform this action. - Implement `set-minimum-stake` to update the minimum stake requirement, ensuring only the contract owner can perform this action. - Implement `set-fee-percentage` to update the platform fee percentage, ensuring only the contract owner can perform this action. - Implement `withdraw-fees` to allow the contract owner to withdraw accumulated fees, ensuring sufficient balance and owner-only access. - Add read-only function `get-contract-balance` to fetch the contract's STX balance. This commit provides essential administrative functionalities for managing the BitOracle Pro protocol.
- Provide an overview of BitOracle Pro, a decentralized Bitcoin prediction market protocol. - Detail core protocol features including L2 prediction markets, STX staking system, decentralized oracle, and automated payouts. - Describe the technical architecture with Clarity smart contracts, Stacks L2 optimization, state management, and fee structure. - Include contract specifications such as Stacks and Clarity versions, contract address, and compliance standards. - Outline installation steps and requirements. - Explain deployment process and contract functions for market operations, user operations, and administrative functions. - Highlight the security model and attack mitigations. This commit adds comprehensive documentation to guide users and developers in understanding and utilizing the BitOracle Pro protocol.
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.
Overview
This PR introduces the core infrastructure for BitOracle Pro - a decentralized Bitcoin price prediction market protocol built on Stacks L2. The implementation establishes a complete lifecycle for prediction markets from creation to resolution, with robust administrative controls and comprehensive documentation.
Key Features Added
✅ Core Contract Infrastructure
✅ Market Lifecycle Management
✅ Non-Custodial STX Staking
✅ Decentralized Price Resolution
✅ Protocol Governance Controls
Technical Highlights
Changes Breakdown
1. Core Contract Infrastructure (
feat: Add initial constants...)2. Market Operations Engine (
feat: Implement market creation...)3. Market Resolution & Claims (
feat: Add market resolution...)4. Protocol Governance (
feat: Add administrative functions...)set-oracle-addressset-minimum-stakeset-fee-percentage5. Documentation & Compliance (
docs: Add README...)