> For the complete documentation index, see [llms.txt](https://bayesmarket.gitbook.io/bayes-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bayesmarket.gitbook.io/bayes-docs/mechanism.md).

# Mechanism

Bayes is not just about predicting outcomes — it’s about doing so with fairness, speed, and liquidity. Here's how the system operates.

### 🔄 Hybrid AMM/CLOB Trading Model

Bayes uses a **hybrid trading architecture** combining the strengths of Automated Market Makers (AMMs) and Central Limit Order Books (CLOBs):

#### Key Components:

* **CFMM (Constant Function Market Maker):**\
  Each prediction market uses a **bonding curve** to algorithmically price outcome tokens (e.g. YES / NO), backed by on-chain reserves.\
  Prices update automatically based on supply and demand.
* **Order Book First, AMM Second:**\
  The system prioritizes **matching user orders** through a CLOB interface. If no match is found, the **AMM fills the gap** using the bonding curve to ensure trades can still execute without delay.

#### Core Benefits:

* **Always-on Liquidity:**\
  Even if no one else is trading, the AMM ensures you can buy or sell at fair prices.
* **Probabilistic Pricing Logic:**\
  Prices are normalized such that:\
  `Price(YES) + Price(NO) = 1`\
  This keeps market odds intuitive and mathematically coherent.
* **Smart Contract-Based Settlement:**\
  All trades and payouts are enforced transparently via smart contracts — no human intervention needed.
* **ERC-20 Composability:**\
  Outcome tokens are issued as standard ERC-20s, allowing integration into DeFi, wallets, and analytics tools.

***

### 🧠 Oracle and Dispute Resolution

**Market outcomes must be trustworthy — here’s how Bayes ensures that.**

Bayes Market uses a **multi-layered oracle system** that blends automation, optimism, and arbitration — with decentralization as its end goal.

#### 🔍 Key Architecture Highlights:

* Combines **objective on-chain data** (e.g. blockchain events) and **subjective real-world outcomes** (e.g. election results, sports)
* Designed for **speed**, **manipulation resistance**, and **transparent credibility**
* Backed by a **DAO-governed fallback layer** for edge cases

> We believe market resolution is the foundation of trust — and have built a system flexible enough to handle a wide range of scenarios.

***

#### 🧪 Phase 1: Semi-Centralized Reporting (Current)

In the current launch phase, outcomes are submitted via:

* **Trusted reporters**, including the Bayes team or verified sources
* A **2-hour dispute window** post-expiry for anyone to challenge a result

This setup ensures fast resolution while allowing users to raise challenges in borderline or controversial cases.

In situations such as:

* Event cancellations
* Ambiguous rules
* Unexpected edge conditions

Bayes activates a **fallback arbitration flow**, informed by internal checks and external data.

***

#### 🛡️ Future: Optimistic + Decentralized Settlement

Bayes is actively evolving toward a more resilient and trustless model:

* Adopting a **UMA-style optimistic oracle** where proposed results can be disputed and escalated
* Introducing **stake-based dispute resolution**
* Integrating **community governance** and **delegated arbitration**
* Allowing a transparent appeals process tied to user reputation

> This multi-layered system will eventually become **community-driven**, auditable, and highly scalable — suitable for both niche meme markets and serious macro predictions.

***

#### 🔄 Continuous Improvement

Bayes’ oracle system is **not static**. We're iterating continuously based on:

* Market feedback
* Dispute outcomes
* Reporter accuracy
* Scaling and decentralization milestones

> We’re building for the long run — with fairness, speed, and resilience at the core.
