Search projects, hackathons, sponsors and tech

    ← All projects

    VaultBreaker

    AI agent capability broker protecting private keys via Ledger seed & Hedera on-chain spend limits

    Demo

    About

    Vaultbreaker is a scoped-capability broker designed to solve the single biggest security threat in autonomous Web3 AI agents: raw private key exposure. Today, any AI agent executing autonomous micropayments for pay-per-call APIs or services either holds a raw private key in memory (allowing prompt injections or compromised agents to drain the wallet) or a static API key (exposing credentials with no spend limits). There is no standard pattern for giving an agent narrow, expiring, spend-limited, and non-exfiltratable payment authority. Vaultbreaker solves this by combining Ledger hardware seed protection with Hedera on-chain budget enforcement and tamper-evident audit logging: 1. DEVELOPER POLICY REGISTRATION: A developer registers a metered pay-per-call service (e.g., an AI inference endpoint) and defines a spend policy specifying maximum price per call, daily budget ceiling, and token time-to-live (TTL). 2. LEDGER-PROTECTED CAPABILITY ISSUANCE: When an agent requests authority for a task, the Vaultbreaker broker invokes the Ledger Key Ring CLI (`wallet-cli ring`) to encrypt the underlying settlement credential using Ledger seed-derived hardware protection. The broker issues a short-lived, scoped capability token to the agent. The agent NEVER sees or holds the raw private key at any point. 3. x402 METERED SERVICE EXECUTION: The agent presents its capability token + payment header to the x402-gated metered service. An x402 facilitator adapter validates the scope and remaining budget against the deployed smart contracts on Hedera Testnet (`CapabilityRegistry.sol`), decrementing the budget on-chain per call. 4. REAL-TIME ON-CHAIN REJECTION (THE DEMO MOMENT): If the agent attempts a call after its budget is exhausted, expired, or explicitly revoked, the transaction is rejected ON-CHAIN in real time. The raw credential was never exposed, proving that limits are cryptographically and on-chain enforced rather than just a UI promise. 5. HEDERA CONSENSUS SERVICE (HCS) AUDIT FEED: Every capability issuance, successful spend, on-chain rejection, and revocation event is written to a Hedera Consensus Service topic, producing an immutable, judge-legible audit trail rendered in real time on the frontend timeline.

    How it's made

    Vaultbreaker is built as a three-plane architecture spanning smart contracts, a hardware-secured broker backend, and a cybernetic Next.js frontend: 1. SETTLEMENT & ENFORCEMENT PLANE (Smart Contracts): Built with Solidity 0.8.20, Foundry, and OpenZeppelin Contracts. - `CapabilityRegistry.sol`: Deployed on Hedera Testnet (EVM Chain ID 296). Tracks capability policy hashes, remaining budget accounting, expiration timestamps, and revocation state. Reverts transactions on budget exhaustion (`InsufficientBudget`), expiry (`CapabilityExpired`), or revocation (`CapabilityRevokedError`). - `X402FacilitatorAdapter.sol`: Serves as the thin adapter between x402 payment callbacks and `CapabilityRegistry`, ensuring payment settlement occurs only if capability spend checks succeed. - Tested using a complete Foundry test suite (8/8 tests passing) covering time-warped expirations (`vm.warp`), budget exhaustion, and exact arithmetic. 2. ISSUANCE & HARDWARE ENCLAVE PLANE (Broker Backend): Built with Node.js, TypeScript, Express, Ethers.js v6, and Vitest. - Ledger Key Ring Integration: Integrates the Ledger Wallet CLI (`wallet-cli ring`) as the root of trust to encrypt underlying settlement credentials. Includes a seed-derived AES-256-GCM fallback keyring to guarantee zero credential exposure across all environments. - Policy Engine: Generates cryptographic policy hashes (`keccak256`) and signs scoped, short-lived JWT capability tokens for the agent. - Vitest Suite & E2E Runner: Includes 4/4 Vitest unit tests and an automated end-to-end integration test (`scripts/e2e-demo-test.ts`). 3. AUDIT PLANE (Hedera Consensus Service): Integrates `@hashgraph/sdk` to submit structured JSON audit events (`CAPABILITY_ISSUED`, `CAPABILITY_SPENT`, `CAPABILITY_REJECTED`, `CAPABILITY_REVOKED`) to a Hedera Consensus Service (HCS) topic. The backend auto-polls the Hedera Mirror Node REST API (`mirrornode.hedera.com`) to populate a live timeline with HashScan verification links. 4. FRONTEND & UX: Built with Next.js 16 (App Router + Turbopack), React 19, Tailwind CSS, and Lucide React. Features a Developer Console (policy registration & revocation), an Agent Terminal (simulated x402 micropayment runner with real-time budget gauges), a prominent "REJECTED ON-CHAIN IN REAL-TIME" Cyber-Alert modal for over-budget calls, and a live HCS Audit Feed timeline.