Polyledger brings hardware wallet security to prediction markets like Polymarket.
Trade Polymarket safely: AI agents propose, an AI council votes, your Ledger shows the market details before you sign !
AI agents propose trades. Before anything reaches your device, three AI agents who independently analyze the trade and vote on it. You see their reasoning and verdict in the web app to help you take a descision.
When you're ready to sign, your Ledger doesn't show raw hex data. Our custom Ledger device app displays the actual market info: the market question, whether you're buying or selling, the outcome, price per share, and total cost. This data is cryptographically verified fetched from multiple sources, validated by a Chainlink CRE oracle network, and signed before being sent to the device.
After you confirm on the Ledger, the order is submitted to Polymarket's CLOB and settled on Polygon. Your positions are tracked in a portfolio view where you can also sell.
No blind signing. No trusting a browser extension. The full context of your trade, verified and displayed on tamper-proof hardware.
Polyledger is built across four layers: a custom Ledger device app, a Chainlink CRE oracle, a web app, and an Express backend.
Ledger Device App: We forked the official Ledger Ethereum app (LedgerHQ/app-ethereum) and added a custom APDU command (Market Context Protocol). Before EIP-712 signing, the web app sends a TLV-encoded payload containing market metadata (name, side, outcome, price, shares, total) to the device. The payload is signed by a backend attester service, and the device verifies this signature against a hardcoded public key before displaying 6 human-readable screens. The standard raw EIP-712 fields are hidden when verified market context is available.
Chainlink CRE Oracle: A Chainlink Runtime Environment workflow acts as a decentralized oracle for Polymarket data. It runs a 4-step pipeline: dual-source fetch (Gamma API + CLOB API), DON-wide consensus (all nodes must agree on identical data), on-chain state read (avoid redundant writes), and delta write via EVMClient.writeReport(). The PolymarketOracle.sol smart contract on Sepolia stores verified market info and integrates a Chainlink USDC/USD price feed for depeg protection in bonus.
Web App: React 19 with TanStack Router and TanStack Query. Connects to Ledger devices via the Device Management Kit (DMK) over USB or Bluetooth. Features an AI council: three agents (Bull, Bear, Quant) analyze each trade via streamed Server-Sent Events and cast votes. The Polymarket flow includes order simulation (fresh price + tick size from CLOB), EIP-712 order construction with the correct Polymarket CTF Exchange domain and verifyingContract, and portfolio tracking via Polymarket's data API.
Backend: Express.js handling intent queue, wallet auth (personal_sign challenge/verify), Polymarket CLOB credential storage (L1 EIP-712 ClobAuth + L2 HMAC), a proxy for CLOB order submission (needed to avoid browser CORS and to inject the API key as owner + compute HMAC server-side), market context TLV signing, and a simulation endpoint that queries tick size from the CLOB API.
Polymarket Integration: Orders use the real Polymarket CTF Exchange EIP-712 domain with verifyingContract, support both standard and negRisk markets (different exchange contracts), handle tick-size rounding, and are submitted via the CLOB REST API with HMAC authentication. Token approvals cover three contracts: CTF Exchange, NegRisk CTF Exchange, and NegRisk Adapter.
The project builds on top of ledger-agent-intents, which provided the base intent queue and Ledger signing infrastructure for ERC-20 transfers.

