PolyPoll

Sentiment market for investing; Stake on speculative outcomes of community positions on any issue

PolyPoll

Created At

ETHGlobal New York 2025

Project Description

PolyPoll innovates on prediction market models by transforming online news consumption into an interactive opinion staking experience. Leveraging our intelligent browser extension, opinion makers can craft contextual polls from any article, with custom variations for tailored sentiment. In doing so, creators stake their convictions in tokens with real value while earning leveraged rewards for accurate predictions. Once posted, other contributors can discover, follow, and stake their conviction in the poll options, therein helping to realize one of the outcomes the original creator staked for or against, and setting both up to receive yield with multipliers on the staked value.

Our custom Chrome extension uses advanced LLMs to analyze news articles from across the internet in real-time and register observable opinion gaps. Creators then utilize the intuitive interface to generate polls around these gaps, lock assets into their prediction of the opinion spread in an open market, and post it for public feedback via investment cycles.

In Exhaustive Detail:: when readers visit any news article, our smart extension does the following:

Extracts key claims and predictions from the content Generates 2-5 balanced poll options Creates engaging questions that capture the article's essence Ensures options are mutually exclusive and comprehensive.

This eliminates the friction of manual poll creation while maintaining high-quality, relevant prediction markets.

šŸ’° Multi-Currency Support Built on Base Ethereum L2 for minimal gas costs (~$0.10-0.25 per transaction), PolyPoll supports multiple payment options:

ETH - Native Base currency for crypto-native users USDC - Circle's stablecoin for stable value betting PYUSD - PayPal's USD stablecoin, bringing Web2 users into Web3 cbETH - Coinbase Wrapped Staked ETH for yield-bearing predictions

This multi-token approach enables both crypto natives and traditional users (via PayPal integration) to participate seamlessly. šŸ—ļø Technical Architecture Smart Contract Layer

Solidity 0.8.19 smart contracts deployed on Base Time-weighted betting system - Early participants receive up to 1.5x multiplier One vote per wallet enforcement via on-chain mappings Flexible duration - 24 to 96-hour resolution periods Automated resolution with tie-breaking mechanisms OpenZeppelin security standards (ReentrancyGuard, Pausable, SafeERC20)

Frontend Stack

Chrome Extension with Web3 injection React components for dynamic UI ethers.js for blockchain interactions MetaMask integration for secure wallet connection AI-powered poll generation via LLM APIs

Storage & Data Layer

Walrus Protocol integration for decentralized storage of:

Poll metadata and article references Historical prediction data User activity logs IPFS-compatible content addressing

Development & Testing

Hardhat development environment Base Sepolia testnet for staging Foundry for advanced testing and fuzzing Tenderly for transaction simulation

šŸŽ® How It Works

Browse & Discover: Visit any news article with the extension installed AI Generation: Click the Polly parrot icon to generate an AI poll instantly Stake Opinion: Select your prediction and stake $1-$100 in your preferred currency Time Bonus: Early stakers receive bonus multipliers (1.5x for first 10% of duration) Resolution: After 24-96 hours, the pool distributes to correct predictors Claim Rewards: Winners claim proportional rewards minus 2.5% platform fee

🌟 Key Features For Users

One-click poll generation from any article Multi-currency flexibility (ETH, USDC, PYUSD, cbETH) Time-based incentives rewarding early conviction Low barriers - Minimum stake of just $1 Transparent odds - Real-time pool distribution display

For Publishers

Engagement metrics on article predictions Reader sentiment analysis through stake data Integration potential via embeddable widgets

Protocol Features

Decentralized resolution - No central authority needed Sybil resistance - One vote per wallet enforced on-chain Emergency safeguards - Pausable contracts, refund mechanisms Creator rewards - 0.5% incentive for poll creators Batch operations - Claim from multiple polls efficiently

šŸ”® Vision PolyPoll bridges the gap between content consumption and financial conviction, creating a new paradigm where:

Opinions have measurable value Information quality improves through skin-in-the-game mechanics Web2 users transition to Web3 via familiar payment rails (PayPal/PYUSD) Publishers gain deeper insights into reader convictions

šŸš€ Current Status

āœ… Smart contracts deployed on Base Ethereum āœ… Chrome extension with AI integration live āœ… Support for ETH, USDC, PYUSD, cbETH āœ… Walrus decentralized storage integration āœ… One-vote-per-wallet enforcement āœ… Time-weighted reward system šŸ”„ Beta testing with select news sites

šŸ¤ Partnerships & Integrations

Base Ethereum - L2 scaling solution by Coinbase PayPal - PYUSD stablecoin integration Circle - USDC stablecoin support Walrus Protocol - Decentralized storage infrastructure OpenAI/Anthropic - LLM providers for poll generation

šŸŽÆ Use Cases

News Predictions: Will this policy pass? Will the merger complete? Market Sentiment: Bullish or bearish on announced earnings? Event Outcomes: Election results, sports events, award shows Tech Launches: Will the product succeed? Feature adoption rates? Social Trends: Viral content predictions, cultural shifts

How it's Made

https://pollypoll-art-bets.vercel.app/ (front end) | https://poly-poll.onrender.com/docs (back-end) | https://basescan.org/address/0x0a431f6851f4f724df4024cb5415bbaedc7869b4#code (smart contract)

PolyPoll isn't just another dApp - it's Web3 that meets you where you already are. No special websites, no leaving your news reading flow. Just click Polly the parrot, place your bet, and continue reading. We've essentially turned the entire internet into a prediction market platform.

PolyPoll transforms any opinion piece into an interactive sentiment gameboard using the power of Web3 and LLM's!

Core Technologies Stack

  1. Chrome Extension (Frontend)
  • Manifest V3: Built using the latest Chrome extension architecture for better performance and security
  • Vanilla JavaScript + Webpack: Kept it lightweight without heavy frameworks - the entire content script is ~200KB
  • ethers.js: For blockchain interactions, dynamically loaded only when needed to minimize initial footprint
  • Real-time WebSocket: Connected to Supabase for live poll updates
  1. Smart Contracts (Blockchain Layer)
  • Solidity 0.8.20: Deployed on Base Mainnet (Chain ID: 8453) for low-cost, high-speed transactions
  • Time-Weighted Betting System: Custom multiplier algorithm that rewards early participants (10x → 1x over poll duration)
  • Dual Contract Architecture:
    • PollyPoll.sol: Main ETH-based prediction market ( Multi-token support (USDC, PYUSD,ETH on Base)
  1. Backend (FastAPI)
  • Python FastAPI: Async API handling with automatic OpenAPI documentation
  • Pydantic Models: Type-safe request/response validation
  • JWT Authentication: Stateless auth with MetaMask signature verification
  1. Data Layer
  • Supabase (PostgreSQL): Primary database for off-chain data and real-time subscriptions
  • Walrus Network: Decentralized storage for article content and poll metadata (IPFS alternative)
  • Hybrid Storage Pattern: On-chain poll creation events + off-chain detailed data
  1. AI Integration
  • OpenAI GPT-4o: Generates cynic/optimist poll perspectives from article content

  • Dual-Perspective Prompting: Custom prompt engineering for balanced, thought-provoking questions

The Hacky & Notable Parts

  1. MetaMask Integration Without Web3 Libraries

We hit bundle size issues with traditional Web3 libraries in the extension context. Solution? Created SimpleContractService.js that directly interfaces with window.ethereum:

// Direct provider usage instead of heavy libraries const provider = new ethers.providers.Web3Provider(window.ethereum); const signer = provider.getSigner();

  1. Content Script Injection Magic

The Chrome extension dynamically injects Polly (our parrot mascot) into 200+ news sites using site-specific DOM selectors:

const extractors = { 'cnn.com': { article: 'article.article__content', ... }, 'bbc.com': { article: 'main[role="main"] article', ... }, // ... 200+ site configurations }

  1. Dual Module System for Config

Chrome's service worker (ES6 modules) vs content script (IIFE) required a clever dual-export pattern:

// IIFE for browser + ES6 exports for service worker (function(global) { /* config */ })(globalThis); export const loadConfig = globalThis.PolyPollConfig?.loadConfig;

  1. Time-Based Multiplier Algorithm

On-chain calculation for betting rewards that decreases linearly:

function getMultiplier(uint256 pollId) public view returns (uint256) { uint256 elapsed = block.timestamp - poll.startTime; uint256 progress = (elapsed * 100) / poll.duration; return 1000 - (progress * 9); // 10x → 1x (in basis points) }

  1. Walrus Integration for Decentralized Storage

Instead of storing article content on-chain (expensive!), we:

  1. Extract article content via Chrome extension

  2. Upload to Walrus Network (decentralized storage)

  3. Store only the Walrus CID on-chain

  4. Retrieve content from Walrus when displaying polls

  5. Real-time Updates via Supabase

WebSocket subscriptions for live bet updates without polling:

supabase.channel('polls') .on('postgres_changes', { event: 'INSERT', schema: 'public', table: 'bets' }, handleNewBet) .subscribe();

Partner Technology Benefits

Base Network (Coinbase L2)

  • Why Base?: 100x cheaper than Ethereum mainnet, 2-second finality
  • Integration: Native support in MetaMask, no custom RPC needed

Walrus Network

  • Benefit: Decentralized content storage without IPFS pinning complexity
  • Use Case: Store full article text, images, and metadata permanently

Supabase

  • Real-time: WebSocket subscriptions eliminate polling
  • Auth: Row-level security with wallet addresses
  • Edge Functions: Serverless AI prompt processing

The Secret Sauce

Smart Article Detection

Our extension uses 15+ indicators to detect articles across any news site:

  • Semantic HTML (<article>, role="article")
  • Meta tags (og:type="article")
  • URL patterns (/2024/12/...)
  • Content structure (headlines, paragraphs, authors)

Seamless Web3 UX

  • No page redirects - everything happens in-context
  • Auto-detects MetaMask and prompts connection only when needed
  • Fallback to off-chain polls if user has no wallet

Deployment Architecture

Chrome Extension → Content Script ↓ ↓ MetaMask FastAPI Backend ↓ ↓ Base Mainnet ← → Supabase DB ↓ Walrus Storage

Performance Optimizations

  1. Lazy Loading: Contract service only loads when user interacts
  2. Caching: Config cached for 30 minutes, article data in sessionStorage
  3. Batch Operations: Multiple tool calls executed in parallel
  4. Minimal Footprint: 300KB total extension size

What Makes It Special

The combination of Chrome extension (for seamless UX), Base network (for affordable transactions), Walrus (for decentralized storage), and Supabase (for real-time updates) creates a hybrid architecture that takes the best of Web2 and Web3 without the typical friction points.

background image mobile

Join the mailing list

Get the latest news and updates