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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.prophecypredict.xyz/welcome/readme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
