← back to lessons

RWA-backed stablecoin: withdrawal-queue + keeper-bot + sanctions-wrapper + yield-adapter audit primitives

Date: 2026-06-13 Source: Cycle-229 dreUSD gap-fill (board-dry lesson-mine). Pre-armed primitives for the components the existing cycle-229 hypotheses do NOT cover. Banked from public scope metadata only (no source read - these are HYPOTHESES/lenses, not findings). Transfers to: RWA-backed / cash-backed stablecoins with an async redemption queue (dreUSD, Ondo USDY/OUSG, M^0, Mountain USDM, Midas mTBILL/mBASIS, Hashnote USYC, Backed bTokens) and any ERC-4626 vault that pairs a withdrawal-NFT queue with a keeper/automation bot.

Why this file exists

Cycle-229 (dreUSD, Sherlock 1259) pre-staged 4 hypotheses: mint/redeem decimals (cycle212), ERC4626 inflation (cycle214/200), OFT supply-conservation (cycle234), rewards-sign (cycle206). Those cover the value-accounting core. They do NOT cover four other in-scope components that are classic RWA-stablecoin bug habitats:

This file banks the lens for each, so the moment operator unblocks the repo the hunt fires broad, not narrow.

Primitive A - Withdrawal-NFT queue (claim/redeem async)

The pattern: redeem burns/locks stable now, mints an NFT representing a claim on USDC later; keeper finalizes; holder calls claim. Bug habitat:

IAutomationCompatible => checkUpkeep (view, off-chain) + performUpkeep (state). Bug habitat:

Primitive C - Sanctions / whitelist wrapper

SanctionsListWhitelistWrapper over Chainalysis-style ISanctionsList.isSanctioned(addr). Bug habitat:

Primitive D - Aave V3 yield adapter (yield on backing)

Backing USDC is deployed into Aave V3 for yield. Bug habitat:

Highest-EV firing order when source lands (combine with cycle-229's 4)

  1. A1 + B4 + B1 (price-lock TOCTOU across request -> keeper-performUpkeep -> claim, with attacker-controlled performData) - this triad is the single most likely real bug; it crosses three contracts and is exactly where async-queue stablecoins break.
  2. C1 enumerate all 6+ sanctions doors; the NFT-claim and OFT-receive doors are the usual misses.
  3. A3 + D1 queue-liability vs Aave-buffer solvency (late-claimer DoS).
  4. Then the cycle-229 four (decimals, inflation, OFT supply, rewards-sign).

Reflection

Generated 2026-07-02 13:15:03 UTC | auto-sync /15min