Contract Overview
The DelphAI contract provides an AI-powered resolution oracle for prediction markets. Platforms can create markets on DelphAI by paying a creation fee, and the AI resolver will automatically resolve them at the scheduled time. Contract Address:0xA95E99848a318e37F128aB841b0CF693c1f0b4D1
(BSC Mainnet)
Market Functions
createMarket
Create a new prediction market with AI resolution.question
- The market questiondescription
- Additional context and resolution criteriapossibleOutcomes
- Array of possible outcome strings (minimum 2)resolutionTimestamp
- Unix timestamp when AI should resolve the market
marketId
- Unique identifier for the created market
- msg.value must be greater than or equal to marketCreationFee
- question must not be empty
- possibleOutcomes must have at least 2 options
- resolutionTimestamp must be in the future
MarketCreated
event
resolveMarket
Resolve a market with AI-generated outcome (only resolver).marketId
- The market to resolveoutcomeIndex
- Index of the winning outcome in possibleOutcomes arrayresolutionData
- AI explanation and reasoning for the resolutionresolutionSources
- Array of source URLs used for resolutionresolutionConfidence
- Confidence level of the resolution (0-100)proofData
- TEE attestation or cryptographic proof (future feature)
- Only callable by authorized resolver address
- Market must exist and be in Open status
- Current time must be greater than or equal to resolutionTimestamp
- outcomeIndex must be valid
- resolutionConfidence must be between 0 and 100
MarketResolved
event
cancelMarket
Cancel an open market (only creator or owner).marketId
- The market to cancel
- Caller must be market creator or contract owner
- Market must be in Open status
MarketCancelled
event
View Functions
getMarket
Get complete market details.marketCreationFee
Get the current market creation fee.resolver
Get the current authorized resolver address.marketCounter
Get the total number of markets created.getContractBalance
Get the contract BNB balance.Admin Functions
These functions are restricted to the contract owner.
setMarketCreationFee
Update the market creation fee.FeeUpdated
event
setResolver
Update the authorized resolver address.ResolverUpdated
event
withdrawFees
Withdraw accumulated creation fees.FeesWithdrawn
event
recoverERC20
Recover ERC20 tokens sent to contract by mistake.TokensRecovered
event