What you get
- Real-time circulating supply per token and per chain, from mint/burn events.
- A continuous collateralization ratio - onchain supply checked against off-chain reserves on a schedule.
- An automatic alert (and optional pause) the moment backing slips below a threshold.
- Treasury analytics - velocity, holder concentration, and float - in your warehouse.
How it works
Step 1: Stream supply changes with Turbo
TIP-20 emits explicitMint, Burn, SupplyCapUpdate, and RewardDistributed events. Decode them from raw_logs to build a supply ledger.
supply-monitor.yaml
For standard ERC-20 stablecoins that mint and burn via transfers to and from the zero address, use the curated
erc20_transfers dataset (tip20_transfers on Tempo) and detect sender = '0x0000000000000000000000000000000000000000' (mint) or recipient = '0x0000000000000000000000000000000000000000' (burn) instead of decoding custom events.Step 2: Attest collateralization with Compose
A scheduled Compose task closes the loop: read on-chain supply, fetch reserves, compare, and act. Running it in a TEE means the attestation proves the exact reconciliation logic ran.src/tasks/reserve-check.ts
compose.yaml:
On-chain reads go through
wallet.readContract (see Smart Contracts) - view calls return the decoded value directly and cost no gas, so the read reuses the same sponsored wallet. That wallet’s writes are gas-sponsored (sponsorGas: true), so the attestor never needs funding.Step 3: Publish the feed (optional)
To expose reserves to other applications with a Chainlink-compatible interface and an operator kill-switch, follow the multi-chain NAV oracle guide. It is the publishing complement to the monitoring in this guide: this task decides whether reserves are healthy; the NAV oracle broadcasts the figure to every chain that needs it.Circuit breaker pattern
Because the check runs continuously, you can wire the breach branch to a real control instead of just an alert - pause the token viaPAUSE_ROLE, halt a payout keeper, or throttle minting. Compose’s durable execution guarantees the breaker actually fires and completes even through transient failures, and the whole sequence is traced for the post-incident review.
Business outcomes
- Continuous assurance replaces a quarterly PDF. Collateralization is a live number, attested on-chain.
- Regulatory readiness. Reserve monitoring and attestation map directly onto stablecoin reserve-reporting regimes.
- Faster incident response. A breach triggers an alert - or a pause - in minutes, with a full audit trail.
- One source of treasury truth. Supply, velocity, and reserves live in your own database and warehouse.
Resources
- Build a multi-chain NAV oracle
- PostgreSQL aggregate sink
- Compose EVM context
- Compliance & AML monitoring