RageQuit Escrow is a smart-contract payment control layer for AI agents. Instead of letting an agent send irreversible payments directly, the agent queues a payout into escrow, the human operator gets a veto window, and the payment executes only if the human does nothing.
The core idea is simple: safer agentic payments need revocable execution, not just better prompting.
Autonomous agents can make correct payment decisions most of the time and still be dangerous at the margin.
Common failure modes:
- the agent pays the wrong recipient
- the payment amount is valid in format but wrong in context
- a malicious or suspicious instruction pressures the agent into urgency
- the user notices too late, after funds are already gone
RageQuit Escrow addresses that by turning every payout into a pending claim with an explicit human override period enforced onchain.
The system splits payment execution into two phases:
- The agent prepares and queues a payment through
RageQuitEscrow. - The human can veto during the veto window, or let the payment execute after timeout.
Supporting layers around that core:
- private risk scoring before queueing
- Telegram notifications for queued payments
- a dashboard for visibility and veto control
- structured agent artifacts and audit logs
- token-settlement and swap-backed funding support
- optional Celo, ENS, Self, and payment-rail metadata
contracts/contracts/RageQuitEscrow.sol
- authorized agent can queue a payment
- owner can veto during the active window
- anyone or a keeper can execute after timeout
- supports native settlement and ERC-20 settlement
- stores
intentHashandfundingReferencefor auditability - emits structured decision events for queue, veto, and execute
contracts/scripts/agentRunner.js
- turns a task into a payment intent
- runs deterministic local reasoning or OpenAI-backed reasoning
- runs local or Venice-backed private risk checks
- supports direct token funding or swap-backed token funding
- writes run logs to
contracts/runs/<network>.json
contracts/scripts/telegramWatcher.js
- watches
PaymentQueuedevents - sends operator alerts to Telegram
- now includes payment-rail and identity labeling metadata when configured
Telegram is the operator notification channel used by the project. There is no separate mobile notification implementation in this repo.
frontend/
- Next.js operator console
- wallet connect and owner-gated veto action
- pending payment feed
- agent identity and audit panel
- supports
localhost,sepolia, andalfajores
contracts/scripts/generateAgentArtifacts.js
- generates
agent.json - generates
agent_log.json - includes rail metadata, ENS labels, and Self verification metadata when configured
- publishes artifacts to repo root and
frontend/public/
contracts/Hardhat workspace for contracts, scripts, deployments, and testsfrontend/Next.js dashboardagent.jsongenerated agent registration artifactagent_log.jsongenerated audit artifact
- Human-vetoed escrow payments
- Native and ERC-20 settlement
- Direct funding and swap-backed funding
- Localhost, Sepolia, and Celo Alfajores support
- Telegram notifications
- Private risk gate with local or Venice mode
- MetaMask Smart Account and delegation support
- ERC-8004-style agent artifacts
- Configurable payment rail metadata for Locus-style positioning
- ENS and Self identity metadata support
- An agent receives a task and constructs a payment intent.
- The runner hashes the intent and evaluates risk privately.
- If allowed, the agent queues the payment onchain instead of transferring immediately.
- Telegram alerts and the dashboard expose the pending payment.
- The owner can veto before
unlocksAt. - If not vetoed, the keeper or any caller can execute after the window closes.
Primary targets:
- Synthesis Open Track
- Protocol Labs: Agents With Receipts / ERC-8004
- Protocol Labs: Let the Agent Cook
- MetaMask: Best Use of Delegations
Strong secondary targets:
- Uniswap: Agentic Finance
- Celo: Best Agent on Celo
- Locus: Best Use of Locus
- Venice: Private Agents, Trusted Actions
- ENS: Identity / Communication / Open Integration
- Self: Best Self Agent ID Integration
- Status Network: Go Gasless
How the project maps:
- ERC-8004 artifacts and audit logs support the Protocol Labs trust-and-receipts story.
- Delegation tooling supports the MetaMask permissions story.
- Swap-backed token funding supports the Uniswap finance story.
- Alfajores support supports the Celo stablecoin/payment story.
- Payment rail metadata supports the Locus controlled-wallet story.
- ENS and Self metadata support identity-focused tracks.
- Venice risk mode supports the private-reasoning trust story.
- Install dependencies:
"C:\Program Files\nodejs\npm.cmd" install- Copy contract env template:
copy contracts\.env.example contracts\.env- Copy frontend env template:
copy frontend\.env.local.example frontend\.env.local"C:\Program Files\nodejs\npm.cmd" run contracts:test"C:\Program Files\nodejs\npm.cmd" run contracts:nodeNative mode:
"C:\Program Files\nodejs\npm.cmd" run contracts:deploy:localToken mode:
- set
SETTLEMENT_MODE=tokenincontracts/.env - optional: set
INITIAL_FUND_TOKEN_UNITS
"C:\Program Files\nodejs\npm.cmd" run contracts:deploy:local- set
TELEGRAM_BOT_TOKEN - set
TELEGRAM_CHAT_ID
"C:\Program Files\nodejs\npm.cmd" run contracts:watch:telegram:localSet in contracts/.env:
AGENT_TASKAGENT_RECIPIENT- either
AGENT_AMOUNT_WEIorAGENT_AMOUNT_ETH
Then run:
"C:\Program Files\nodejs\npm.cmd" run contracts:run-agent:localKEEPER_ONCE=true "C:\Program Files\nodejs\npm.cmd" run contracts:keeperSet in frontend/.env.local:
NEXT_PUBLIC_ESCROW_ADDRESS- optional:
NEXT_PUBLIC_TARGET_CHAIN=localhost - optional:
AUDIT_ARTIFACT_NETWORK=localhost
Then run:
"C:\Program Files\nodejs\npm.cmd" run frontend:devSet in contracts/.env:
PRIVATE_KEYSEPOLIA_RPC_URL- optional token mode values such as
SETTLEMENT_MODE,SETTLEMENT_TOKEN,SWAP_ROUTER_ADDRESS
Useful commands:
"C:\Program Files\nodejs\npm.cmd" run contracts:deploy:sepolia
"C:\Program Files\nodejs\npm.cmd" run contracts:run-agent:sepolia
"C:\Program Files\nodejs\npm.cmd" run contracts:artifacts:sepolia
"C:\Program Files\nodejs\npm.cmd" run contracts:watch:telegram:sepoliaSet in contracts/.env:
CELO_ALFAJORES_RPC_URLCELO_PRIVATE_KEYor reusePRIVATE_KEYSETTLEMENT_MODE=tokenSETTLEMENT_TOKEN=<token address>
Useful commands:
"C:\Program Files\nodejs\npm.cmd" run contracts:deploy:alfajores
"C:\Program Files\nodejs\npm.cmd" run contracts:run-agent:alfajores
"C:\Program Files\nodejs\npm.cmd" run contracts:artifacts:alfajores
"C:\Program Files\nodejs\npm.cmd" run contracts:watch:telegram:alfajores
KEEPER_ONCE=true "C:\Program Files\nodejs\npm.cmd" run contracts:keeper:alfajoresFor the frontend:
NEXT_PUBLIC_TARGET_CHAIN=alfajoresNEXT_PUBLIC_ESCROW_ADDRESS=<deployed escrow>NEXT_PUBLIC_ALFAJORES_RPC_URL=<rpc url>
RISK_PROVIDER=local|veniceRISK_THRESHOLD=70RISK_HIGH_VALUE_WEI=500000000000000000RISK_BLOCKED_RECIPIENTS=...RISK_SUSPICIOUS_KEYWORDS=...VENICE_API_KEY=...
AGENT_FUNDING_MODE=swap-nativeAGENT_SWAP_NATIVE_AMOUNT_WEI=...AGENT_SWAP_NATIVE_AMOUNT_ETH=...AGENT_SWAP_MIN_AMOUNT_OUT=...SWAP_ROUTER_KIND=mock|uniswap-v3SWAP_ROUTER_ADDRESS=...UNISWAP_WRAPPED_NATIVE_TOKEN=...UNISWAP_QUOTER_ADDRESS=...UNISWAP_POOL_FEE=3000
SMART_ACCOUNT_OWNER_PRIVATE_KEYAGENT_DELEGATE_PRIVATE_KEYAGENT_SUBDELEGATE_PRIVATE_KEYDELEGATION_MAX_CALLSSUBDELEGATION_MAX_CALLS
Useful for Locus-style positioning:
PAYMENT_RAIL_PROVIDER=locusPAYMENT_RAIL_NETWORK=base|alfajores|sepolia|localhostPAYMENT_RAIL_ASSET_SYMBOL=USDCPAYMENT_RAIL_ASSET_ADDRESS=...PAYMENT_RAIL_WALLET_ADDRESS=...PAYMENT_RAIL_WALLET_LABEL=...PAYMENT_RAIL_POLICY_URL=...
AGENT_ENS_NAME=...OWNER_ENS_NAME=...AUTHORIZED_AGENT_ENS_NAME=...OWNER_DISPLAY_NAME=...AUTHORIZED_AGENT_DISPLAY_NAME=...ADDRESS_BOOK_JSON={...}RECIPIENT_ENS_JSON={...}SELF_VERIFICATION_ENABLED=true|falseSELF_VERIFIED=true|falseSELF_PROOF_URL=...
contracts/deployments/<network>.jsoncontracts/runs/<network>.jsoncontracts/delegations/<network>.jsonagent.jsonagent_log.jsonfrontend/public/agent.jsonfrontend/public/agent_log.json
Validated in this repo:
- contract test suite passes
- frontend production build passes
Not included in this repo automation:
- final hackathon video recording
- submission form completion
- mainnet deployment execution