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 🟣