GenLayer
Optimistic Democracy

From an ambiguous question to a decision the world can trust.

GenLayer turns subjective, non-deterministic outcomes into on-chain finality. Here is the full picture, one primitive at a time.

01 · Optimistic Democracy

Optimistic Democracy

At the heart of GenLayer is a consensus mechanism unlike any blockchain has ever used. Instead of racing to solve a puzzle, validators use their reasoning to evaluate a claim. The first round always draws exactly 5 random validators from the network. One is designated the leader: it executes the Intelligent Contract and proposes an answer. The others independently re-evaluate it under the Equivalence Principle. If more than 50% agree, the answer is optimistically accepted and finalizes in minutes. If anyone disputes it during the finality window, the case escalates: each appeal round grows the validator set to 2n+1, so 5 becomes 11, then 23, then 47, and so on. The set keeps roughly doubling, and Schelling points emerge, as staking incentives pull validators toward the truth, making honest agreement the most profitable path. In the rare worst case it escalates all the way to the maximum of about 1,000 validators (effectively every active validator). The common case finalizes in roughly 30 minutes; a full escalation to the maximum set takes around three hours.

5 nodesappealfinality
02 · Intelligent Contracts

Intelligent Contracts

Traditional smart contracts are pure code: deterministic, inflexible, and blind to the real world. Intelligent Contracts are different. They combine Python code, natural language specifications, and the ability to fetch real-world data from the web. A contract can read a website, parse a PDF, check a flight status, or interpret a clause in a service agreement. The contract itself articulates what outcomes count as equivalent. Developers write rules like: 'If the delivery was within 24 hours of the promised date, treat it as on-time.' When validators evaluate the contract, they apply both the code logic and their reasoning about language and evidence. This turns every ambiguous real-world scenario into something the network can credibly adjudicate.

contract.py
03 · GenVM

GenVM

GenVM is the sandboxed runtime that executes Intelligent Contracts. It runs on every validator node and provides a safe, controlled environment for mixing deterministic and non-deterministic computation. Deterministic operations (arithmetic, cryptographic verification, state reads) execute identically on every node. Non-deterministic operations (LLM calls, web fetches, timestamp reads) are allowed but logged. GenVM records not just the final answer but the reasoning path: which web sources were consulted, which LLM calls were made, and what the model returned. When validators disagree, they can inspect each other's reasoning and the network can trace where the divergence occurred. This transparency makes the appeals process meaningful: if a validator's reasoning was sloppy or biased, a larger set of peers will catch it.

GenVMcodeLLM / web
04 · Greyboxing

Greyboxing

Greyboxing is GenLayer's defense against adversarial inputs. The word is deliberate: it is not a black box (no transparency) and not a glass box (no protection). It is a grey box. If a single AI model is trusted to judge a contract, an attacker can craft a prompt injection attack: a carefully worded question or embedded instruction that tricks the model into giving a false answer. Greyboxing defeats this by requiring a diverse set of unknown models. Each validator runs a different LLM model, or the same model with different system prompts, different random seeds, different temperature settings, trained on different data. An attacker cannot know in advance which models will be selected, how they will be configured, or what reasoning path they will take. Even if an attack works on one model, it fails on the others. Diversity becomes security.

attackdiverse models
The Equivalence Principle

That single idea makes decentralized consensus on non-deterministic outcomes possible. Developers define what counts as equivalent for their contract; validators decide whether outputs match.

Decision Tree

A walkthrough of the appeals process, and how the validator set grows.

Key Insight

The design incentivizes early agreement. Because every dispute grows the validator set to 2n+1 (and could ultimately reach ~1,000 validators) appealing a correct answer is expensive and futile. Validators converge on correctness, and Schelling points emerge naturally.

End-to-End Flow

How a claim travels from submission to on-chain settlement, and what the clock looks like along the way. One journey, one timeline, from T+0 to finality.

  1. 01
    User submits contract with dispute
    T+0
  2. 02
    GenLayer receives and validates
    T+0
  3. 03
    5 random validators selected (first round)
    ~1 min
  4. 04
    Each runs the contract independently
    2-5 min
  5. 05
    Answers committed and revealed
    6-7 min
  6. 06
    Check for consensus (more than 50%)
    6-7 min
  7. 07
    If agreed: optimistically accepted, finalizes in minutes
    ~8 min
  8. 08
    If disputed: appeal grows the set to 2n+1 (5 → 11 → 23 → 47 …)
    appeal
  9. 09
    Larger set re-evaluates and re-checks consensus
    appeal
  10. 10
    Each further appeal roughly doubles the set
    appeal
  11. 11
    Worst case: escalates to the maximum, ~1,000 validators
    worst case
  12. 12
    Common case finalizes in ~30 min; full escalation takes ~3 hours
    ~30 min / ~3 h
  13. 13
    Answer recorded on-chain
    finality
  14. 14
    Contract executes and funds settle
    finality
Decision lifecycle~30 min to finality
  1. Submission
    T+0
    claim posted
  2. Validation
    2-5 min
    validators reason independently
  3. Consensus
    6-8 min
    more than 50% agree
  4. Appeal
    if disputed
    if disputed: set grows to 2n+1
  5. Finality
    ~30 min
    locked on-chain

Most decisions finalize at consensus in roughly 30 minutes. Disputes escalate through appeals, each appeal roughly doubling the set. Worst case, a full escalation to the maximum (~1,000 validators) takes about three hours.

Deep Dive

How validators reach consensus without coordination, even when answers differ.

Build

Deploy your first Intelligent Contract on GenLayer and resolve disputes that no other system can handle.