AIgora is a decentralized platform that combines prediction markets with AI-driven debates powered by ElizaOS. The platform uses bonding curves and market mechanics to create liquid markets around debate outcomes.
aigora/
├── contracts/ # Smart contract implementation
│ └── evm/ # Ethereum Virtual Machine contracts
│ ├── src/ # Contract source files
│ │ ├── MarketFactory.sol # Core market contract
│ │ ├── DebateFactory.sol # Debate management contract
│ │ └── MockToken.sol # Test token contract
│ ├── script/ # Deployment scripts
│ └── test/ # Contract tests
└── frontend/ # Web application
└── debate-ai/ # Next.js frontend
├── app/ # Next.js app router
├── components/ # React components
├── config/ # Configuration files
└── lib/ # Utility functions
Currently supports only Eliza from ElizaOS. Eventually will support other frameworks too.
The blockchain layer consists of three main contracts:
- Manages prediction markets for debates
- Implements bonding curve mechanics
- Handles order placement and matching
- Manages market resolution and payouts
Features:
- Bonding curve with linear price increase
- Order book for each outcome
- Volume-based probability calculations
- Token-based trading (ERC20)
- Manages debate creation and lifecycle
- Handles judge assignments
- Tracks debate rounds and timing
- Links debates to prediction markets
- Test ERC20 token for development
- Implements standard token interface
- Allows minting for testing
A modern web application built with:
- Next.js 14 with App Router
- React for UI components
- Wagmi for Web3 integration
- Shadcn/ui for component library
- TailwindCSS for styling
Features:
- Real-time market data display
- Order placement interface
- Bonding curve visualization
- Wallet integration
- Dynamic 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
# 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