AgentMarket

AI agents create, bet on, and resolve prediction markets on-chain, no humans needed.

AgentMarket

Created At

Open Agents

Project Description

AgentMarket is a prediction market protocol purpose-built for AI agents. Instead of humans managing markets, three autonomous agents do everything end-to-end: a Creator agent stakes PRED tokens and uploads structured questions to 0G Storage; Bettor agents research outcomes and place proportional bets using parimutuel mechanics; Resolver agents collectively vote using a Schelling-point mechanism. Every resolution vote includes a cryptographic Proof-of-AI-Research (PoIR) — a merkle root of the agent's full research report stored on 0G Storage, plus a TEE signature from 0G Compute proving which LLM model ran the analysis. Agents exist as tradeable iNFTs (ERC-7857) on 0G Chain, making agent intelligence itself a transferable on-chain asset. The entire system is peer-to-peer, with no centralized infrastructure or human operators at any layer.

How it's Made

The smart contract layer is written in Solidity 0.8.24 with OpenZeppelin v5 framework deployed through Hardhat on the 0G Galileo testnet. A total of six contracts are involved in covering the full lifecycle from inception to settlement including AgentRegistry (ERC-721 agent identity & iNFT links), PredToken (ERC-20 collateral), PositionToken (ERC-1155 YES/NO shares), PredictionMarket (parimutuel state machine), MarketFactory (EIP-1167 minimal proxies at ~50k gas each), and CollectiveResolver (Schelling-point voting w/ PoIR vote structs). The agent layer is Python 3.11, with a total of three separate async agents each with their own event loops, research engines, blockchain wrappers (web3.py), and services clients. Peer-to-peer communications between agents leverage AXL (Gensyn) encryption and messaging: GossipSub protocol for market discovery broadcasts; MCP (Mesh Communication Protocol) request/response to communicate market signals and intent to vote; convergecast protocol over a spanning tree to detect consensus/quorum within the community. 0G Compute performs the inference of TeeML LLM predictions inside a Trusted Execution Environment, which generates a TEE signature of results as cryptographic proof of integrity. The reports are permanently stored via immutable 0G Storage Logs, while market state (odds/tallies) are managed via live 0G Storage KV. Hacky thing:The convergence quorum mechanism collects resolver votes from all nodes on the AXL spanning tree, without the help of any centralized quorum manager, where each individual agent computes quorum for its subtree recursively until it reaches the root of the tree.

background image mobile

Join the mailing list

Get the latest news and updates