Levee

Hacked? It snaps back. Stolen stablecoins frozen and taken back in seconds on Hedera.

Levee

Created At

ETHGlobal Mumbai

Project Description

Levee is a circuit breaker for stablecoin issuers on Hedera. It enforces one rule: no receipt, no movement.

The problem: when a stablecoin issuer is hacked, the attacker uses the issuer's own keys or signing system to drain the treasury or mint fake tokens. Today that is stopped by hand and it is slow: Resolv (Mar 2026, ~$25M taken) took about 3 hours to stop, StablR about 8 hours to even respond, PlayDapp about 4 days.

How Levee works:

  1. Every payment out of the treasury must get a receipt on Hedera first. A gate checks the requesting machine (signed request, allowed role, a live health pass on Arkiv), the amount caps and the recipient allowlist, writes the receipt to a Hedera Consensus Service topic, and schedules the transfer. A separate issuer signer adds the second treasury signature only after it finds that receipt on Hedera.
  2. A watcher reads every movement and every mint on the Mirror Node and matches it to a receipt written before it.
  3. Anything without a valid receipt (stolen keys, a rogue insider, an unauthorised mint) is contained automatically by a close-only smart contract that holds Stablecoin Studio's freeze and wipe roles: the treasury is frozen, the stolen tokens are wiped from the thief's account and the thief is frozen. The incident is published on Hedera.
  4. Only 2 of 3 admins together can reopen. The watcher can never unfreeze anything.

Live on Hedera testnet: a theft was detected in about 2.5 s and taken back in about 5.6 s; a fake mint was wiped in about 4.8 s with supply restored exactly; 393 real payments ran with zero false alarms. The contract is verified on HashScan. The live dashboard shows it all and lets you run send, hack, unlock and fake mint yourself.

How it's Made

TypeScript end to end (Node services + a Vite/React dashboard), one Solidity contract, all on Hedera testnet with the Hedera JS SDK and Mirror Node REST.

Hedera: the RUPC token is issued with Hedera Stablecoin Studio (v4 factory called directly) and its freeze/wipe/pause/cash-in roles are granted to our ContainmentController contract (verified on HashScan). Receipts, incidents and watcher heartbeats are three Hedera Consensus Service topics with submit keys, so consensus timestamps prove the receipt came before the money moved. The treasury is a 2-of-3 threshold key; normal payments use Hedera Scheduled Transactions so the gate and a separate issuer signer each add one signature, and the signer only signs after it independently finds the receipt. The watcher polls the Mirror Node; we found the public Mirror sits behind a CDN with max-age=1, so we cache-bust every read and prove from one ascending transaction listing that no receipt exists, which cut detection from ~7 s to ~2.5 s with zero false alarms.

Arkiv: each payout machine runs an agent that sends signed health heartbeats every 60 s; a checker keeps a levee.pass.v1 entity alive on Arkiv with a 3-minute expiry, so a hacked or offline machine's pass simply disappears and the gate refuses it. Requests are signed by the machine's enrolled key and its role is checked.

Ordering detail that mattered: a frozen account can't be wiped and a paused token blocks freeze/wipe, so the contract wipes then freezes, and pause is always last. 351 core + 279 dashboard tests run in GitHub CI. Built with Claude Code; images and the hero video were made with Google Flow.

background image mobile

Join the mailing list

Get the latest news and updates

Levee | ETHGlobal