CRE Self Healing Reserve
Confidential Proof-of-Reserve with autonomous recovery, built on Chainlink CRE and CCC.
What it is
When a wrapped-asset reserve drops below 100% collateralization, transparent proof-of-reserve systems ensure the public knows immediately. That transparency is the whole point and to protect users. But it also triggers a cascade: panic selling, depegs, and front-running before any recovery can even begin.
CRE Self-Healing Reserve offers a confidential alternative for cases where the reserve can be restored. A CRE workflow verifies reserve balances inside a TEE via ConfidentialHTTP and publishes only a boolean isSolvent attestation on-chain. Exact balances never leave the enclave. When undercollateralization is detected, an autonomous recovery agent selects the optimal rebalancing strategy based on deficit size: direct Uniswap swaps for small deficits (<$50M) where speed matters, or confidential dark pool execution via CCC Private Token Transfers for large deficits (>$50M) where market impact is dangerous. The dark pool uses CCC threshold encryption so no single node can see the order, and settlement happens entirely inside the CCC enclave with only an encrypted balance hash and boolean result published on-chain. The result: trustless solvency verification with zero information leakage, and autonomous crisis recovery that doesn't create the very panic it's trying to prevent.
How it Works
The system is built around three Chainlink primitives: CRE, CCC, and live Proof of Reserve data.
The CRE workflow (workflow/main.ts) follows the typescriptConfHTTP SDK pattern, using ConfidentialHTTPClient to fetch reserve balances from a custodian API inside a simulated TEE, comparing them against liabilities off-chain, and using consensusIdenticalAggregation across DON nodes to output only a boolean. That boolean is written to ReserveAttestation.sol via the CRE onReport callback. For recovery, CCC handles the heavy lifting on the dark pool path. The deficit amount is threshold-encrypted with the CCC master public key so no single DON node can decrypt it. The Vault DON re-encrypts key shares for the assigned CCC enclave, which decrypts, matches orders against pre-committed market maker liquidity, and settles via CCC Private Token Transfers.
The actual token movement happens entirely inside the enclave: amounts, counterparties, and fill prices never appear on-chain. Only an encrypted balance hash, a boolean recovery result, and a quorum-signed CCC attestation are published. CREDarkPool.sol manages this flow on the contract side, accepting encrypted orders via requestCollateral() and finalizing settlement via confidentialFill(). The direct swap path bypasses CCC entirely and just executes on Uniswap.
The live dashboard pulls real Chainlink wBTC PoR data from Ethereum mainnet as a simulation anchor. TEE execution is simulated but the workflow code, contract interfaces, and CCC integration patterns are production-aligned. Built with TypeScript, viem, Express, Solidity 0.8.19, and Hardhat.
Links
Created by
- Chainlink Red Pill (@chainlinkp)