All projects

Base Escrow

Non-custodial escrow on Base where Chainlink CRE autonomously resolves disputes with AI assessment.

DeFi & Tokenization CRE & AI

What it is

Base Escrow is a non-custodial escrow protocol on Base Sepolia that eliminates the need for manual arbiter intervention in dispute resolution. Traditional escrow requires a trusted third party to manually review and settle disputes; a slow, opaque, and human-dependent process.

Base Escrow solves this by wiring a Vyper escrow state machine directly to Chainlink CRE. When a buyer or seller opens a dispute, the Escrow contract emits a Disputed event. CRE detects the event via a trigger YAML, dispatches a resolution workflow, and calls a FastAPI resolver service. The resolver reads live onchain state via web3.py, runs a deterministic policy engine (DISPUTED → REFUND), and optionally calls Claude Haiku for an advisory AI assessment that classifies the dispute and confirms policy alignment. CRE then submits the refund() transaction onchain autonomously. The full loop: event detection, resolver decision, AI assessment, onchain settlement -- requires zero manual action.

How it Works

  • Smart contract: Vyper 0.4.3 on Base Sepolia (chainId 84532) — five-state machine with reentrancy lock and role-gated actions (buyer, seller, arbiter)
     - CRE integration: trigger YAML watches for the Disputed event; workflow YAML calls the resolver API, gates on should_submit_tx, and submits the settlement transaction
     - Resolver API: Python / FastAPI / uvicorn — reads contract state via web3.py, evaluates deterministic policy, returns resolution decision
     - AI assessment: Claude Haiku (claude-haiku-4-5-20251001) via Anthropic SDK — non-blocking advisory layer that classifies disputes and confirms policy alignment; resolver works without it if the API key is absent or the call fails
     - Deployment scripts: Python + web3.py + Vyper compiler for deploy and role-switching CLI
     - Confirmed live on Base Sepolia with onchain refund tx evidence

Links

Created by

  • John Sykes