Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

oft-verify

re-run any LayerZero OFT bridge's "1:1 backed" claim from finalized chain state. no trust, no dashboard - just the two chains.

An OFT that bridges from base to another chain locks the original in an adapter and mints a copy on the destination. every project says "backed 1:1, trust the scan." a scan shows delivery. this shows solvency: is the locked balance still >= everything minted, right now, at finalized blocks?

the invariant

one-sided solvency, not naive equality:

locked(adapter, source)  >=  Σ minted(all peer chains)   @ finalized blocks
  • PASS - healthy surplus. inflight messages transiently make locked > minted; we net them out by guid before judging.
  • FAIL - a deficit that survives inflight reconciliation. the unbacked-mint alarm (see Kelp $292M, StakeDAO).
  • UNVERIFIABLE - honest abstain (mint-burn adapter with no lockbox, non-plain-OFT peer, unreadable config). never a fabricated pass.

two things balance-checkers miss, both checked here:

  1. all peers summed - a 2-chain check understates liabilities. we enumerate peers() and sum every remote supply.
  2. security config - a lockbox can look solvent while a 1-of-1 DVN forges the mint (Kelp). we report DVN quorum + owner/mint/upgrade privileges next to the number.

run it

npm i
BASE_RPC_URL=<your base rpc> node --experimental-strip-types src/cli.ts clawbank

# or any adapter address:
BASE_RPC_URL=<...> node --experimental-strip-types src/cli.ts 0x<adapter> --chain 8453

robinhood RPC defaults to the public endpoint (ROBINHOOD_RPC_URL to override). output: the verdict, locked vs minted in shared decimals, surplus, per-direction DVN quorum, privileges digest, and the finalized blocks sampled. read-only - no keys, nothing written.

example

$ oft-verify clawbank
VERDICT: PASS
locked     1,271,567,570.85   base
minted_sum 1,271,546,570.85   robinhood (all peers)
surplus    +21,000
dvn 2-of-2 both directions · lockbox solvent · no unbacked mint

don't trust the green PASS. re-run it.


built by aiport - read the chain, not the label.

About

re-run any LayerZero OFT bridge's "1:1 backed" claim from finalized chain state - locked on source vs minted across all peers.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages