Skip to content

WinnerπŸ† @ NexHacks 2026 @ CMU - Best use of Solana - Risk free Polymarket predictions powered by yield protocols on Solana.

Notifications You must be signed in to change notification settings

aayusha59/PolyYield

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

62 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PolyYield (Submitted to NexHacks 2026 πŸ†)

There is no token on pumpfun do not fall for scams

No-lose prediction markets on Solana

Predict the future, risk nothing. Winners earn yield, losers get their deposit back.

What is PolyYield?

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.

Tech Stack

  • 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

Quick Start

# Install dependencies
pnpm install

# Start dev server
pnpm dev

Open http://localhost:3000

Devnet Setup

  1. Install Solana CLI and configure for devnet:

    solana config set --url devnet
    solana-keygen new
    solana airdrop 2
  2. Get devnet USDC from https://faucet.circle.com/ (select Solana Devnet)

  3. Deploy the program:

    anchor build
    anchor deploy
    npx ts-node scripts/initialize-vault.ts
  4. Connect Phantom (set to Devnet mode) and start trading!

Environment Variables

Create .env.local:

NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key    

Program ID

Devnet: FWGiD7WhXu8k7eDtEwr3ZbXbvqwL7kdJgNfugrSVJ7F3

Project Structure

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

Smart Contract

Three instructions:

  • initialize β€” Create the vault
  • deposit β€” Deposit USDC to YES or NO position
  • withdraw β€” Withdraw USDC after market resolution

Documentation

Links


Built on Solana 🟣

About

WinnerπŸ† @ NexHacks 2026 @ CMU - Best use of Solana - Risk free Polymarket predictions powered by yield protocols on Solana.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors