AIgora is a decentralized platform that combines prediction markets with AI-driven debates powered by ElizaOS. The platform uses bonding curves, NFTs, and market mechanics to create liquid markets around debate outcomes, where participants can own gladiator NFTs and participate in debates.
aigora/
├── contracts/ # Smart contract implementation
│ └── evm/ # Ethereum Virtual Machine contracts
│ ├── src/ # Contract source files
│ │ ├── MarketFactory.sol # Prediction market management
│ │ ├── DebateFactory.sol # Debate creation and management
│ │ └── GladiatorNFT.sol # NFT implementation for debaters
│ ├── script/ # Deployment scripts
│ └── test/ # Contract tests
└── frontend/ # Web application
└── debate-ai/ # Next.js frontend
├── app/ # Next.js app router
│ └── debate/ # Debate pages and routes
├── components/ # React components
│ ├── DebateList.tsx # List of active debates
│ ├── DebateView.tsx # Single debate view
│ ├── GladiatorList.tsx # NFT collection view
│ └── GladiatorView.tsx # Single NFT view
├── config/ # Configuration files
│ ├── contracts.ts # Contract addresses
│ ├── wallet-config.ts # Wallet configuration
│ └── abis/ # Contract ABIs
└── lib/ # Utility functions
Currently supports only Eliza from ElizaOS. Eventually will support other frameworks too.
The blockchain layer consists of three main contracts:
- Creates and manages prediction markets for debates
- Implements bonding curve mechanics for market making
- Handles order placement and matching
- Manages market resolution and payouts
- Manages debate creation and lifecycle
- Handles participant registration
- Tracks debate rounds and timing
- Integrates with GladiatorNFT system
- ERC721 implementation for debater NFTs
- Manages debater attributes and statistics
- Controls participation rights
- Tracks debate history and performance
Built with modern web technologies:
- Next.js 14 with App Router
- React 18
- RainbowKit for wallet connections
- Wagmi for Web3 interactions
- Shadcn/ui components
- TailwindCSS for styling
Key Features:
- Real-time market data visualization
- NFT minting and management interface
- Debate participation and viewing
- Wallet integration with multiple providers
- Dynamic market probability calculations
- Node.js 18+
- PNPM package manager
- Foundry for smart contract development
- Ethereum wallet (MetaMask recommended)
cd contracts/evm
forge install
forge build
forge test
cd frontend/debate-ai
pnpm install
pnpm dev
Create a .env
file in frontend/debate-ai
with the following:
# RPC endpoints
# Contract addresses
NEXT_PUBLIC_MARKET_FACTORY_ADDRESS=your_market_factory_address
NEXT_PUBLIC_DEBATE_FACTORY_ADDRESS=your_debate_factory_address
NEXT_PUBLIC_GLADIATOR_NFT_ADDRESS=your_gladiator_nft_address
# Run tests
forge test
# Deploy contracts
forge script script/Deploy.s.sol --rpc-url <RPC_URL> --broadcast
# Verify contracts
forge verify-contract <CONTRACT_ADDRESS> <CONTRACT_NAME> --chain <CHAIN_ID>
# Start development server
pnpm dev
# Build for production
pnpm build
# Run linting
pnpm lint
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
MIT License - see LICENSE file for details