POR Watchdog
Cross-chain Proof-of-Reserve watchdog that monitors wrapped/bridged asset reserves in real-time, detects depletion via AI + rules scoring, and triggers autonomous rescue via Chainlink CCIP with private execution via ACE.
What it is
When Multichain (formerly Anyswap) collapsed in July 2023, $126M in bridged assets lost their backing overnight. Users holding anyETH, anyUSDC, and anyDAI woke up to tokens worth nothing. There was no warning, no automated response, no rescue mechanism. The bridge wallets drained and nobody knew until it was too late.
When Wormhole was exploited for $320M in February 2022, the reserve ratio of wETH on Solana dropped to 0% in a single transaction.
Jump Trading backstopped 120,000 ETH manually but what if they hadn't?
What if there was an autonomous system watching reserves and triggering rescue before the bank run?
PoR Watchdog is that system. It monitors wrapped and bridged asset reserves (wBTC, wETH, bridged USDC) every 30 seconds using 5 Chainlink capabilities:
- CRE Runtime orchestrates the monitoring pipeline (cron trigger, on-chain reads, risk scoring, tx submission)
- Chainlink Data Feeds provides real-time asset pricing (ETH/USD, BTC/USD) for USD valuation of reserves
- CCIP enables cross-chain rescue - when reserves on one chain deplete, collateral is teleported from another chain
- ACE (Confidential Compute)** executes private rescue transfers to prevent MEV bots from front-running the rescue
- Confidential HTTP** fetches market intelligence (DeFiLlama TVL, CoinGecko prices, Fear & Greed Index) and AI analysis (OpenRouter) without exposing API keys to node operators
The monitoring is continuous: every 30 seconds, the CRE workflow reads bridge contract balances vs totalSupply, computes reserve ratios, and scores risk using a dual-engine (AI + deterministic rules) with dynamic weighting based on market regime (gradual erosion vs black swan). When the reserve ratio drops below threshold (98% for BTC, 95% for ETH, 99% for stablecoins), autonomous rescue triggers via CCIP cross-chain messaging with private execution via ACE's 5-step pipeline.
On-chain attestations are stored permanently - every reserve check writes the ratio, risk score, AI confidence, threat type, and reasoning to the PoRWatchdog contract. This creates a transparent, verifiable audit trail of reserve health over time.
Revenue model: 0.1% (10 bps) fee on every rescue operation. The protocol earns when it saves assets.
Real E2E execution on Base Sepolia:
- Deployed PoRWatchdog + 3 PoRTokens (wBTC, wETH, brUSDC)
- 10 on-chain attestations recorded (HEALTHY -> WARNING -> CRITICAL)
- 1 autonomous rescue triggered when wBTC reserves dropped to 85%
- 0.005 ETH in rescue fees collected on-chain
- Bridge drain simulated: 100 wBTC supply, reserves drained from 100 to 70, auto-rescue triggered at 85%
How it Works
Smart Contracts (Solidity + Foundry):
PoRWatchdog.solmonitors reserve ratios, stores attestations, auto-triggers rescue when ratio drops below threshold, CCIP cross-chain rescue with 0.1% feePoRToken.solsimulates wrapped/bridged tokens with configurable reserves and drain functions for demo- 18/18 Foundry tests covering registration, attestations, rescue triggers, cooldowns, fee collection, AI-triggered rescue, and multi-asset monitoring
- Deployed and tested E2E on Base Sepolia with real on-chain attestations and rescue
CRE Workflow (TypeScript, 8-step pipeline):
- Read Chainlink Price Feeds (ETH/USD, BTC/USD)
- Read reserve data (bridge balance vs totalSupply for each asset)
- Fetch market intelligence via Confidential HTTP (DeFiLlama, CoinGecko, Fear & Greed)
- AI risk analysis via Confidential HTTP (OpenRouter API)
- Dual-engine risk scoring (rules + AI with dynamic weighting by market regime)
- On-chain attestation write via CRE Report
- Telegram alerts for high-risk positions
- ACE 5-step private rescue pipeline (balance check, shielded address, transfer, withdraw, audit)
Frontend (Next.js 15 + Tailwind):
- Dashboard with reserve ratio bars, risk scores, asset cards, stats grid
- Real contract addresses pointing to deployed Base Sepolia contracts
- Chainlink services showcase
Links
Created by
- Pranjal