
Charlie
Autonomous onchain agent on Base
About
The problem it solves Running an onchain strategy safely is still too manual. Users must constantly monitor health factor, carry vs borrow cost, gas, and execution risk. Most bots are opaque, and many dashboards rely on synthetic data. Charlie is a self-sustaining onchain agent on Base that executes through an ERC-4337 smart account and makes risk-aware decisions every cycle. It can: Delever when safety drops Loop only when net carry is positive Automatically fund and pay its own compute escrow The dashboard shows real onchain state, receipts, and recent actions with no mocked runtime data, so operators can trust what they see. Use of AI tools and agents The system uses multiple agents with strict separation of concerns: Runtime strategy agent Reads onchain state and applies deterministic, risk-aware decision logic. Safety agents and gates Policy gate, replay checks, verification pipeline, and provenance validation must all pass before canary or promotion. Human override layer High-risk actions require approval and timelock. An emergency stop can halt autonomy immediately. This architecture gives us agentic iteration speed without sacrificing protocol safety.
How it's made
Challenges we ran into The biggest hurdle was making autonomy safe without blocking iteration. ERC-4337 execution + attribution Every userOp callData needed to carry the ERC-8021 builder-code suffix correctly. We built dedicated suffix utilities and added verification directly in the execution flow. Testnet realism gaps Base Sepolia does not expose the same wstETH setup as mainnet, which impacted strategy testing. We introduced a Sepolia-safe configuration path using WETH as a stand-in and enforced explicit environment guards. Safe self-improvement I wanted autopilot to propose upgrades without ever touching protected safety or economic invariants. This was solved this with: A machine-checkable policy gate Replay and verification requirements Provenance checks Hard human controls including approval and timelock