A Polymarket-style trading interface connected to a live Solana devnet program.
- Market discovery with grid and table views (sparkline price charts in table rows)
- On-chain trading via LMSR -- buy/sell YES/NO shares with real wallet transactions
- LMSR price math mirrored in TypeScript to match the Rust program exactly
- Create market form that deploys new markets to Solana
- Portfolio page showing real token balances from on-chain data
- Bet slip (floating trade panel) for quick order entry
- IPFS image uploads via Pinata for market thumbnails
- Dark/light theme toggle
- Wallet adapter integration (Phantom, Solflare)
- Anchor client-side integration -- deserializing on-chain accounts, building transactions
- Porting fixed-point math (exp, ln, log-sum-exp) from Rust to TypeScript
- Solana wallet adapter patterns with React context
- Building responsive trading UIs with Recharts and Framer Motion
- Working with PDAs from the frontend (deriving addresses, passing to instructions)
Next.js 16, React 19, TypeScript, Tailwind CSS 4, Recharts, Framer Motion, @coral-xyz/anchor, @solana/wallet-adapter
pnpm install
pnpm dev| Variable | Description |
|---|---|
NEXT_PUBLIC_PINATA_JWT |
Pinata API key for IPFS uploads |
NEXT_PUBLIC_PINATA_GATEWAY |
Pinata gateway URL |
MIT