Storage Layout
DISCLAIMER // NFA // DYOR
This analysis is based on observations of the contract behavior. We are not smart contract security experts. This document aims to explain what the contract appears to do based on the code. It should not be considered a comprehensive security audit or financial advice. Always verify critical information independently and consult with blockchain security professionals for important decisions.
⊙ generated by robots | curated by humans
| METADATA | |
|---|---|
| Contract Address | 0x00000000...1da8dB (etherscan) |
| Network | Ethereum Mainnet |
| Analysis Date | 2026-07-03 |
Variables
Immutables (SP1_VERIFIER, PROGRAM_VKEY, CHAIN_BINDING, BITCOIN_RELAY_VKEY, HEADER_RELAY, REFLECTION_CONFIRMATIONS, CANONICAL_FACTORY, TETH_BITCOIN_LINK, COLLATERAL_ENGINE) and constants (TREE_LEVELS, ETH_DECIMALS, MAX_POOL_FEE_BPS, MINIMUM_LIQUIDITY, CBTC_ZK_ASSET_ID, REFLECTION_GENESIS_DIGEST, the metadata CIDs) are baked into bytecode and occupy no storage slots.
Slot numbers below are the declaration order of the mutable state. The three fixed-size arrays zeros, filledSubtrees, lockFilledSubtrees, cdpFilledSubtrees each occupy 32 contiguous slots (bytes32[TREE_LEVELS]). Several slot indices (notably crossOutCommitment at 76 and the fast-lane maps at 119/120) are deliberately fixed because off-chain reflection provers read them by eth_getProof — the source comments call these out as a guest-pinned protocol interface. The mid-file slot arithmetic below is approximate; the pinned indices are the load-bearing ones. Verify any specific slot with cast storage.
| SLOT | VARIABLE NAME | TYPE | CURRENT VALUE | PURPOSE |
|---|---|---|---|---|
| 0 | _reentrancy (Solady transient) |
transient | n/a | EIP-1153 reentrancy guard (transient storage; not persistent) |
| 0 | nextLeafIndex |
uint256 | 10 |
Total note leaves ever appended |
| 1 | currentRoot |
bytes32 | 0xf0cf7e9d...026302 |
Latest note-tree root |
| 2–33 | zeros[32] |
bytes32[32] | precomputed | Empty-subtree hashes shared by all three trees |
| 34–65 | filledSubtrees[32] |
bytes32[32] | live | Right-edge cache of the note tree |
| 66 | everKnownRoot |
mapping(bytes32⇒bool) | — | Historical note roots accepted for membership |
| 67 | nullifierSpent |
mapping(bytes32⇒bool) | — | Spent note nullifiers (double-spend guard) |
| 68 | evmNullifiersSpent |
uint256 | live | No-inflation floor: cumulative EVM-homed spends (≤ nextLeafIndex) |
| 69 | _assets |
mapping(bytes32⇒AssetStore) | 6 assets | Asset registry (packed: registered/underlying/poolMinted/decimals in one slot) |
| 70 | escrow |
mapping(bytes32⇒uint256) | escrow[USDC]=2e6 |
Escrowed underlying per asset |
| 71 | pools |
mapping(bytes32⇒Pool) | — | Constant-product AMM pools |
| 72 | depositStatus |
mapping(bytes32⇒uint8) | pending/consumed | Pending-deposit state machine (0/1/2) |
| 73 | bridgeMinted |
mapping(bytes32⇒bool) | — | One-mint-per-burned-note gate |
| 76 | crossOutCommitment |
mapping(bytes32⇒bytes32) | — | ETH→BTC cross-out records (guest-pinned slot; read by eth_getProof) |
| 77 | knownBitcoinRoot |
mapping(bytes32⇒bool) | live | Relay-attested Bitcoin pool roots (bridge-mint authority) |
| 78 | knownBitcoinSpentRoot |
bytes32 | live | Reflected Bitcoin spent-nullifier IMT root |
| 79 | knownBitcoinBurnRoot |
bytes32 | live | Reflected Bitcoin bridge-burn IMT root |
| 80 | knownReflectionDigest |
bytes32 | seeded gen-N | Append-only reflection digest chain head |
| 81 | cbtcBackingSats |
uint256 | 0 |
Σ live self-custody cBTC lock sats |
| 82 | localAssetOf |
mapping(bytes32⇒bytes32) | live | Shared Bitcoin id → local registry key |
| ~83 | lastReflectionBlockHash |
bytes32 | live | Prior attested reflection tip |
| ~83 | lastRelayHeight |
uint64 | live | Highest attested Bitcoin height (monotonic) |
| — | lockNextLeafIndex, lockRoot, lockFilledSubtrees[32], everKnownLockRoot, lockSpent |
adaptor lock set | — | Separate IMT for atomic-swap conditional-spend notes |
| 119 | bitcoinConsumed |
mapping(bytes32⇒bytes32) | — | Fast-lane consumed BTC-homed ν (guest-pinned slot) |
| 120 | bitcoinConsumedCount |
uint256 | live | Fast-lane freshness anchor (guest-pinned slot) |
| ~121 | lpShares |
mapping(bytes32⇒mapping(address⇒uint256)) | — | Public (non-shielded) LP shares |
| — | cbtcLockVBtc/Commitment/Spent/Redeemed, cbtcMinted |
cBTC lock registry | — | Per-lock state + one-shot mint gate |
| — | cdpNextLeafIndex, cdpRoot, cdpFilledSubtrees[32], everKnownCdpRoot, cdpPositionSpent, cdpPositionLeafInserted |
CDP position set | — | Separate IMT for confidential CDP positions |
| 163 | bitcoinConsumedAt |
mapping(uint256⇒bytes32) | — | Enumerable fast-lane consume log (guest-pinned) |
| — | pendingBtcCall |
mapping(bytes32⇒bytes32) | — | Value-free Bitcoin-authorized call commitments |
| — | farmRewardAsset, farmTreasury |
farm escrow | — | Per-controller reward asset pin + budget |
| — | lpOperator |
mapping(address⇒address) | — | Public LP-share operator delegation |
| — | crossOutCount, crossOutAt |
ETH→BTC cross-out log | — | Enumerable cross-out completeness log |