hackquest logo

r402

Proof-bound agent firewall for MetaMask Smart Accounts on Base: one ERC-7715 USDC budget, x402-bound payments, 1Shot relay, and on-chain ProofRegistry. Every agent spend tied to the exact request.

视频

项目图片 1
项目图片 2
项目图片 3
项目图片 4

技术栈

Next
React
Web3
Solidity
Node
Ethers

描述

Live App: https://r402-web.vercel.app

r402 Sentinel is a proof-bound agent firewall for MetaMask Smart Accounts on Base.

Most agent stacks give bots a hot wallet or a broad API key and hope for the best. r402 treats autonomy as a permission problem: the user grants one bounded ERC-7715 USDC budget, the system narrows it into child scopes (Payment, Execution, Proof), and every paid action is cryptographically bound to the exact plan, quote, and delegation that authorized it.

How it works

  1. Plan — Venice AI (Groq fallback) turns natural language into a minimum-authority execution plan with risk scoring.

  2. Grant — MetaMask Flask issues a periodic USDC permission delegated to the 1Shot relayer target on Base.

  3. Execute — x402 request binding → 1Shot estimate/send → ProofRegistry consume + anchor on Base.

  4. Revoke — Root permission revoked in MetaMask; all child agents stop immediately.

Core invariant: no child gets more authority than its parent; no payment can be detached from the request that authorized it. Replay, substitution, and over-broad scope are blocked before money moves.

Demo mode runs end-to-end with zero credentials for judges. Live mode supports real Flask grants, 1Shot mainnet relay, and on-chain proof artifacts.

Stack: Next.js 16 · MetaMask Smart Accounts Kit (ERC-7715/7710) · x402 · 1Shot · Venice · Foundry ProofRegistry on Base.

本次黑客松进展

# Day 1 — Core Architecture

- Monorepo scaffold: @r402/core, @r402/adapters, Next.js dashboard, Foundry contracts

- ExecutionPlan schema, risk policy, delegation tree, requestDigest binding, PII sanitizer

- ProofRegistry with consume-once + anchor (3/3 Foundry tests)

# Day 2 — Live Integrations

- Venice planner + risk agent + web search fallback chain

- MetaMask Flask ERC-7715 periodic USDC grant (Base Smart Account)

- 1Shot public relayer: getCapabilities → estimate7710Transaction → send7710Transaction

- x402 payment adapter + idempotency guard (409 REPLAY_BLOCKED)

- On-chain proof anchor via ANCHOR_PRIVATE_KEY

# Day 3 — Production Hardening (Live Path)

- Fixed empty 0x000… permission context (Flask + Smart Account + correct 1Shot grant target)

- Corrected 1Shot bundle format for periodic USDC enforcer (fee + work transfer legs)

- Removed mock/simulated fallbacks when live env is set

- Dashboard live checklist (Flask + USDC prerequisites), toast UX, BaseScan proof links

- Full docs pass: README, architecture, threat model, demo storyboard

- Repo cleanup: deduplicated helpers, tests/lint/build green

## Working Live Demo (Base Mainnet)

- Plan (Venice live) → Grant (Flask ERC-7715) → Execute (1Shot ~8s, 200 OK) → Proof anchored

- Replay blocked by design

- Grant can be revoked via MetaMask

# Submission Readiness

- Demo path: zero wallet / zero USDC required for judges

- Live path: recorded with MetaMask Flask 13.34+ on Base

- E2E spec + unit tests passing

融资状态

Not yet

队长
EEmin Karagöz
项目链接
部署生态
BaseBase
赛道
AIDeFiInfraDAO