Prediction Lifecycle
Understanding the complete lifecycle of a prediction from creation to resolution.
Process Flows
Two possible flows depending on whether the prediction reaches quorum. The happy path leads to resolution and rewards, while insufficient participation triggers cancellation and refunds.
Happy Path Flow
Normal prediction lifecycle when quorum is reached
Create Prediction
OraclePrecognition AI Agent analyzes market data and creates a new prediction with target value and AI confidence score.
create_prediction(token, type, target, confidence, uri)Stake & Vote
UserUsers stake tokens and vote VALID (prediction will happen) or FUD (prediction won't happen).
stake_vote(amount, vote_side)Voting Ends
SystemAfter voting_duration seconds, no more votes are accepted. System waits for Precognition AI Agent resolution.
Resolve Prediction
OraclePrecognition AI Agent evaluates real-world outcome and declares the winning side based on actual market data.
resolve_prediction(winning_side)Claim Rewards
UserWinners claim their original stake plus proportional share of the losing pool.
claim_rewards()Cancellation Flow
When quorum is not reached before voting ends
Voting Ends (No Quorum)
SystemVoting period ends but total votes are below quorum_min_votes threshold.
Cancel Prediction
OraclePrecognition AI Agent cancels the prediction. Status changes to Cancelled, no winner is declared.
cancel_prediction()Refund Stakes
UserAll participants can claim 100% refund of their staked tokens (excluding already-paid creator fee).
refund_stake()