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 targets
 
- Hedge collection exposure (downside or upside) with fungible shares
 
- Rely on transparent, on‑chain mechanics and redeemable outcomes
 
- Benefit from AI‑driven analysis and automated, trust‑minimized resolution
 
Layer 1: Smart Contracts (On‑chain Logic)
- Tech Stack: Solidity ^0.8.20, Hardhat, OpenZeppelin
 
- Responsibilities:
- ERC‑1155 YES/NO shares for fungible, gas‑efficient positions
 
- LMSR AMM for continuous, deterministic pricing and instant liquidity
 
- Time‑locked resolution and ETH redemption for winners
 
 
- Notable choices:
- Factory pattern: each market is a distinct contract for isolation and scalability
 
- Fixed‑point math for LMSR logarithms and stable pricing
 
- Deployed locally and on Sepolia in testing
 
 
Layer 2: Indexer (Real‑time Data Processing)
- Tech Stack: Envio HyperIndex, TypeScript, GraphQL
 
- Responsibilities:
- Sub‑second event ingestion for markets, trades, and redemptions
 
- Derived entities for positions, trade history, and global stats
 
- GraphQL API consumed by the frontend
 
 
- Notable choices:
- Dynamic contract discovery from factory events
 
- Immutable updates via spread patterns on read‑only entities
 
 
Layer 3: Frontend (User Interface)
- Tech Stack: React 18, TypeScript, Vite, Tailwind, shadcn/ui, Wagmi v2, Viem, RainbowKit, TanStack Query, OpenSea API
 
- Responsibilities:
- Wallet connection, market creation, and trading UX with slippage protection
 
- Portfolio insights and responsive UI
 
- Collection discovery with OpenSea floor price context
 
 
Layer 4: AI Agents (ASI Alliance)
- Tech Stack: Fetch.ai uAgents, SingularityNET MeTTa, Agentverse, ASI:One chat protocol
 
- The 4 Agents:
- Market Analyst: Continuous floor‑price analysis and recommendations (MeTTa‑guided)
 
- Resolver: Automated, scheduled market settlement and on‑chain calls
 
- Portfolio Advisor: Personalized, risk‑aware guidance on positions and actions
 
- Oracle: Multi‑source price verification with outlier resistance and confidence scoring
 
 
Security & Reliability
- OpenZeppelin primitives and established patterns
 
- Time‑locked resolution; slippage protection in trading
 
- Transparent, immutable mechanics; audit before mainnet deployment