Insider

It's a Extension, to place trades on Polymarket directly from your Twitter Feed!

Insider

Created At

HackMoney 2026

Project Description

Insider is a Chrome extension that brings Polymarket prediction markets directly into the Twitter/X experience. When users scroll through their feed and encounter tweets containing Polymarket links, the extension automatically detects them and injects a fully interactive trading card right into the tweet itself—no need to leave the social media experience.

The extension enables users to view real-time market prices with animated rolling digit displays, place buy and sell orders using MetaMask wallet integration (with EIP-712 typed data signing), manage their entire portfolio through a sleek popup interface, and even redeem winnings from resolved markets directly from the extension without visiting Polymarket.

A key innovation is the "Agentic Finance" pattern: users often don't have USDC.e (Polymarket's trading currency) ready in their wallets. Insider solves this by integrating Uniswap v4 on Polygon, allowing users to swap any supported token (WPOL, WETH, DAI, USDT, native USDC) directly to USDC.e without leaving the trading flow. The swap modal handles Permit2 approvals and Universal Router execution seamlessly.

The architecture includes a backend server that handles Builder authentication for Polymarket's CLOB API, enabling order attribution while keeping the user's trading experience gasless for order placement. Real-time price updates stream through WebSocket connections, ensuring traders always see the latest odds.

How it's Made

Frontend (Chrome Extension):

Built with React 18 + TypeScript + Vite using a monorepo structure with pnpm workspaces Content scripts use MutationObserver to detect Polymarket URLs in tweets and inject React components into Twitter's DOM Custom Ethereum Bridge pattern: since content scripts run in an isolated world without access to window.ethereum, we inject a web-accessible script that communicates via postMessage to interact with MetaMask EIP-712 typed data signing for gasless order placement—orders are signed client-side and submitted to Polymarket's CLOB Real-time prices via WebSocket subscription to Polymarket's market data feed, with automatic reconnection and heartbeat management Animated price displays using CSS transforms for rolling digit effects Uniswap v4 Integration (Hacky & Notable!):

Integrated Uniswap v4's new architecture on Polygon—using the V4Planner and RoutePlanner from @uniswap/v4-sdk and @uniswap/universal-router-sdk The swap flow: Token → Permit2 approval → Universal Router approval → V4_SWAP command execution Quotes fetched via eth_call to the Quoter contract, trying multiple fee tiers (0.01%, 0.05%, 0.3%, 1%) to find the best rate All contract interactions happen via the bridge, encoding ABI calls manually and sending through MetaMask Backend (Express.js Server):

Handles Builder API authentication using HMAC-SHA256 signatures via @polymarket/builder-signing-sdk Acts as a secure proxy—the extension sends L2 auth headers, the server adds Builder headers, then forwards to Polymarket CLOB Remote signing endpoint for gasless operations Smart Contract Interactions:

CTF Contract (0x4D97DCd97eC945f40cF65F87097ACe5EA0476045): Reading balances, approvals, redeeming positions CTF Exchange contracts for order execution Direct redeemPositions calls for claiming resolved market winnings

background image mobile

Join the mailing list

Get the latest news and updates

Insider | ETHGlobal