# Introduction

**Prophecy is an on-chain prediction market protocol.** It provides the smart contracts that venues, creators, traders, and liquidity providers use to run branded prediction markets with transparent trading, automated resolution, and self-custodial settlement.

Prophecy is **protocol, not platform**. Market creation, trading, resolution, settlement, gas sponsorship, and venue gating all happen on-chain. Consumers interact with the contracts directly; nothing about how they do so is prescribed by the protocol.

### What the protocol provides

* **ProphecyCore** — Constant-product AMM for YES/NO shares; market registration, trading, and liquidity provision.
* **ProphecySettlement** — Post-resolution waterfall that distributes collateral to LPs, creators, venues, and winning traders.
* **VenueRegistry** — On-chain gating for every market creation and trade, via EIP-712 permits plus optional allow/deny lists and NFT/ERC20 requirements.
* **VenuePaymaster** — ERC-4337 paymaster that lets venues sponsor trading gas for their users, working with EIP-7702 delegation so traders keep their EOA address.
* **Resolution engine** — AI agents fetch off-chain data, post results on-chain, and Somnia Reactivity delivers those results to condition groups that determine each market's outcome.

### What makes Prophecy different

#### AI-powered resolution

Markets are created through `MultiOutcomeAIResolutionMarket`, which dispatches questions to Somnia Agents. Agents fetch data from source URLs, return factual results on-chain, and Somnia Reactivity delivers those results to condition groups that evaluate each market's outcome. Natural-language markets ("Who won the 2026 Australian Grand Prix?") resolve automatically without human arbitration — AI agents post facts; on-chain conditions decide outcomes. Low-latency settlement (200ms blocks) enables real-time markets.

#### Gasless trading

VenuePaymaster lets a venue sponsor trading gas so users trade without holding SOMI. EIP-7702 delegation keeps the user's EOA address stable, and the paymaster restricts sponsorship to ProphecyCore trade selectors so deposits can only be consumed by the intended actions.

#### Zero protocol fees

The protocol takes **0% of trading fees**. Venue owners configure their own trading fee (default 3%, max 10%) and settlement reward (default 1%, max 10%) via VenueRegistry and keep 100% of the revenue those rates produce. Creator rewards and LP rewards are protocol-level constants (1% each).

***

### Where to start

* **Integrating with the protocol?** Start with [Developers → Overview](https://docs.prophecypredict.xyz/developers/overview). The [On-Chain Contracts](https://docs.prophecypredict.xyz/developers/on-chain-contracts) reference covers ProphecyCore, ProphecySettlement, VenueRegistry, VenuePaymaster, and the resolvers.
* **Operating a venue?** Start with [Operators → Overview](https://docs.prophecypredict.xyz/operators/overview), then register your venue in [Creating a Venue](https://docs.prophecypredict.xyz/operators/creating-a-venue) and fund gas sponsorship in [Gas Sponsorship](https://docs.prophecypredict.xyz/operators/gas-sponsorship).
* **Want to understand how markets work?** Start with [Concepts → Overview](https://docs.prophecypredict.xyz/concepts/overview) — a conceptual tour of events, markets, trading, liquidity, and fees with no contract detail required.
* **Want the bigger picture first?** Read [Why Prophecy](https://docs.prophecypredict.xyz/welcome/why-prophecy) and the [Roadmap](https://github.com/somnia-chain/prophecy-docs/blob/main/welcome/roadmap.md).
