
Ledger Guard
Agent plans DeFi guards; you clear-sign on Ledger; Graph indexes; x402 keeper executes.
Demo
About
Ledger Guard (Ledger Guardian Agent) is hardware-bounded delegation for autonomous DeFi exits on Base. You clear-sign stop-loss, take-profit, LP bounds, or buy-dip policies on a Ledger OLED. The master key never leaves the device. A headless keeper loads secrets from Ledger Key Ring (not .env), discovers live policies from our Receipt Graph on The Graph, checks Pyth bands, and only attempts execution after paying HBAR through an x402-gated POST /trigger (Blocky402 on Hedera). Every fill emits an on-chain ExecutionReceipt that the subgraph indexes so Activity can prove trigger, Pyth spot, fill price, slippage, and compliance against the clear-signed caps. One Ledger kill switch revokes all policies and session authority. An Agent room helps draft and explain protections; the LLM never pays and never broadcasts fills. Autopilot / pay-on-hit is the consumer that settles x402 and drives the keeper Driver. Demo: https://ledger-gaurd.vercel.app/ — Start from Scratch (net-new) for ETHOnline 2026, aimed at Ledger + The Graph AI Use Case + Hedera x402.
How it's made
Contracts on Base (Foundry): GuardianPolicyManager (ERC-7579-style policy + session path), Pyth price verify, Uniswap v3 SwapRouter02 for fills. Users sign setGuardianPolicy / killSwitch via Device Management Kit (DMK) WebHID in packages/web and packages/hardware-test, with ERC-7730 clear-signing descriptors for OLED labels. Frontend is Next.js (packages/web): Protect journey, Protections explorer, Activity timeline, Agent SSE UI, and a site-wide fill congrats overlay fed by Receipt Graph and Base ExecutionReceipt logs. Indexing: custom Receipt Graph (policies, kills, executionReceipts) on Subgraph Studio / Gateway — load-bearing for Autopilot, not decoration. Subgraph MCP + @lga/graph-data compose Messari lending/DEX decisions for the Solver path. Keeper (packages/keeper, TypeScript): Key Ring decrypt → capability broker (read:graph, read:pyth, pay:trigger, execute:policy). Roles: Composer/Clerk/Solver (LLM), Payer + Autopilot pay-on-hit (x402), Driver executePolicy. Host returns 402 unpaid; consumer pays HBAR via Blocky402, then Hermes/Pyth VAAs + session key fill on Base. Payment audits land on-chain / HashScan for the Hedera story. Notable: POLL_MS=0 so unpaid polling cannot burn Graph quota; pay-on-hit settles once per policy id; Graph policy list cached with cooldown on 429; master key never in keeper process — Key Ring holds keeper secrets.