A platform for leveraged trading on Polymarket prediction markets with SOL bridging to Polygon.
- Connect Polymarket account to view positions
- Bridge SOL from Solana to USDC on Polygon
- Analyze Polymarket markets with PLV scoring
- View real-time market data from Polymarket Gamma API
- Track your positions and portfolio
- Node.js 18+ installed
- A Polymarket API key
- Install dependencies:
npm install- Create
.env.localfile in the project root:
POLYMARKET_API_KEY=your_api_key_here
# Optional: Custom Solana RPC endpoint (recommended for production)
# NEXT_PUBLIC_SOLANA_RPC_URL=https://api.devnet.solana.com
# For mainnet, use a service like Helius, QuickNode, or Alchemy- Run the development server:
npm run dev/api/polymarket/parse-url- Parse Polymarket URLs/api/polymarket/market- Fetch individual market data/api/polymarket/markets- List active markets/api/polymarket/positions- Fetch user positions from CLOB/api/bridge/quote- Get bridge quote for SOL to Polygon/api/bridge/sol-to-polygon- Initiate bridge transaction
- Markets Page: Browse and analyze active Polymarket markets
- Portfolio Page: View your Polymarket positions
- Settings Page: Bridge SOL to Polygon for trading
PLV (Price, Liquidity, Volume) score is calculated using:
- Price Score (30%): Based on distance from 0.5 (more directional = higher score)
- Volume Score (30%): Normalized to $1M cap
- Liquidity Score (40%): Normalized to $100k cap
Formula:
priceScore = min(|price - 0.5| * 2 * 100, 100)
volumeScore = min((volume / 1,000,000) * 100, 100)
liquidityScore = min((liquidity / 100,000) * 100, 100)
plvScore = round(priceScore * 0.3 + volumeScore * 0.3 + liquidityScore * 0.4)
- User enters SOL amount to deposit
- System fetches real-time bridge quote from Wormhole
- User signs Solana transaction in wallet
- Transaction submitted to Wormhole guardian network
- VAA attestation generated (10-15 minutes)
- USDC redeemable on Polygon for Polymarket trading
See BRIDGE_IMPLEMENTATION.md for technical details.
- Next.js 16 (App Router)
- React 19
- TypeScript
- Solana Wallet Adapter
- Polymarket Gamma API
- TailwindCSS
- shadcn/ui components
MIT