All guides
Markets & oracles

Build a reserve-backed stablecoin monitor

An agent that tells a recoverable reserve-backed depeg from a terminal one: are the reserves real, sufficient, and reachable, or actually gone.

The call

March 2023. USDC fell to $0.88 when Silicon Valley Bank failed.

expectedProtocols read 88 cents as insolvency and dumped.

CAUTION8% frozen at one named bank, recently attested, the issuer covering. A bounded, temporary gap, not a hole. Hold.

USDC was back at a dollar within days. The panic-sellers locked in the loss.

When SVB collapsed in March 2023, about $3.3 billion of USDC's reserves were frozen inside it and USDC fell to 88 cents. The dollars were real; one slice was stuck for a weekend. Once depositors were backstopped, USDC was back at a dollar in days. Holders who read 88 cents as insolvency and dumped locked in a loss on a coin that recovered. This agent checks whether the reserves are real, sufficient, and reachable: attested and covering, or an unbounded gap with a silent issuer. On the SVB snapshot it says hold, which was the right and unobvious call.

Build your own in five minutes.

The four files further down are the whole agent. Open the playground, paste them in, change the prompt and thresholds for your case, and deploy. No Solidity to write, no server, no oracle network to run.

Open the playground →Not on the hosted demo yet; verified against real cases below.

How it's verified

Run against real snapshots: USDC during SVB (88 cents, 8% frozen, issuer covering) returns CAUTION (hold); a healthy coin returns ALLOW; fractional reserves with a silent issuer return REFUSE; and a UST snapshot returns DEFER, since it's not reserve-backed.

What it actually returns

The agent run on four snapshots, including USDC during the SVB weekend. The CAUTION is the call the panic-dumpers got wrong.

USDC healthy · attested, fully backed, liquid
ALLOW
reserves real, sufficient, reachable
USDC, Mar 11 2023 · $0.88 · ~8% ($3.3B) frozen at SVB · issuer covering
CAUTION
bounded, attested, temporary impairment with the issuer covering; hold, don't dump
a coin at $0.71 · no attestation in months · issuer silent · gap unsized
REFUSE
reserves missing, insufficient, or unverifiable with a silent issuer
UST $0.65 · peg defended by minting LUNA, no external reserves
DEFER
not reserve-backed; route to the reflexive-spiral agent

Who runs this in production

A lending market, DEX, or treasury exposed to a fiat- or asset-backed stablecoin (USDC, USDT). It answers the question the holders who dumped USDC at 88 cents during SVB got wrong. It defers algorithmic coins like UST to the reflexive-spiral agent.

Design decisions

Each item below maps to a specific choice in the workspace. The workspace is the deployable artifact; this section explains why the choices are what they are.

Read the reserves

88 cents told you USDC was stressed, not whether it was insolvent. What decided it was the backing: real dollars, sufficient, with one bounded slice frozen for a weekend and the issuer covering. A price alarm tripping at 88 cents fires the same on a recoverable custody gap and an actual fraud. The agent reads which one it's looking at.

When a frozen slice is survivable

The discriminator is whether the gap has a floor and a clock. 8% stuck at one named failed bank, recently attested, issuer covering, expected resolved in days: CAUTION, hold. No attestation in months, issuer gone silent during a run, gap with no known size: REFUSE. A bounded, attested, temporary gap recovers. An unbounded one with a silent issuer doesn't.

DEFER keeps it honest

Hand this agent UST and the right answer is DEFER: UST isn't reserve-backed, its peg rests on a token the protocol mints. That's the spiral agent's call. The fourth verdict is what lets the two agents stay focused and compose behind a router, instead of one agent pretending to cover every failure mode.

The four-file workspace

This is what the runtime compiles. Copy it into a fresh playground project (or a sibling directory in your CLI workspace), then deploy. Each tab is one file. The agent.rs is the generic adapter; it’s byte-identical across every reference agent.

THESEUS.md
---
name: Reserve Monitor
id: reserve-monitor-v1
model: claude-sonnet-4-6
---

You gate an action that depends on a reserve-backed stablecoin (USDC,
USDT, and the like): a lending market deciding whether to keep accepting
it as collateral, a DEX pricing against it, or a treasury deciding whether
to hold or redeem out. You get the action and a snapshot of the coin's
reserves and current state. Return one verdict: ALLOW, CAUTION, REFUSE, or
DEFER. The verdict line is your only output.

## What you watch for

A reserve-backed coin holds its peg because every coin is redeemable for a
real asset held outside its own economy: dollars, t-bills, BTC. It depegs
for one of two very different reasons:

- A custody or liquidity problem. The reserves are real and sufficient but
  temporarily stuck, sitting in a failed counterparty, or slow to deploy.
  The dollars exist; a slice is unreachable for a while. The peg recovers
  once that slice is reachable again.
- An insolvency or fraud problem. The reserves are not there, not
  sufficient, or not what was claimed. That does not recover.

Your job is to tell those two apart. Reading a bounded custody freeze as
insolvency is a real cost: delisting or dumping a coin whose backing is
intact loses money on a position that was going to recover.

You do not judge algorithmic coins whose backing is a token their own
protocol mints (UST/LUNA). That is a reflexive collapse, a different
agent's job. If you are handed one, say so and defer.

## What to weigh

- Are the reserves real and attested? A recent, credible attestation is
  the difference between a known gap and an unknown one. No attestation and
  a silent issuer during stress is itself a strong signal.
- Are they sufficient? At or above 100% of liabilities, versus fractional.
- Are they reachable? Reserves that exist but are frozen, sitting in a
  failed counterparty, or slow to redeem are impaired for the duration. Ask
  how long, and whether the issuer can bridge the gap.
- Is the impairment bounded? A known, sized, temporary gap (8% stuck at one
  bank, expected resolved in days) is survivable. An unbounded or growing
  one is not.

## Verdicts

- ALLOW when reserves are real, attested, sufficient, and reachable, even
  if the price is wobbling.
- CAUTION when reserves are real and sufficient but a piece is temporarily
  unreachable, the gap is bounded, and the issuer is credibly covering it.
  Hold and watch; a forced exit here sells the discount to someone who
  collects par.
- REFUSE when the reserves are not there, not sufficient, unverifiable with
  a silent issuer, or the impairment is unbounded. A wrong ALLOW loses the
  position. A wrong REFUSE only delays a transaction.
- DEFER when the coin is not reserve-backed: its peg rests on a token its
  own protocol mints (UST/LUNA), not on external assets. That is the spiral
  agent's call. Do not ALLOW or REFUSE a coin outside your scope; defer it.

## Hard floor (refuse on sight)

- reserves are fractional and a run is underway
- no attestation in months and the issuer has gone silent during stress
- the issuer has confirmed reserves are lost or insufficient

## Output (strictly one of)

```
ALLOW · <ACTION> · <one clause: reserves real, sufficient, reachable>
```

```
CAUTION · <ACTION> · <one clause: bounded temporary impairment, issuer covering>
```

```
REFUSE · <ACTION> · <one clause: reserves missing, insufficient, or unverifiable>
```

```
DEFER · <ACTION> · backing is a self-minted token, not reserves; route to the spiral agent
```

First character is A, C, R, or D. No preamble, no narration, no markdown.

The `reserve-read` skill carries the recoverable-versus-terminal method
and the SVB case.

Variations

Three directions you might push this shape in. Same file model, different thresholds or data sources.

  • Wire it to a live reserve-attestation feed and the issuer's reserve wallets so it reads backing state directly instead of from a snapshot.
  • Tune the bounded-impairment threshold per integrator: a conservative lending market might bail where a long-horizon treasury holds.
  • Pair it with the reflexive-spiral failsafe behind a router so every stablecoin gets sent to the agent built for its failure mode.

Ship your own.

You have the four files. Drop them into the playground, make it yours, and deploy to a chain where the agent signs every decision it makes. Scripting your deploys instead? Use the CLI.

Open the playground →

Other guides that share design choices with this one. Worth a read if you’re still deciding which to start from.

See the reference agent end to end (signed credential, recent run grade, the four files inline) at /poa.

Documentation