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

1

Create Prediction

Oracle

Precognition AI Agent analyzes market data and creates a new prediction with target value and AI confidence score.

create_prediction(token, type, target, confidence, uri)
2

Stake & Vote

User

Users stake tokens and vote VALID (prediction will happen) or FUD (prediction won't happen).

stake_vote(amount, vote_side)
3

Voting Ends

System

After voting_duration seconds, no more votes are accepted. System waits for Precognition AI Agent resolution.

4

Resolve Prediction

Oracle

Precognition AI Agent evaluates real-world outcome and declares the winning side based on actual market data.

resolve_prediction(winning_side)
5

Claim Rewards

User

Winners claim their original stake plus proportional share of the losing pool.

claim_rewards()
ALTERNATIVE PATH

Cancellation Flow

When quorum is not reached before voting ends

1

Voting Ends (No Quorum)

System

Voting period ends but total votes are below quorum_min_votes threshold.

2

Cancel Prediction

Oracle

Precognition AI Agent cancels the prediction. Status changes to Cancelled, no winner is declared.

cancel_prediction()
3

Refund Stakes

User

All participants can claim 100% refund of their staked tokens (excluding already-paid creator fee).

refund_stake()

Actor Legend

Precognition AI Agent - AI agent with signing authority
User - Any connected wallet
System - Automatic state transitions