Inspiration

Most "AI agent" projects I'd built before this were just LLM wrappers a human still had to click "approve." I'd also publicly committed to building on Arc, Circle's USDC-native-gas L1 built for an agentic economy. This hackathon was the forcing function to build something genuinely autonomous, on the chain I'd already committed to.

What it does

Cadence manages a DeFi lending position on its own. Give it a plain-English instruction "keep my health factor above 1.5" and on a repeating cycle it reads the live position, reasons with an LLM, and decides: supply, borrow, repay, withdraw, or hold.

The part that matters most: every decision gets checked against an on-chain PolicyModule allowlisted actions, spend caps, cooldowns before anything is signed. The AI reasons; the contract enforces. A bad decision literally can't move funds outside that box, because the boundary lives on-chain, not in a prompt.

How I built it

Three layers, built in that order deliberately: contracts:(Foundry an ERC-4337 AgentAccount, PolicyModule, a minimal lending pool), backend:(Node/TypeScript a bounded perceive→reason→act loop against Groq's free tier), frontend: (Next.js live on-chain reads, zero mocked data). Midway through, an AI coding partner and I pushed it further: wallet auth, per-wallet agent provisioning, Supabase-backed history, a Render-hosted always-on scheduler.

Challenges I ran into

Arc's testnet RPC threw a genuine TLS failure mid-build routed around it via a managed provider. The most interesting bug wasn't a failure at all: I assumed EntryPoint.handleOps reverts a whole bundle if one UserOperation fails. It doesn't ERC-4337 catches that per-operation. My tests were asserting the wrong thing until I rewrote them to check resulting state instead. Also caught a real race: a relayer path that returned a tx hash before confirming it, which surfaced as a flaky test before it could've been a flaky demo.

Accomplishments that we're proud of

A real, signed ERC-4337 transaction landing on-chain because an LLM decided it should not mocked, not simulated. A UserOperation, confirmed on Arcscan.

Proving the guardrails aren't decorative a proposed action over the policy's spend cap gets rejected before a transaction is even built. The boundary lives on-chain in PolicyModule, not in a prompt.

Catching a real race condition a submitted tx treated as "done" before it was actually confirmed through testing, before it could've failed live on camera.

Shipping contracts, backend, and frontend as one genuinely connected system: zero mocked data anywhere in the pipeline.

Getting a working autonomous agent running on Arc within days of it being usable infrastructure built for exactly this kind of software.

What I learned

Most of "agent safety" is architecture, not prompt engineering the most important line in this project is a require() in Solidity, not anything in the system prompt.

What's next

Independent contract review, a confirmed bundler endpoint, and tighter policy limits before this touches anything beyond testnet USDC.

Built With

Share this project:

Updates

Submission history