Skip to content

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 0x0000006d...32a9a8 (etherscan)
Network Ethereum Mainnet
Analysis Date 2026-08-09

Variables

Values were read directly with cast storage at block 25,714,806 and cross-checked against the public getters. Slots 0 through 20 hold everything this contract declares. The ERC721 ownership, balance and approval records do not live here — the Solady base contract writes them to slots derived by hashing, outside the sequential range a deriving contract's own variables occupy.

SLOT VARIABLE NAME TYPE CURRENT VALUE PURPOSE
0 renderer address 0x0000006b...E29979 (etherscan) Serves html(). DAO-replaceable, already swapped once
1 [0:19] receiptArt address 0x0000007f...DD1eD9 (etherscan) Serves tokenURI(). DAO-replaceable, original value
1 [20:27] halfLife uint64 259200 Conviction decay constant, 3 days
1 [28] domainClaimed bool true zorg.wei has been pulled into the contract
1 [29] rolesInstalled bool false Emergency exec credential not yet minted
1 [30] execRoleRevoked bool false Exec role not permanently retired
1 [31] paused bool false System accepting new bonds and allocation increases
2 _executing bool false Reentrancy flag. Occupies a whole slot of its own — slot 1 is exactly full
3 _expectedZorgzId uint256 0 Escrow gate, stored as id + 1. Zero means "expecting nothing". Correctly cleared
4 bondedWeight mapping(uint256 => uint256) base slot ZORG escrowed per receipt
5 allocatedByBond mapping(uint256 => uint256) base slot Sum of a receipt's allocations
6 allocationOf mapping(uint256 => mapping(uint256 => uint256)) base slot Per-receipt, per-listing allocation
7 lockTiers mapping(uint8 => LockTier) base slot The DAO-set tier menu
8 receiptLocks mapping(uint256 => ReceiptLock) base slot Terms snapshotted onto each receipt
9 eternalBonds mapping(uint256 => bool) base slot Permanent-position flag
10 ethBondTerms.minimumBond uint256 10000000000000000 (0.01 ETH) Entry cost for new bonds
11 [0:7] ethBondTerms.maturity uint64 604800 (7 days) Principal maturity offered to new bonds
11 [8:9] ethBondTerms.earlyExitTaxBps uint16 2000 (20%) Penalty on redeeming before maturity
11 [10:11] ethBondTerms.treasuryShareBps uint16 5000 (50%) Treasury's cut of that penalty
12 ethBonds mapping(uint256 => EthBond) base slot Per-receipt ETH principal and loyalty checkpoint
13 totalLoyaltyWeight uint256 371470e18 Sum of all bonded ZORG. Matches the contract's ZORG balance exactly
14 loyaltyRewardPerWeight uint256 0 Reward accumulator, scaled by 1e27. Still zero — no early exit has occurred
15 loyaltyRewardReserve uint256 0 ETH set aside for unclaimed loyalty
16 totalEthPrincipal uint256 5e16 (0.05 ETH) Refundable principal across 5 non-eternal bonds
17 treasuryEth uint256 2e16 (0.02 ETH) DAO-spendable. Entirely from the two eternalizations
18 totalEthCredits uint256 0 ETH credited but not yet withdrawn
19 ethCredits mapping(address => uint256) base slot Pull-payment balances
20 _listingSupport mapping(uint256 => ListingSupport) base slot Per-listing weight, conviction accumulator, and lastUpdated

Immutables and Constants

These are compiled into the runtime bytecode rather than stored, so no slot holds them and no transaction can change them.

NAME TYPE VALUE
dao address 0x5E58BA0e...74053E (etherscan)
shares address 0x00a6bA94...2dCb12 (etherscan)
zorgz IERC721Zorgz 0x00000000...6b63A6 (etherscan)
weiNames IWeiNames 0x00000000...c242EB (etherscan)
tokenList address 0x00000060...531524 (etherscan)
zorgWeiId uint256 computeId("zorg.wei")
execZorgWeiId uint256 computeId("exec.zorg.wei")
DOMAIN string "zorg.wei"
BPS uint16 10000
MAX_BOOST_BPS uint16 15000 (1.50× ceiling)
MAX_LOCK_TIER uint8 3
MAX_EXIT_DELAY / MAX_ETH_MATURITY uint64 365 days each
ETERNAL_MIN_ZORG uint256 10000 ether
REWARD_SCALE uint256 1e27

Notes on the Layout

  • Slot 1 packs an address (20 bytes), a uint64 (8) and four of the five booleans (4) into exactly 32 bytes. The fifth, _executing, has nowhere to go and takes slot 2 alone, so the reentrancy guard pays a cold SSTORE on every guarded call rather than a warm one. EIP-1153 transient storage would avoid the persistent slot entirely.
  • _expectedZorgzId stores id + 1 rather than the raw id so that zero can mean "expecting nothing" while token id 0 remains bondable. Receipt id 77 and others confirm low ids are in use.
  • The three per-receipt records — bondedWeight, receiptLocks, ethBonds — are separate mappings keyed by the same id rather than one struct. unbond deletes all four (including eternalBonds) explicitly.
  • ListingSupport packs lastUpdated (uint64) alone in its first slot with conviction and weight each taking a full slot after it, so each listing costs three slots once touched.

Diagrams

graph TB
    subgraph Config["Config & Flags — Slots 0-3"]
        S0["Slot 0: renderer<br/>0x0000006b...E29979"]
        S1["Slot 1: receiptArt + halfLife<br/>+ domainClaimed, rolesInstalled,<br/>execRoleRevoked, paused"]
        S2["Slot 2: _executing<br/>reentrancy flag"]
        S3["Slot 3: _expectedZorgzId<br/>escrow gate"]
    end

    subgraph Bonds["Per-Receipt Records — Slots 4-9, 12"]
        S4["Slot 4: bondedWeight"]
        S5["Slot 5: allocatedByBond"]
        S6["Slot 6: allocationOf"]
        S7["Slot 7: lockTiers (menu)"]
        S8["Slot 8: receiptLocks"]
        S9["Slot 9: eternalBonds"]
        S12["Slot 12: ethBonds"]
    end

    subgraph Terms["ETH Bond Terms — Slots 10-11"]
        S10["Slot 10: minimumBond<br/>0.01 ETH"]
        S11["Slot 11: maturity 7d<br/>tax 2000bps, treasury 5000bps"]
    end

    subgraph Totals["Global Totals — Slots 13-19"]
        S13["Slot 13: totalLoyaltyWeight<br/>371,470 ZORG"]
        S14["Slot 14: loyaltyRewardPerWeight = 0"]
        S15["Slot 15: loyaltyRewardReserve = 0"]
        S16["Slot 16: totalEthPrincipal<br/>0.05 ETH"]
        S17["Slot 17: treasuryEth<br/>0.02 ETH"]
        S18["Slot 18: totalEthCredits = 0"]
        S19["Slot 19: ethCredits"]
    end

    subgraph Conv["Conviction Ledger — Slot 20"]
        S20["Slot 20: _listingSupport<br/>lastUpdated, conviction, weight"]
    end

    subgraph Solady["ERC721 State — hashed slots"]
        SX["ownerOf, balanceOf, approvals<br/>outside the sequential range"]
    end

    Config --> Bonds --> Terms --> Totals --> Conv
    Conv -.-> Solady

    style S20 fill:#e1f0ff
    style S13 fill:#ffe1e1
    style S17 fill:#fff4d6
    style SX fill:#eeeeee

Solvency Check

The ETH invariant asserted inside _execute can be verified independently against the contract's actual balance.

graph LR
    A["totalEthPrincipal<br/>0.05 ETH"] --> S["_ethLiability()<br/>0.07 ETH"]
    B["loyaltyRewardReserve<br/>0 ETH"] --> S
    C["treasuryEth<br/>0.02 ETH"] --> S
    D["totalEthCredits<br/>0 ETH"] --> S
    S --> E["address(this).balance<br/>0.07 ETH"]

    style S fill:#e1f0ff
    style E fill:#e8f5e9

At block 25,714,806 the recorded liabilities sum to exactly the held balance, with no surplus and no shortfall. The ZORG side matches too: totalLoyaltyWeight and balanceOf(shares, governor) both read 371,470 ZORG.