No-lose prediction markets on Solana
Predict the future, risk nothing. Winners earn yield, losers get their deposit back.
PolyYield lets you bet on real-world events (politics, crypto, sports, etc.) without risking your principal. Your USDC is deposited into a Solana vault; if you win, you earn yield from the losing pool. If you lose, you get your full deposit back.
- Frontend: Next.js 16, React 19, TypeScript, Tailwind CSS, Three.js
- Blockchain: Solana, Anchor 0.30.1 (Rust)
- Database: Supabase // PostgreSQL
- Markets: Polymarket API
- Deployment: Vercel
# Install dependencies
pnpm install
# Start dev server
pnpm dev-
Install Solana CLI and configure for devnet:
solana config set --url devnet solana-keygen new solana airdrop 2 -
Get devnet USDC from https://faucet.circle.com/ (select Solana Devnet)
-
Deploy the program:
anchor build anchor deploy npx ts-node scripts/initialize-vault.ts
-
Connect Phantom (set to Devnet mode) and start trading!
Create .env.local:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key Devnet: FWGiD7WhXu8k7eDtEwr3ZbXbvqwL7kdJgNfugrSVJ7F3
polyield/
βββ app/ # Next.js pages
βββ components/ # React components
βββ hooks/ # Custom hooks (deposit, markets, positions)
βββ lib/
β βββ solana/ # Blockchain integration
β βββ database/ # Supabase service
β βββ api/ # Polymarket API
βββ programs/ # Anchor smart contract
β βββ polyield_vault/
βββ scripts/ # Deployment scripts
Three instructions:
initializeβ Create the vaultdepositβ Deposit USDC to YES or NO positionwithdrawβ Withdraw USDC after market resolution
- QUICKSTART.md β Step-by-step testing guide
- DEVNET_SETUP.md β Detailed Solana setup
- SUPABASE_SETUP.md β Database configuration
Built on Solana π£