Inspiration

Every day, millions of people scroll through Twitter making bold predictions:
"Bitcoin will hit $100k by end of year!"
"AGI will be achieved by 2025!"
"Trump will win the election!"

But talk is cheap. What if you could put your money where your mouth is — directly from Twitter?

Prediction markets like Polymarket have exploded, with over $1B+ in volume. But there’s friction: you see a claim on Twitter, leave the app, navigate to Polymarket, find the market, connect your wallet, then bet. That’s 5+ steps — most people give up.

TruthBlink removes that friction.
We bring prediction markets to where conversations already happen — your Twitter feed.

What it does

TruthBlink is a Chrome extension that:

• Scans tweets for bet-worthy claims using AI
• Matches tweet text to live Polymarket markets
• Injects a “Bet” button directly into the tweet’s action bar
• Shows live Polymarket odds on hover
• Opens a Solana Blink for one-click betting with USDC

The entire flow from seeing a tweet → placing a bet takes under 10 seconds.

How we built it

Architecture

Twitter Feed → Chrome Extension → AI Matching → Solana Blink → Smart Contract

Frontend (Chrome Extension)

• Built with Plasmo (React-based)
• Uses MutationObserver for real-time tweet detection
• Injects React components directly into Twitter’s DOM
• Styled to blend seamlessly with Twitter’s UI

Backend (Next.js API)

/api/search-market — tweet-to-market matching using Gemini AI
/api/actions/bet — implements Solana Actions spec for Blinks
• Fetches real-time odds via Polymarket’s Gamma API

Smart Contract (Anchor / Rust)

• Deployed to Solana Devnet: BMLPwQE7THXBWM72ihnEJ63mjvw2Bmg7Ert2oXbpj9sX
https://explorer.solana.com/address/BMLPwQE7THXBWM72ihnEJ63mjvw2Bmg7Ert2oXbpj9sX?cluster=devnet • Handles USDC escrow, bet tracking, proportional payouts
• Uses PDAs for market and user bet accounts

Key Integrations

Polymarket API — live odds and market data
Solana Actions / Blinks — one-click transactions
Google Gemini — semantic tweet-to-market matching
SPL Token — USDC handling

Challenges we ran into

1. Ad Blockers Blocking Localhost

Ad blockers (uBlock, Ghostery) block requests to localhost from content scripts.
We fixed this using Cloudflare Tunnels to expose a public HTTPS URL during development.

2. Twitter’s Dynamic DOM

Twitter lazy-loads and constantly mutates the DOM.
We combined MutationObserver and periodic rescanning to reliably detect all tweets.

3. Anchor Version Compatibility

Anchor 0.30 changed bump syntax — ctx.bumps.get("market") no longer works.
We updated everything to ctx.bumps.market to compile successfully.

4. Cross-Chain Data Flow

Polymarket runs on Polygon (EVM) while we settle bets on Solana.
We built a custom abstraction layer to mirror Polymarket markets onto Solana.

Accomplishments that we're proud of

• First integration of Solana Blinks + Polymarket + Twitter
• Achieved sub-10-second betting UX
• AI-powered market matching using Gemini
• Full Anchor smart contract with escrow and payouts
• Chrome extension UI that blends natively with Twitter

What we learned

• Solana Actions and Blinks enable blockchain interactions directly inside web platforms
• Plasmo simplifies Chrome extension development
• Cloudflare Tunnels solve localhost blocking issues
• AI + prediction markets unlock new ways to analyze claims

What's next for TruthBlink

• Deploy to Solana Mainnet with real USDC
• Trending markets view inside the extension
• Push notifications when markets resolve
• Leaderboard for top bettors
• Expand to Reddit, Discord, and YouTube comments
• Build a mobile app with Blink-enabled wallets

Built With

Share this project:

Updates