Floor

Live security ratings for bridged DeFi collateral: enforced onchain, verifiable in your browser

Floor

Created At

ETHGlobal Mumbai

Project Description

In April 2026 a forged LayerZero message released 116,500 rsETH from Kelp's bridge. The attacked route had been set to a single verifier 12.5 months earlier, and nothing that watches for changes had anything to report, because nothing changed. Lenders kept accepting rsETH as collateral the whole time.

Floor grades the security that is actually in force behind a collateral asset: every bridge route that can create or release it, how many independent verifiers must agree once defaults and optional thresholds are resolved, whether the receive library is pinned, and who can change all of that and how fast. It checks the result against Aave's DAO-approved risk framework and publishes a grade (OK / DEGRADED / UNKNOWN / BREACHED) with every onchain read it came from.

What runs today:

  • Live market: every Aave V3 market (24) read straight from its chain by your browser every minute: which assets are collateral, how much is supplied, and which are bridged by LayerZero. A scheduler checks every chain for bridge config changes every 15 minutes.
  • rsETH the day before the hack grades BREACHED: 24 of 26 inbound routes had one effective verifier.
  • Kelp replay on a mainnet fork with the attacker's real transactions: with Floor in the path, the borrow reverts and $0 is borrowed on Aave; repay and liquidation still work.
  • Inbound-limit probe of 64 LayerZero adapters behind Aave-listed tokens on 8 chains: 31 have no inbound bound, meaning one message releases the whole escrow or mints with no cap.
  • The full loop on public testnets: a Chainlink CRE workflow writes the grade on Ethereum Sepolia, CCIP carries it to Base Sepolia, and Floor's sentinel cuts a real Morpho Vault V2 cap to 0.
  • Anyone can verify a grade in their browser with no Floor server: rating from Arkiv, evidence from Swarm, all 624 reads replayed over Tor through EF Anon-RPC. VERIFIED, 99.7-99.8% of requests anonymised. Flip one byte and it says MISMATCH.

Enforcement is bounded: it only ever reduces new exposure. It never moves funds, never blocks repay, withdraw or liquidation, and turning exposure back on stays with a human. Everything that writes runs on testnets; mainnet is only read.

How it's Made

TypeScript monorepo (pnpm) plus Solidity (Foundry).

Resolver (viem): reads a LayerZero OApp's effective config at a pinned block and cross-checks it on 3 RPC providers. It resolves what the raw settings hide: 0 means "inherit the endpoint default", 255 means NIL, an optional threshold can turn "3 verifiers" into "any 1 of 3", and the receive library may be unpinned. Each scan becomes a canonical evidence bundle (every eth_call with block, target, calldata and result) that is hashed with keccak256.

Rule pack: Aave's Risk Framework encoded as versioned rules. A failed read is UNKNOWN, never a pass.

Inbound probe: on a fork, calls each adapter from the real LayerZero endpoint with a well-formed credit from its configured peer, then classifies the revert reason. It refuses to run unless a non-endpoint caller and a wrong peer are both rejected first.

Chainlink CRE (TS SDK, compiled to WASM): a cron trigger re-reads the evidence on mainnet at the pinned block on every node and refuses to write if the feed understates risk or the evidence is forged; a log trigger on LayerZero's UlnConfigSet reacts to config changes, tested on Kelp's real April 2025 transaction. We had no deploy access, so it ran with cre workflow simulate --broadcast, which wrote rsETH = BREACHED to our FloorRegistry on Sepolia.

Chainlink CCIP 2.0: FloorBroadcaster sends the rating Sepolia -> Base Sepolia; FloorMirror._ccipReceive stores it; FloorSentinel, set as a Morpho Vault V2 sentinel, reads the mirror and decreases the cap. It can only lower caps (fuzz and invariant tests). Fork-tested with chainlink-local on the real lanes.

Arkiv (Rabdi testnet, @arkiv-network/sdk): ratings, 52 routes, the 64-adapter dataset and a flight recorder of rsETH's bridge history, all queried with createdBy(writer) so only our writer's entities are trusted. A re-runnable importer, with a no-key gas preflight.

Swarm: evidence bundles (the Swarm reference and hash live on the Arkiv entity), and the whole site is republished to Swarm on every deploy.

EF Anon-RPC: the browser verifier routes the Arkiv lookup, the Swarm download, the registry check and all chain reads through tor-js (Nym selectable), with a traffic meter that counts every request by route.

Hacky bits: Sepolia's Glamsterdam upgrade made state creation about 5x costlier and Forge underestimated gas, so we deploy with a 900% gas multiplier plus a node eth_estimateGas preflight. Nym drops the Content-Type header (Arkiv answers 415), so Arkiv falls back to direct and the meter shows it. Free RPCs fail in creative ways (429s without CORS, non-JSON-RPC errors), so the transport benches failing providers and retries in 5 rounds.

Web: React + Vite app, a three.js/Tailwind landing, GitHub Actions for CI, the 15-minute watcher, the hourly probe and deploys to GitHub Pages + Swarm.

Tests: 56 Solidity (27 unit incl. fuzz/invariants, 29 fork) plus about 70 TypeScript tests.

background image mobile

Join the mailing list

Get the latest news and updates

Floor | ETHGlobal