Decentralized infrastructure monitoring + tokenized rescue funding powered by 7 Chainlink services
Tracks: DeFi & Tokenization | CRE & AI | Risk & Compliance | Privacy
A $1.2B skyscraper in downtown LA broke ground in 2015, ran out of money in 2019, and sat unfinished for seven years. Nobody noticed until it was too late.
Revitalization Protocol prevents this. Every 5 minutes, a CRE workflow powered by AI scores a project's financial health. When the score drops critically, the protocol automatically creates a rescue funding round with premium incentives that attract emergency capital. When milestones are verified complete via satellite data, tranches release automatically. Every dollar is tracked on-chain via Proof of Reserves.
6 smart contracts. 3 CRE workflows. 100 tests. 7 Chainlink services.
| # | Service | How We Use It |
|---|---|---|
| 1 | CRE Workflows | 3 workflows using @chainlink/cre-sdk — cron triggers, HTTPClient, EVMClient, consensus aggregation, signed report delivery |
| 2 | AI Agent | Claude called via HTTP inside the Solvency Oracle CRE workflow for narrative risk assessment. Graceful fallback to rule-based if AI is unavailable |
| 3 | Data Feeds | Real AggregatorV3Interface — ETH/USD price feed in TokenizedFundingEngine for USD valuations (getEthPriceUsd(), getRoundValueUsd()) |
| 4 | CCIP | Real CCIPReceiver from @chainlink/contracts-ccip — FundingBridgeReceiver.sol receives cross-chain funding. Tested with CCIPLocalSimulator |
| 5 | Automation | checkUpkeep/performUpkeep on FundingEngine (expired round cleanup) and ReserveVerifier (periodic reserve checks). Ready for automation.chain.link |
| 6 | Proof of Reserves | AggregatorV3Interface in ReserveVerifier.sol — verifies project reserves + funding engine ETH balance matches deposits |
| 7 | Confidential Compute | ConfidentialSolvencyCompute.sol with submitEnclaveResult(), attestation hashes, and ENCLAVE_ROLE. CRE workflows have [CC_BOUNDARY] markers ready to swap for ccRuntime.execute() |
CRE Solvency Oracle (5 min)──┐ CRE Milestone Oracle (weekly)──┐
HTTPClient: cost indices │ HTTPClient: satellite/permits │
EVMClient: onchain reads │ EVMClient: onchain reads │
AI Agent: Claude risk │ Rule-based: progress scoring │
Consensus: median + identical│ Consensus: median + identical │
│ │
┌─────────v──────────┐ ┌───────────v────────────┐
│ SolvencyConsumer │ │ MilestoneConsumer │
│ score < 25? │ │ progress == 100%? │
└────────┬───────────┘ └──────────┬─────────────┘
│ try/catch │ try/catch
│ initiateRescueFunding() │ releaseTranche()
│ │
┌────────v─────────────────────────────v──────────┐
│ TokenizedFundingEngine │
│ ERC-1155 positions │ CCIP cross-chain │
│ Rescue premiums │ Automation: expired │
│ Data Feeds: USD │ Milestone-gated tranches │
└───────────┬─────────────────┬──────────────────-┘
│ │
┌───────────v──────┐ ┌───────v────────────────┐
│ ReserveVerifier │ │ FundingBridgeReceiver │
│ PoR + Automation │ │ Real CCIPReceiver │
└──────────────────┘ └────────────────────────┘
┌────────────────────────┐
│ ConfidentialSolvency │
│ Compute (CC ready) │
└────────────────────────┘
Cross-module hooks use typed interfaces + try/catch — if a hook fails, the report still stores and emits a RESCUE_CALL_FAILED event. No silent failures.
When solvency drops below 25 (CRITICAL), the protocol creates emergency rescue rounds with premium incentives proportional to severity:
Rescue Target = (100 - score) * 0.1 ETH
Premium = min((100 - score) * 50, 5000) basis points
Score 22 → 7.8 ETH target, 39% premium → Investor earns 39% return
Score 10 → 9.0 ETH target, 45% premium → Investor earns 45% return
Score 0 → 10 ETH target, 50% premium → Maximum premium (capped)
Worse solvency = higher investor return. This creates a self-correcting market where emergency capital flows to the projects that need it most.
| Contract | What It Does | Chainlink Services | Tests |
|---|---|---|---|
| SolvencyConsumer | Receives CRE solvency reports, triggers rescue via cross-module hook | CRE, CC | 17 |
| MilestoneConsumer | Receives milestone reports, releases tranches via cross-module hook | CRE | 21 |
| TokenizedFundingEngine | ERC-1155 positions, milestone-gated tranches, rescue premiums | Data Feeds, CCIP, Automation | 16 |
| FundingBridgeReceiver | Receives cross-chain funding messages from Sepolia | CCIP | 9 |
| ReserveVerifier | Verifies project + engine reserves against PoR feeds | PoR, Automation | 14 |
| ConfidentialSolvencyCompute | Privacy-preserving scoring with attestation proofs | CC | 15 |
| Integration.t.sol | Full lifecycle E2E test | All services | 8 |
| Total | 100 |
Schedule: Every 5 min | AI-powered (only workflow with AI)
- Fetch cost indices → median consensus across DON nodes
- Read onchain financials → EVMClient (BFT guaranteed)
- Fetch funding metrics → median consensus
- Compute solvency score → weighted: FH 35% + CE 20% + FM 25% + RA 20%
[CC_BOUNDARY] - Call AI risk agent → Claude via HTTP, structured JSON, identical consensus, graceful fallback
- Write signed report →
runtime.report()→EVMClient.writeReport()→ onchain
Schedule: Weekly | Satellite/drone imagery + city permits → progress scoring → tranche trigger
Schedule: Every 10 min | Cross-module reads (solvency + milestones + funding rounds) → health metrics
git clone <repo>
cd revitalization-protocol
bun install
forge build && forge test # 100 tests pass
cd dashboard
bun install
bun run dev # http://localhost:3000Contracts are pre-deployed to Tenderly Virtual TestNet (Sepolia fork). The dashboard auto-loads deployed addresses — no setup needed.
The dashboard tells the real story of Oceanwide Plaza through 3 stages, each with 3 outcome variants. Each stage executes real onchain transactions on Tenderly.
- Open the dashboard at
http://localhost:3000 - You'll see Stage 1: Foundation selected with three variant cards
- Click "On Track" (green) — the best-case scenario:
- Registers the project on SolvencyConsumer + MilestoneConsumer
- Creates a funding round on TokenizedFundingEngine
- Submits a solvency report (score: 85, LOW risk)
- Completes milestone 0 → triggers
releaseTranche()cross-module hook - Investor deposits ETH → round reaches FUNDED
- Reserve verification confirms balance matches deposits
- Watch the Chainlink Pipeline sidebar animate through 8 steps
- See the Metrics Summary update: Solvency 85 (green), Milestone 1/4, Funding round FUNDED
- Click Stage 2 tab, then select "Slowdown" (yellow):
- Submits deteriorating solvency reports (42 → 38, HIGH risk)
- Milestone 1 completes but at inflated cost
- HIGH risk alerts fire
- Score approaches the rescue threshold (25)
- Watch solvency drop to orange, burn rate spike in the metrics
-
Click Stage 3 tab, then select "Rescue Funded" (yellow):
- Submits CRITICAL solvency report (score: 22)
- Rescue chain reaction fires automatically:
SolvencyConsumer.receiveSolvencyReport()→ detects score < 25- Cross-module hook:
initiateRescueFunding(projectId, 22) - Rescue round created: 7.8 ETH target, 39% premium
- Admin deposits 3.042 ETH premium pool
- Investor deposits 7.8 ETH → round FUNDED
- 100% tranche released (rescue rounds skip milestone gates)
- Investor claims: 7.8 + 3.042 = 10.842 ETH (39% profit)
- Reserve verification confirms engine balance
-
Or select "Desperate Measures" (red) for the worst case:
- Score crashes to 10 → 9.0 ETH target, 45% premium
- Investor earns 45% return on rescue capital
- Toggle "Simulate First" checkbox before running Stage 3
- Click "Simulate Rescue" — previews the full rescue chain via Tenderly's simulation bundle API
- See gas estimates, decoded events, and PASS/FAIL for each step before committing
- Click "Execute" to run it live and compare simulation vs actual
- Solvency Score gauge changes color: green (85) → yellow (68) → orange (42) → red (22)
- Rescue rounds appear in the Funding panel with premium badges (+39%, +45%)
- Cross-module hooks fire automatically — no manual intervention between solvency drop and rescue creation
- ERC-1155 tokens minted for each investor deposit (visible in events)
- USD equivalents next to all ETH amounts via live Chainlink ETH/USD Data Feed
- Pipeline sidebar shows all 8 Chainlink workflow steps with type badges (CRE, AI, Contract, Human, Automation)
| What's Real | What's a Gap |
|---|---|
CRE SDK (@chainlink/cre-sdk) with HTTPClient, EVMClient, consensus, cron |
Construction material price feeds (steel, concrete, lumber, labor, fuel) |
| AI Agent (Claude via HTTP in CRE workflow) | Satellite/drone imagery oracle |
Data Feeds (AggregatorV3Interface — ETH/USD on Sepolia) |
Construction escrow PoR feed |
CCIP (CCIPReceiver, Client.EVM2AnyMessage, tested with CCIPLocalSimulator) |
CC SDK (expected early 2026) |
Automation (checkUpkeep/performUpkeep — ready to register) |
|
Proof of Reserves (real AggregatorV3Interface) |
Every gap is documented in-code with CHAINLINK DATA GAP or CHAINLINK CONFIDENTIAL COMPUTE GAP comments.
| Layer | Technology |
|---|---|
| Contracts | Solidity 0.8.24, Foundry, OpenZeppelin v5.5.0 |
| Tokens | ERC-1155 + AccessControl + ReentrancyGuard + Pausable |
| Chainlink | @chainlink/contracts + contracts-ccip + local + cre-sdk |
| Workflows | TypeScript CRE with consensus aggregation |
| Dashboard | Next.js 15, Tailwind 4, viem |
| Testnet | Tenderly Virtual TestNet (Sepolia fork, persistent state) |
| Runtime | Bun (TS), Forge (Solidity) |
| Contract | Address |
|---|---|
| SolvencyConsumer | 0x20c05394477009de055344634d7a6af97c129d25 |
| MilestoneConsumer | 0x27b04578675b5c4c86fb01c48d7f188ded1659fc |
| TokenizedFundingEngine | 0xcb33e2aeea6c37b4b632fbd4ceadc06f0c03eea4 |
| ReserveVerifier | 0xbcb860713bdb23b8be403084fbefe61b40a9948b |
The $13 trillion construction industry has zero decentralized tooling. Project monitoring is manual — quarterly audits, self-reported financials, trust-based verification. By the time anyone notices a project is failing, it's 18-24 months too late.
Revitalization Protocol replaces trust with verification:
- Every solvency assessment is signed by a Chainlink DON
- Every milestone is independently verified via satellite data
- Every funding dollar is tracked on-chain via Proof of Reserves
- Every rescue round uses market incentives to attract emergency capital
For the full technical deep dive (every function, struct, and state variable), see DEEP-DIVE.md.
Willis — Revitalization Protocol
MIT License