← Back to home

mcg

AI-powered NFT prediction markets with autonomous agents. Bet on floor prices, get AI analysis.

Problem Statement

mcg.fun is a decentralized prediction market for NFT floor price outcomes. Traders buy and sell ERC‑1155 YES/NO shares priced by an LMSR automated market maker, with time‑locked, on‑chain resolution and ETH redemption for winners. A real‑time indexer powers market discovery, positions, and analytics, while a modern React frontend delivers a smooth, wallet‑first experience. Optional autonomous AI agents provide continuous market analysis, automated resolution, and personalized portfolio guidance—without a bespoke backend.What you can do with mcg.fun:Speculate on whether NFT floors will reach specific targetsHedge collection exposure (downside or upside) with fungible sharesRely on transparent, on‑chain mechanics and redeemable outcomesBenefit from AI‑driven analysis and automated, trust‑minimized resolution

Solution

Layer 1: Smart Contracts (On‑chain Logic)Tech Stack: Solidity ^0.8.20, Hardhat, OpenZeppelinResponsibilities:ERC‑1155 YES/NO shares for fungible, gas‑efficient positionsLMSR AMM for continuous, deterministic pricing and instant liquidityTime‑locked resolution and ETH redemption for winnersNotable choices:Factory pattern: each market is a distinct contract for isolation and scalabilityFixed‑point math for LMSR logarithms and stable pricingDeployed locally and on Sepolia in testingLayer 2: Indexer (Real‑time Data Processing)Tech Stack: Envio HyperIndex, TypeScript, GraphQLResponsibilities:Sub‑second event ingestion for markets, trades, and redemptionsDerived entities for positions, trade history, and global statsGraphQL API consumed by the frontendNotable choices:Dynamic contract discovery from factory eventsImmutable updates via spread patterns on read‑only entitiesLayer 3: Frontend (User Interface)Tech Stack: React 18, TypeScript, Vite, Tailwind, shadcn/ui, Wagmi v2, Viem, RainbowKit, TanStack Query, OpenSea APIResponsibilities:Wallet connection, market creation, and trading UX with slippage protectionPortfolio insights and responsive UICollection discovery with OpenSea floor price contextLayer 4: AI Agents (ASI Alliance)Tech Stack: Fetch.ai uAgents, SingularityNET MeTTa, Agentverse, ASI:One chat protocolThe 4 Agents:Market Analyst: Continuous floor‑price analysis and recommendations (MeTTa‑guided)Resolver: Automated, scheduled market settlement and on‑chain callsPortfolio Advisor: Personalized, risk‑aware guidance on positions and actionsOracle: Multi‑source price verification with outlier resistance and confidence scoringSecurity & ReliabilityOpenZeppelin primitives and established patternsTime‑locked resolution; slippage protection in tradingTransparent, immutable mechanics; audit before mainnet deployment

Hackathon

ETHOnline 2025

2025

Contributors