A fire exit for DeFi: withdraw straight from the contracts when the website is down or hijacked.
When Curve's DNS was hijacked in 2022, nothing was wrong with Curve's smart contracts. People typed the right address, got a perfect copy of the site, and signed an approval to a drainer. It keeps happening. In October 2026 alone, a hijacked script on Polymarket hit 726 wallets, and a DNS hijack at Name.com sent a dozen DeFi sites to drainer copies. And when a frontend simply goes offline, loses its domain or loses the company behind it, the money is still on chain but out of reach for almost everyone. Today's fallback is Etherscan's "Write contract" tab, which is another website and will happily send an approval to a drainer.
Copeybara is a fire exit for DeFi: a way out that never goes through the front door. It has four parts that share one root of trust, the protocol's ENS v2 name.
The exit kit is one self-contained HTML file (258 KB) a user saves ahead of time. Its sha256 is published on the protocol's ENS name, so any copy can be checked from outside the browser. Type the ENS name and connect a wallet, and the kit finds your positions (Uniswap v3 and v4, Aave v3, Curve 3pool, plus any vault the protocol describes on ENS) and withdraws them straight from the contracts. Every read goes to three independent RPCs, and they must agree at a pinned block or the kit stops. Every transaction passes a fail-closed Exit Guard: it must target a contract in the protocol's on-chain Exit Plan, pay only your own address, move no ETH and contain no approvals, permits or transfers. There is no override. "Recovered" appears only after the receipt and a positive balance change for every token.
The Exit Plan on ENS makes the name the protocol's security root. A 2-of-3 Safe publishes the kit's hash, the Exit Plan, the website's script fingerprint and the extension's hash. ENS v2's Permissioned Resolver gives each key exactly one job: the website key can write url and nothing else.
The browser extension checks every script a protocol's site runs against that fingerprint. It blocks a compromised site before it loads, and stops drainer approvals and permits before the wallet shows them.
The watcher is an agent with its own ENS name (watcher.demoswap-blackout.eth). It can raise an alarm and blocklist look-alike domains, never touch a release, and the Safe can revoke it in one transaction.
Protocols set it all up with the Copeybara SDK: one config, one Safe batch, and a fire drill that switches off their own site and RPC.
It's live on Sepolia. A real attack replication drains a wallet through a hijacked clone, then the saved kit rescues the position with the site and RPC switched off. Measured:
No server, nothing for us to switch off. Verified, not trusted.
TypeScript monorepo (pnpm, 14 packages and 5 apps), Solidity and Foundry for the on-chain parts, viem everywhere, Preact for the UIs. There are 900+ unit tests, plus fork, Playwright and Foundry suites. Each piece:
ENS v2 (Sepolia). The kit's only baked-in address is the ENS v2 UniversalResolver proxy. Everything about a protocol comes from text records read at one pinned block through our RPC quorum: org.copeybara.release, .manifest, .exits, .site, .extension, .status and .blocklist.
Uniswap.
The exit kit. Vite + Preact built into a single HTML file with exactly one inline script, pinned by hash in a CSP meta tag. No external assets, zero third-party requests (Playwright-verified), and reproducible bytes (SOURCE_DATE_EPOCH=0). Its only wallet methods are connect/chain methods, eth_estimateGas and eth_sendTransaction. It never asks for typed-data signatures.
The quorum. Three providers, 4 s timeout, 2 retries. At least two must answer, and all must agree. Heads more than 16 blocks from the median are dropped, so one stale provider can't serve an old release.
The extension (MV3).
The watcher. Two mismatches in a row write status=compromised, and it only clears alarms it raised. With an Anthropic key, Claude writes the one-line warning from structured facts only.
SDK. The copeybara CLI (manifest, release, fingerprint, propose, verify, roles-check, drill, certify, incident) never holds a key. Every write is one Safe Transaction Builder batch checked against its allowed scope. There are also Vite, Next and webpack plugins that fail the build on an unpinned third-party script.
The hacky bits:
Honest scope: Sepolia only, the demo Safe's three keys are on one machine, and it doesn't protect against bugs in a protocol's own contracts. The full threat model is in the README.

