Complete Documentation
Comprehensive guide to Incrypt Oracle - Everything you need to know about our decentralized oracle infrastructure, prediction markets, smart contracts, and ecosystem.
🚧 Private beta as of November 18, 2025 — metrics, integrations, and partnerships shown here are testnet simulations and internal targets. No third-party firms have formally audited or endorsed the protocol yet.
📖 Introduction
Incrypt Oracle is a sophisticated, production-grade decentralized oracle infrastructure built on Binance Smart Chain (BSC) specifically architected for prediction markets. The platform leverages a multi-validator consensus mechanism with reputation-weighted validation, optimistic resolution with rapid dispute windows (4 hours vs industry standard 24-48 hours), and a comprehensive revenue model through subscription services and premium market features. The entire system is powered by the native $IO token, which serves dual purposes as both a governance mechanism and a staking/validation requirement for network participants.
What Makes Incrypt Oracle Different?
⚡ Industry-Leading Resolution Speed
4-Hour Optimistic Resolution: Markets resolve in 1-4 hours with a 4-hour dispute window, compared to industry standards of 24-48 hours (UMA) or 12+ hours (Polymarket).
Requires only ≥50% validator agreement vs 100% for full consensus. Result: 6-12x faster than traditional oracle systems.
🤖 Revolutionary AI Validator Network
Automatic API Discovery: AI validators automatically discover 10+ relevant APIs for any prediction market question without manual curation.
Uses Hugging Face models (Meta-Llama-3-8B-Instruct) for intelligent analysis. 24/7 availability with transparent on-chain reasoning.
✅ Production-Ready Deployment
BSC Testnet Deployment: All core contracts deployed and verified on Binance Smart Chain Testnet.
All smart contracts verified on BSCScan. Active validators, data feeds, and markets running on testnet. Mainnet ready.
💰 Sustainable Revenue Model
Multiple Revenue Streams: Trading fees (2%), API subscriptions (tiered pricing), and market creation fees.
50/50 revenue split between token holders (stakers) and treasury for long-term sustainability.
🎯 Additional Key Features
Supported Data Types
✨ Features
🎯 Oracle Infrastructure
- •Decentralized Validation - Multiple validator nodes ensure data integrity
- •Real-time Data Feeds - Sub-second oracle updates with minimal gas fees
- •High Confidence Scoring - Reputation-weighted consensus mechanism
- •Prediction Market Optimized - Purpose-built for outcome resolution
🎲 IncryptPredict Demo
- •Create Markets - Launch prediction markets on any event
- •AMM Trading - Automated market maker for outcome shares
- •Real-time Odds - Live price discovery and liquidity management
- •Instant Settlement - Oracle-powered automatic resolution
🏛️ DAO Governance
- •Proposal System - Submit and vote on platform improvements
- •Treasury Management - Community-controlled fund allocation
- •Revenue Distribution - 50/50 split between holders and treasury
- •Validator Governance - Stake-weighted voting on oracle parameters
🛠️ Developer Tools
- •JavaScript SDK - Easy integration with comprehensive documentation
- •React Hooks - Ready-to-use hooks for React applications
- •TypeScript Support - Full type definitions for better DX
- •Multi-chain Ready - BSC Mainnet, Testnet, and local development
🏗️ Technical Architecture
System Architecture Overview
Incrypt Oracle consists of several interconnected components working together to provide decentralized oracle services:
Core Smart Contracts
Oracle, Market, DAO, Token, Revenue contracts
Validator Nodes
Off-chain services that fetch and submit data
Frontend Application
Next.js web interface for users
JavaScript SDK
Developer library for easy integration
Consensus Mechanism
Incrypt Oracle uses a reputation-weighted consensus algorithm where validators submit data values and the final consensus is calculated as:
This ensures that more accurate validators (with higher reputation) have greater influence on the final consensus value.
Data Flow
1. Event occurs (e.g., Bitcoin reaches $100k)
↓
2. Validators fetch data from multiple sources
↓
3. Each validator submits their validation on-chain
↓
4. Smart contract aggregates submissions
↓
5. Consensus algorithm calculates final value
↓
6. Confidence score computed from variance
↓
7. Data feed updated with new value
↓
8. Prediction markets automatically resolved🤖 AI Validator
Overview
Incrypt Oracle features a revolutionary AI-powered validator that combines artificial intelligence with automatic API discovery to provide faster, more accurate oracle resolutions. Inspired by Sora Oracle's agentic approach, our AI validator uses Hugging Face models to analyze prediction market questions, automatically discover relevant data sources, and provide intelligent reasoning for each validation.
Key Features
Automatic API Discovery
AI automatically discovers 10+ relevant APIs for any prediction market question without pre-registration. Searches RapidAPI, APIs.guru, and known sources.
Hugging Face Integration
Uses state-of-the-art language models (Meta-Llama-3-8B-Instruct) to analyze questions, synthesize data, and provide detailed reasoning.
Multi-Source Validation
Fetches data from multiple discovered APIs and calculates consensus using median values and variance analysis for robust results.
Intelligent Reasoning
Provides detailed reasoning and metadata for each validation, including confidence scores, data sources used, and model information.
Higher Starting Reputation
AI validators start with 1200 reputation (vs 1000 for human validators) and maintain reputation through accurate validations.
Hybrid Consensus
Works seamlessly with human validators in reputation-weighted consensus, combining AI speed with human intuition.
How AI Validator Works
1. Question Analysis
When a prediction market question is created, the AI validator analyzes the question text, description, and category to understand what data is needed.
2. API Discovery (Inspired by Sora Oracle)
The AI agent automatically searches for relevant APIs:
- Searches RapidAPI marketplace for relevant endpoints
- Queries APIs.guru public API directory
- Uses known reliable sources based on category (crypto, sports, elections, weather)
- Returns top 10 most relevant APIs with authentication methods
3. Data Fetching
Fetches data from the top 5 discovered APIs, handling authentication, rate limiting, and errors gracefully.
4. AI Synthesis
Uses Hugging Face inference API to:
- Analyze the question and fetched data
- Extract the most likely numeric value
- Provide detailed reasoning for the validation
- Calculate confidence based on data agreement
5. Validation Submission
Submits validation to the oracle contract with:
- Extracted value (scaled to 4 decimal places)
- AI metadata JSON containing confidence, sources, reasoning, and model info
- Data source identifier
Smart Contract Integration
The AI validator is fully integrated into the IncryptOracle smart contract:
ValidatorType Enum
enum ValidatorType {
Human,
AI
}Key Functions
registerAIValidator(address, uint256)- Owner-only function to register AI validatorssubmitAIValidation(bytes32, uint256, string, string)- Submit validation with AI metadatagetValidationSubmission(bytes32, address)- Get validation details including AI metadatagetAIValidatorCount()- Get count of active AI validators
AI Validator Node Setup
The AI validator runs as a separate Node.js service. See the ai-validator/ directory for full implementation.
Quick Start
cd ai-validator npm install cp .env.example .env # Configure .env with your settings npm run build npm start
Required Environment Variables
AI_VALIDATOR_PRIVATE_KEY- Private key for validator walletHUGGINGFACE_API_TOKEN- Your Hugging Face API tokenORACLE_ADDRESS- IncryptOracle contract addressRAPIDAPI_KEY- (Optional) RapidAPI key for enhanced discovery
SDK Integration
The JavaScript SDK includes full support for AI validators:
Get AI Validator Count
const oracle = new IncryptOracle({ network: 'bsc-testnet' });
const aiCount = await oracle.getAIValidatorCount();
console.log(`Active AI validators: ${aiCount}`);Get Validation Submission with AI Metadata
const submission = await oracle.getValidationSubmission(feedId, validatorAddress);
if (submission.validatorType === ValidatorType.AI && submission.aiMetadata) {
console.log('AI Confidence:', submission.aiMetadata.confidence);
console.log('Sources:', submission.aiMetadata.sources);
console.log('Reasoning:', submission.aiMetadata.reasoning);
}Benefits of AI Validators
Faster Resolutions
AI can process and validate data much faster than manual validators, enabling near-instant resolutions for time-sensitive markets.
Automatic Expansion
No manual API curation needed. AI automatically discovers new data sources as prediction markets expand to new categories.
Transparent Reasoning
Every AI validation includes detailed reasoning, making the decision process transparent and auditable.
Cost Efficiency
AI validators reduce operational costs while maintaining high accuracy through multi-source validation.
24/7 Availability
AI validators operate continuously without downtime, ensuring consistent oracle service.
Hybrid Security
Combines AI speed with human validators for defense-in-depth security through diverse validation approaches.
Specialized Oracle Templates
Dedicated oracle wrappers for high-value market categories. Each template is deployed, verified on BscScan, and wired into the core `IncryptOracle` contract to provide category-specific data models, rate limits, and validation heuristics.
CryptoPriceOracle.sol
60-second crypto price feeds with automatic validator rotation and exchange failover.
0x7c7A94F460d13004db170fd11cC11Ec01f14108fView on BSCScan →SportsOracle.sol
Sports event oracle optimized for instant post-game resolution.
0x151c35c569605C752B1F765d9f12fc209c9026a8View on BSCScan →WeatherOracle.sol
Weather metrics oracle powering insurance and catastrophe prediction markets.
0x5bE075Cd0EF40B83B6F45caCC5A3fE548F571970View on BSCScan →ElectionOracle.sol
Election results oracle aligned with official election authority announcements.
0x1516901e599F2E5cE03869473272eFa98638c2d0View on BSCScan →📜 Smart Contracts
Comprehensive overview of all Incrypt Oracle smart contracts, their functions, security features, and deployment addresses.
Core Contracts
IncryptOracle.sol
Core oracle contract managing validators and data feeds with reputation-weighted consensus
0x35f86a92C903873dFB33fE7EF04CA0e4f93Ba0a7View on BSCScan →Key Features
Key Functions
createDataFeed(string name, string description, uint256 threshold)Create a new data feed for oracle validation
registerValidator(uint256 stakeAmount)Register as a validator with minimum 1,000 IO token stake
submitValidation(bytes32 feedId, uint256 value, string dataSource)Submit validation data for a feed (validator only)
🛡️ Security
ReentrancyGuard, Pausable, Ownable, division-by-zero protection, input validation
PredictionMarket.sol
AMM-based prediction market with oracle integration and private market support
0x4448dE2d0Aab5129c92198fCbc55502dAEaA5096View on BSCScan →Key Features
Key Functions
createMarket(string question, string desc, string category, uint256 duration, bytes32 oracleFeedId, uint256 liquidity, bool isPrivate, address[] allowed)Create a new prediction market
buyShares(uint256 marketId, uint8 outcome, uint256 amount)Buy shares for a specific outcome
sellShares(uint256 marketId, uint8 outcome, uint256 shares)Sell shares back to the pool
🛡️ Security
ReentrancyGuard, input validation, division-by-zero protection, oracle staleness checks
IOToken.sol
ERC20 governance token with ERC20Votes extension for DAO voting
0x40147E5600b107Dd48001Ec6034A8385aE3747E7View on BSCScan →Key Features
Key Functions
transfer(address to, uint256 amount)Transfer tokens to another address
approve(address spender, uint256 amount)Approve spender to transfer tokens
delegate(address delegatee)Delegate voting power to another address
🛡️ Security
OpenZeppelin ERC20, ERC20Votes standard implementation
RevenueDistributor.sol
Automated fee distribution with 50/50 split to stakers and treasury
0x5e69123b5591C16e236Ec1d508dc338168e80De6View on BSCScan →Key Features
Key Functions
stakeTokens(uint256 amount)Stake IO tokens to receive rewards
unstakeTokens(uint256 amount)Unstake tokens after minimum period
claimRewards(void)Claim pending rewards
🛡️ Security
ReentrancyGuard, Pausable, SafeERC20, round limit checks
IncryptDAO.sol
OpenZeppelin Governor for community governance with timelock integration
0xa900e5f7074cf9C002217AbfE97c289dB1526825View on BSCScan →Key Features
Key Functions
propose(address[] targets, uint256[] values, bytes[] calldatas, string description)Submit a governance proposal
castVote(uint256 proposalId, uint8 support)Cast vote on a proposal
🛡️ Security
OpenZeppelin Governor, TimelockController integration
OracleSubscription.sol
Tiered subscription service for oracle API access with rate limiting
0xfAA6F894ce67c1e6f101341E4330e648b649c676View on BSCScan →Key Features
Key Functions
subscribe(SubscriptionTier tier, uint256 months)Subscribe to oracle API access
freeSubscribe(void)Subscribe to free tier (1,000 requests/month)
🛡️ Security
Access control, rate limiting, input validation
📂 View Source Code
All contracts are open-source and available on GitHub for review and auditing.
View Contracts on GitHub →🛡️ Security & Audits
Security is paramount in oracle design. Incrypt Oracle implements multiple layers of protection against common attack vectors and manipulation attempts.
Security Features
Division-by-Zero Protection
Comprehensive safety checks prevent consensus calculation failures when all validators have zero reputation or when consensus values are zero.
- •Consensus calculation checks totalWeight > 0 before division
- •Special handling for zero consensus values with variance-based confidence
- •Pool liquidity checks before AMM calculations
- •Share count validation before division operations
Input Validation
All external inputs are validated with explicit require statements and range checks.
- •Range checks for amounts, durations, thresholds
- •String length validation for market questions/descriptions
- •Oracle data freshness checks (24-hour max for full, 4-hour for optimistic)
- •Confidence threshold enforcement (≥70% for full, ≥50% for optimistic)
Slashing Mechanism
Automatic slashing for validators with poor performance (<50% accuracy) with cooldown periods and stake preservation.
- •1-hour cooldown period prevents rapid successive slashes
- •Minimum stake preservation (never slashes below MIN_STAKE)
- •Maximum 3 slashes before automatic validator removal
- •False dispute penalties (1% stake slash)
Reentrancy Protection
All state-changing functions protected with OpenZeppelin ReentrancyGuard.
- •Checks-Effects-Interactions pattern followed throughout
- •SafeERC20 for token transfers
- •Comprehensive protection on all critical functions
Access Control
Role-based access control with Ownable pattern and validator-only modifiers.
- •Validator-only modifiers for validation submission
- •Creator-only functions for private market participant management
- •Emergency pause functionality on all critical contracts
- •Timelock integration for governance updates
Integer Safety
Solidity 0.8.x automatic overflow checking plus explicit underflow checks.
- •Automatic overflow protection via Solidity 0.8.x
- •Explicit underflow checks before subtractions
- •SafeMath patterns for critical calculations
Security Audit Report
🟡 Preliminary ReviewAudit Details
Issues Found
We completed a free beta assessment with AI Smart Contract Auditor and are packaging the documentation, tests, and contracts to submit for a proper third-party audit from firms such as CertiK or Halborn as soon as they accept the engagement. We are ready to hand off the codebase, but Incrypt Oracle has not been audited or endorsed by CertiK, Halborn, or any other external firm yet.
Planned Audit Coverage
⚠️ Integration Best Practices
- •Always check confidence levels (≥70% for critical, ≥50% for optimistic)
- •Validate freshness - check timestamp to ensure data is recent (≤24 hours for full, ≤4 hours for optimistic)
- •Handle staleness - implement fallback mechanisms if oracle data is too old
- •Monitor validators - track validator reputations and stake amounts
- •Use multiple oracles - for critical applications, consider multiple oracle sources
🎯 Development Roadmap
Our comprehensive development roadmap outlines the evolution of Incrypt Oracle from foundation to global scale, with clear milestones and deliverables.
Phase 1: Foundation
COMPLETECore infrastructure and initial deployment
Phase 2: Launch
IN PROGRESSProduction launch and mainnet deployment
Phase 3: Growth
PLANNEDExpansion and ecosystem development
Phase 4: Scale
FUTUREGlobal scale and advanced features
Overall Progress
💰 Tokenomics & Revenue
$IO Token Utility
Token Utility
- •Governance: ERC20Votes extension enables delegation and voting on DAO proposals
- •Validator Staking: Minimum 1,000 IO tokens required to register as validator
- •Prediction Market Currency: Primary medium of exchange for market participation
- •Subscription Payments: Required for API access tiers (Basic: 100 IO/month, Premium: 1,000 IO/month)
- •Market Creation Fees: 50 IO for public markets, 100 IO for private markets
Economic Security Model
Revenue Model
1. Prediction Market Trading Fees
- • Default fee: 2% (200 basis points) on all buy/sell transactions
- • Configurable per market (up to 10% maximum)
- • Collected in IO tokens and routed to RevenueDistributor
2. Oracle API Subscriptions
3. Market Creation Fees
- • Public market: 50 IO tokens (~$5-50 depending on IO price)
- • Private market: 100 IO tokens (~$10-100)
- • Collected immediately on market creation
4. Premium Market Features
- • Private market access control (100 IO creation fee)
- • Future premium features: custom fee structures
- • Extended resolution times
- • Custom oracle feeds
Revenue Distribution
The RevenueDistributor contract implements an automated 50/50 revenue split:
50% to Token Holders
- • Distributed proportionally to stakers based on stake size
- • Staking minimum: No minimum (but must stake to receive rewards)
- • Distribution interval: 7 days (configurable)
- • Reward calculation:
userReward = (userStake / totalStaked) × holderShare - • Gas-optimized claiming with round-based accounting
50% to Treasury
- • Development funding
- • Security audits
- • Marketing and partnerships
- • Validator incentives
- • Emergency reserves
Staking Mechanism
For Token Holders
- •Stake IO tokens to receive proportional share of holder rewards
- •Minimum staking period: 7 days (prevents gaming)
- •Unstake anytime after minimum period
- •Rewards claimable anytime (gas-optimized pagination for users with many rounds)
For Validators
- •Minimum stake: 1,000 IO tokens required
- •Stake can be slashed for poor performance (<50% accuracy)
- •Reputation system builds over time with accurate validations
- •Higher reputation = higher weight in consensus calculation
Market Economics
Liquidity Requirements
- • Minimum liquidity: 1,000 IO tokens per market
- • Ensures market viability and prevents manipulation
Fee Structure
- • Default fee: 2% (200 basis points)
- • Market creator sets fee (up to 10% max)
- • Collected on all buy/sell transactions
AMM Slippage
- • Automatic based on pool ratios
- • No slippage protection needed for small trades
- • Larger trades experience natural slippage
📊 Analytics Dashboard
Real-time insights into the Incrypt Oracle ecosystem. Monitor oracle uptime, market performance, user growth, and platform metrics.
📊 Demo data for now - Real live platform launch TBA
2,500,000
Total Volume (USD)
5,247
Active Users
99.97
Oracle Uptime
23
Active Markets
3
Active Validators
850,000
Total Staked (IO)
Daily Trading Volume
Markets by Category
User Growth
Oracle Performance (24h)
Top Markets by Volume
Will Bitcoin close above $90k before November 30, 2025?
Will ETH staking deposits reach 32M ETH by November 18, 2025?
Will BNB Chain gas fees average below 3 gwei during November 2025?
Will the Fed announce an additional rate cut in November 2025?
Will Solana daily TPS average stay above 2,500 this November?
Real-time Network Status
📋 Testnet Reports
Comprehensive testing results, deployment reports, and security audits for the Incrypt Oracle smart contracts on BSC Testnet.
Deployment Overview
Deployed Contracts (BSC Testnet)
✅ All contracts successfully deployed to BSC Testnet! Click addresses to view on BSCScan.
Contract Testing Results
| Contract | Coverage | Tests | Integration | Edge Cases |
|---|---|---|---|---|
| IOToken | 95% | 18 | 5 | 3 |
| IncryptOracle | 88% | 23 | 8 | 12 |
| PredictionMarket | 92% | 31 | 6 | 5 |
| IncryptDAO | 90% | 27 | 4 | 2 |
| RevenueDistributor | 94% | 22 | 3 | 2 |
| OracleSubscription | 85% | 15 | 2 | 1 |
Total: 121+ tests, 88%+ coverage across all contracts
📋 Deployment Summary
- • Network: BSC Testnet (Chain ID: 97)
- • Total Gas Used: 12,567,890
- • Total Cost: 0.0628 BNB
- • All contracts verified on BSCScan
Performance Analysis
| Function | Gas Used | USD Cost* | Frequency |
|---|---|---|---|
| Token Transfer | 21,000 | $0.52 | High |
| Buy Shares | 95,000 | $2.38 | High |
| Submit Validation | 85,000 | $2.13 | Medium |
| Create Proposal | 145,000 | $3.63 | Low |
| Create Market | 180,000 | $4.50 | Low |
* Based on 5 GWEI gas price and $400 BNB price
📡 API Reference
IncryptOracle Contract Methods
createDataFeed(string name, string description, uint256 threshold)→ bytes32Create a new data feed for oracle validation
registerValidator(uint256 stakeAmount)→ voidRegister as a validator with minimum 1,000 IO token stake
submitValidation(bytes32 feedId, uint256 value, string dataSource)→ voidSubmit validation data for a feed (validator only)
getDataFeed(bytes32 feedId)→ (name, description, value, timestamp, confidence, isActive)Retrieve complete data feed information
getActiveFeedIds(void)→ bytes32[]Get array of all active data feed IDs
raiseDispute(bytes32 feedId, uint256 proposedValue)→ voidRaise a dispute during optimistic resolution window
isDisputeWindowOpen(bytes32 feedId)→ boolCheck if dispute window is open for a feed
PredictionMarket Contract Methods
createMarket(string question, string desc, string category, uint256 duration, bytes32 oracleFeedId, uint256 liquidity, bool isPrivate, address[] allowed)→ uint256Create a new prediction market
buyShares(uint256 marketId, uint8 outcome, uint256 amount)→ uint256Buy shares for a specific outcome
sellShares(uint256 marketId, uint8 outcome, uint256 shares)→ uint256Sell shares back to the pool
resolveMarket(uint256 marketId)→ voidResolve market based on oracle data
claimWinnings(uint256 marketId)→ uint256Claim winnings from resolved market
calculateCost(uint256 marketId, uint8 outcome, uint256 amount)→ uint256Calculate cost to buy shares before purchase
getOdds(uint256 marketId)→ (noOdds, yesOdds)Get current odds for market outcomes
OracleSubscription Contract Methods
subscribe(SubscriptionTier tier, uint256 months)→ voidSubscribe to oracle API access
freeSubscribe(void)→ voidSubscribe to free tier (1,000 requests/month)
recordRequest(address subscriber, bytes32 feedId)→ boolRecord API request (owner only)
canMakeRequest(address subscriber)→ boolCheck if subscriber can make request
getSubscription(address subscriber)→ (tier, startTime, endTime, requestsUsed, requestsLimit, isActive)Get subscription details
💡 Integration Examples
import { IncryptOracle } from 'incrypt-oracle-sdk';
// Initialize the oracle
const oracle = new IncryptOracle({
network: 'bsc-mainnet', // or 'bsc-testnet'
rpcUrl: 'https://bsc-dataseed1.binance.org/',
});
// Get latest price data
const btcPrice = await oracle.getPrice('BTC/USD');
console.log('BTC Price:', btcPrice.value, 'USD');
// Subscribe to price updates
oracle.subscribe('BTC/USD', (data) => {
console.log('New BTC price:', data.value);
console.log('Confidence:', data.confidence);
console.log('Timestamp:', data.timestamp);
});React Application Example
import React from 'react';
import { useIncryptOracle, usePriceData } from 'incrypt-oracle-sdk/react';
function CryptoPriceTracker() {
const { oracle, isConnected, error } = useIncryptOracle({
network: 'bsc-mainnet'
});
const { data: btcPrice, loading: btcLoading } = usePriceData(oracle, 'BTC/USD');
const { data: ethPrice, loading: ethLoading } = usePriceData(oracle, 'ETH/USD');
if (!isConnected) return <div>Connecting to oracle...</div>;
if (error) return <div>Error: {error.message}</div>;
return (
<div>
<h2>Live Crypto Prices</h2>
<div>
<h3>Bitcoin</h3>
{btcLoading ? (
<p>Loading BTC price...</p>
) : (
<div>
<p>Price: ${btcPrice?.value.toFixed(2)}</p>
<p>Confidence: {btcPrice?.confidence}%</p>
</div>
)}
</div>
<div>
<h3>Ethereum</h3>
{ethLoading ? (
<p>Loading ETH price...</p>
) : (
<div>
<p>Price: ${ethPrice?.value.toFixed(2)}</p>
<p>Confidence: {ethPrice?.confidence}%</p>
</div>
)}
</div>
</div>
);
}Prediction Market Integration
import { ethers } from 'ethers';
import { IncryptOracle } from 'incrypt-oracle-sdk';
// Initialize with signer for write operations
const provider = new ethers.BrowserProvider(window.ethereum);
const signer = await provider.getSigner();
const oracle = new IncryptOracle({
network: 'bsc-mainnet',
signer: signer
});
// Create a prediction market
async function createPredictionMarket() {
// First, create an oracle data feed
const feedId = await oracle.createDataFeed(
'ELECTION_2025',
'US Special Election 2025 Winner',
5 // Validation threshold
);
console.log('Data feed created:', feedId);
// Then create market using that feed
// (requires PredictionMarket contract interaction)
}🔬 Technical Specifications
Consensus Algorithm Details
Reputation-Weighted Consensus Formula
Optimistic Resolution Logic
AMM (Automated Market Maker) Mathematics
Constant Product Formula
Network Parameters & Constants
IncryptOracle.sol
MIN_VALIDATORS: 3MAX_VALIDATORS: 21MIN_STAKE: 1,000 × 10^18 IO tokensVALIDATION_WINDOW: 1 hourMAX_CONFIDENCE: 10,000 (100.00%)SLASH_THRESHOLD: 5,000 (50%)SLASH_PERCENTAGE: 10%MAX_SLASHES: 3DISPUTE_WINDOW: 4 hoursOPTIMISTIC_RESOLUTION_THRESHOLD: 50%PredictionMarket.sol
BASE_FEE: 200 (2% in basis points)MAX_FEE: 1,000 (10% maximum)MIN_LIQUIDITY: 1,000 × 10^18 IO tokensRESOLUTION_BUFFER: 1 hourMARKET_CREATION_FEE: 50 × 10^18 IO (public)PRIVATE_MARKET_FEE: 100 × 10^18 IO (private)RevenueDistributor.sol
HOLDER_SHARE_PERCENTAGE: 5,000 (50%)TREASURY_SHARE_PERCENTAGE: 5,000 (50%)MIN_STAKING_PERIOD: 7 daysDISTRIBUTION_INTERVAL: 7 daysGas Optimizations
✅ Testing & Coverage
Comprehensive Test Suite Architecture
The test suite is organized into multiple layers covering unit tests, integration tests, edge cases, and gas optimization verification:
Test Structure
Integration Test Coverage
- • Full Oracle Flow: Validator registration → Feed creation → Validation submission → Consensus calculation → Resolution
- • Reputation Updates: Verifies validator reputation adjustments based on accuracy
- • Slashing Mechanism: Tests slashing triggers, cooldown periods, and stake preservation
- • Market Lifecycle: Create → Trade → Resolve → Claim complete flow
- • Optimistic Resolution: Tests 50% threshold resolution and dispute window
Edge Case Coverage
- • Zero validator scenarios
- • Maximum validator count enforcement (21 validators)
- • Oracle data staleness detection
- • Division-by-zero prevention in consensus calculation
- • Very large and very small value handling
- • Validation window expiration
- • Empty reputation scenarios
Test Coverage Metrics
| Contract | Coverage | Tests | Integration | Edge Cases | Gas Usage |
|---|---|---|---|---|---|
| IOToken | 95% | 18 | 5 | 3 | 1.2M |
| IncryptOracle | 88% | 23 | 8 | 12 | 2.4M |
| PredictionMarket | 92% | 31 | 6 | 5 | 3.4M |
| IncryptDAO | 90% | 27 | 4 | 2 | 2.7M |
| RevenueDistributor | 94% | 22 | 3 | 2 | 1.8M |
| OracleSubscription | 85% | 15 | 2 | 1 | 1.5M |
Total: 121+ tests, 88%+ coverage across all contracts
Live Metrics & Performance
Network Performance
Network Status
🌐 Deployment
BSC Testnet
✅ All contracts deployed and verified on BSC Testnet
Contract Addresses
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Workflow
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests for new functionality
- Run the test suite (
npm test) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Code Style
Solidity
Follow the Solidity Style Guide
TypeScript/JavaScript
ESLint + Prettier configuration included
React
Functional components with hooks
Testing
Comprehensive test coverage required