PolyPoll
Sentiment market for investing; Stake on speculative outcomes of community positions on any issue
Problem Statement
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 predictionsThis multi-token approach enables both crypto natives and traditional users (via PayPal integration) to participate seamlessly. 🏗️ Technical Architecture Smart Contract LayerSolidity 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 StackChrome 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 APIsStorage & Data LayerWalrus Protocol integration for decentralized storage of:Poll metadata and article references Historical prediction data User activity logs IPFS-compatible content addressingDevelopment & TestingHardhat development environment Base Sepolia testnet for staging Foundry for advanced testing and fuzzing Tenderly for transaction simulation🎮 How It WorksBrowse & 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 UsersOne-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 displayFor PublishersEngagement metrics on article predictions Reader sentiment analysis through stake data Integration potential via embeddable widgetsProtocol FeaturesDecentralized 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 & IntegrationsBase 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 CasesNews 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
Solution
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 StackChrome Extension (Frontend)Manifest V3: Built using the latest Chrome extension architecture for better performance and securityVanilla JavaScript + Webpack: Kept it lightweight without heavy frameworks - the entire content script is ~200KBethers.js: For blockchain interactions, dynamically loaded only when needed to minimize initial footprintReal-time WebSocket: Connected to Supabase for live poll updatesSmart Contracts (Blockchain Layer)Solidity 0.8.20: Deployed on Base Mainnet (Chain ID: 8453) for low-cost, high-speed transactionsTime-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)Backend (FastAPI)Python FastAPI: Async API handling with automatic OpenAPI documentationPydantic Models: Type-safe request/response validationJWT Authentication: Stateless auth with MetaMask signature verificationData LayerSupabase (PostgreSQL): Primary database for off-chain data and real-time subscriptionsWalrus Network: Decentralized storage for article content and poll metadata (IPFS alternative)Hybrid Storage Pattern: On-chain poll creation events + off-chain detailed dataAI IntegrationOpenAI GPT-4o: Generates cynic/optimist poll perspectives from article contentDual-Perspective Prompting: Custom prompt engineering for balanced, thought-provoking questionsThe Hacky & Notable PartsMetaMask Integration Without Web3 LibrariesWe 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();Content Script Injection MagicThe 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 }Dual Module System for ConfigChrome'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;Time-Based Multiplier AlgorithmOn-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) }Walrus Integration for Decentralized StorageInstead of storing article content on-chain (expensive!), we:Extract article content via Chrome extensionUpload to Walrus Network (decentralized storage)Store only the Walrus CID on-chainRetrieve content from Walrus when displaying pollsReal-time Updates via SupabaseWebSocket subscriptions for live bet updates without polling:supabase.channel('polls') .on('postgres_changes', { event: 'INSERT', schema: 'public', table: 'bets' }, handleNewBet) .subscribe();Partner Technology BenefitsBase Network (Coinbase L2)Why Base?: 100x cheaper than Ethereum mainnet, 2-second finalityIntegration: Native support in MetaMask, no custom RPC neededWalrus NetworkBenefit: Decentralized content storage without IPFS pinning complexityUse Case: Store full article text, images, and metadata permanentlySupabaseReal-time: WebSocket subscriptions eliminate pollingAuth: Row-level security with wallet addressesEdge Functions: Serverless AI prompt processingThe Secret SauceSmart Article DetectionOur 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 UXNo page redirects - everything happens in-contextAuto-detects MetaMask and prompts connection only when neededFallback to off-chain polls if user has no walletDeployment ArchitectureChrome Extension → Content Script ↓ ↓ MetaMask FastAPI Backend ↓ ↓ Base Mainnet ← → Supabase DB ↓ Walrus StoragePerformance OptimizationsLazy Loading: Contract service only loads when user interactsCaching: Config cached for 30 minutes, article data in sessionStorageBatch Operations: Multiple tool calls executed in parallelMinimal Footprint: 300KB total extension sizeWhat Makes It SpecialThe 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.
Hackathon
ETHGlobal New York 2025
2025