{
  "$schema": "https://degreesofsatoshi.com/encyclopedia/schemas/article-v1.json",
  "schemaVersion": "1.0.0",
  "id": "ethereum-state-and-storage",
  "canonical": "https://degreesofsatoshi.com/encyclopedia/ethereum-state-and-storage/",
  "collection": "ethereum",
  "title": "Ethereum state and storage: what contracts remember",
  "description": "Distinguish Ethereum account state, persistent contract storage, execution memory and calldata, with an example of an ERC-20 balance.",
  "aliases": [],
  "dates": {
    "published": "2026-10-02",
    "modified": "2026-10-02",
    "verified": "2026-10-02T18:12:41.505Z",
    "dataAsOf": "2026-10-02"
  },
  "authorship": {
    "publisher": "Degrees of Satoshi editorial project",
    "process": "AI-assisted research and drafting with a separate automated source-verification pass; no external expert or named human review is implied."
  },
  "quickAnswer": {
    "text": "Ethereum state records account information and contract storage at a particular point in the chain. Persistent storage holds a contract’s data between transactions; execution memory and calldata serve different roles during calls. A token balance is usually a value in the token contract’s accounting, not native ETH stored inside the holder’s account.",
    "claimId": "ethereum-state-and-storage-quick-answer",
    "sourceIds": [
      "eth-accounts",
      "solidity-layout",
      "solidity-delegatecall",
      "erc20"
    ]
  },
  "keyFacts": [
    {
      "label": "Account fields",
      "value": "Account state includes balance, nonce and commitments to code and storage.",
      "sourceIds": [
        "eth-accounts"
      ],
      "id": "account-fields",
      "claimId": "ethereum-state-and-storage-fact-account-fields"
    },
    {
      "label": "Slots",
      "value": "Solidity arranges persistent values into storage slots according to layout rules.",
      "sourceIds": [
        "solidity-layout"
      ],
      "id": "slots",
      "claimId": "ethereum-state-and-storage-fact-slots"
    },
    {
      "label": "Token balance",
      "value": "ERC-20 exposes balances through its contract interface.",
      "sourceIds": [
        "erc20"
      ],
      "id": "token-balance",
      "claimId": "ethereum-state-and-storage-fact-token-balance"
    }
  ],
  "prerequisites": [
    "ethereum-accounts"
  ],
  "sections": [
    {
      "id": "balance",
      "heading": "One address can participate in many ledgers",
      "sourceIds": [
        "eth-accounts",
        "erc20"
      ],
      "paragraphs": [
        "An address has a native ETH balance in account state. A token contract can separately record how many of its own units that address holds. Another token maintains its own accounting.",
        "This is why a token balance query needs the token contract and network, not just the holder’s address."
      ]
    },
    {
      "id": "layout",
      "heading": "Storage has a layout that code must respect",
      "sourceIds": [
        "solidity-layout"
      ],
      "paragraphs": [
        "Small values can share a slot, while mappings and dynamic arrays use derived storage locations. A source-level variable name is not itself an on-chain storage address.",
        "Proxy upgrades must preserve the intended interpretation of existing storage. A new implementation can compile successfully while reading the wrong slot or packed field."
      ]
    },
    {
      "id": "time",
      "heading": "Read state at a stated block",
      "sourceIds": [
        "eth-jsonrpc"
      ],
      "paragraphs": [
        "RPC methods can query state at a selected block or tag when the provider has the necessary data. A value at an earlier block need not equal the latest value.",
        "An execution simulation reads one state context and models changes from it. A public citation should identify the relevant chain and block when the value is time-dependent."
      ]
    }
  ],
  "faq": [
    {
      "question": "Are event logs the same as contract storage?",
      "answer": "No. Logs are emitted execution records, while storage is persistent contract state read and modified by contract code. An indexer may use logs to reconstruct a view, but the two are distinct.",
      "sourceIds": [
        "solidity-delegatecall",
        "solidity-layout"
      ]
    }
  ],
  "claims": [
    {
      "id": "ethereum-state-and-storage-quick-answer",
      "articleSlug": "ethereum-state-and-storage",
      "statement": "Ethereum state records account information and contract storage at a particular point in the chain. Persistent storage holds a contract’s data between transactions; execution memory and calldata serve different roles during calls. A token balance is usually a value in the token contract’s accounting, not native ETH stored inside the holder’s account.",
      "sourceIds": [
        "source-2fb64d6fc5cedb00",
        "source-2b10f2b55ba1af87",
        "source-7399ee01181109d4",
        "source-ac4ad503a55127bb"
      ],
      "sourceLocators": [
        {
          "sourceId": "source-2fb64d6fc5cedb00",
          "locator": "Account types; An account examined; Account creation"
        },
        {
          "sourceId": "source-2b10f2b55ba1af87",
          "locator": "Layout of State Variables; Mappings and Dynamic Arrays"
        },
        {
          "sourceId": "source-7399ee01181109d4",
          "locator": "Delegatecall and Libraries; Storage, Memory and the Stack; Logs; Message Calls"
        },
        {
          "sourceId": "source-ac4ad503a55127bb",
          "locator": "totalSupply; balanceOf; transfer; decimals; approve; allowance; transferFrom; Transfer"
        }
      ],
      "scope": {
        "collection": "ethereum",
        "dataAsOf": "2026-10-02",
        "blockHeight": null
      },
      "qualification": "",
      "evidenceStatus": "documented",
      "verification": {
        "status": "verified",
        "method": "independent automated source review",
        "checkedAt": "2026-10-02T18:12:41.505Z",
        "reviewer": "Codex independent automated reviewer /root/verify_ethereum_100",
        "notes": [
          "Checked account balance/nonce/codeHash/storageRoot; Solidity persistent storage, per-call memory, calldata, packing and mapping-derived locations; ERC-20 balanceOf remains token accounting.",
          "RPC block/tag queries and Solidity Logs distinguish historical state, events and persistent storage. Proxy storage-compatibility concern is a documented-mechanism inference."
        ]
      }
    },
    {
      "id": "ethereum-state-and-storage-fact-account-fields",
      "articleSlug": "ethereum-state-and-storage",
      "statement": "Account fields: Account state includes balance, nonce and commitments to code and storage.",
      "sourceIds": [
        "source-2fb64d6fc5cedb00"
      ],
      "sourceLocators": [
        {
          "sourceId": "source-2fb64d6fc5cedb00",
          "locator": "Account types; An account examined; Account creation"
        }
      ],
      "scope": {
        "collection": "ethereum",
        "dataAsOf": "2026-10-02",
        "blockHeight": null
      },
      "qualification": "",
      "evidenceStatus": "documented",
      "verification": {
        "status": "verified",
        "method": "independent automated source review",
        "checkedAt": "2026-10-02T18:12:41.505Z",
        "reviewer": "Codex independent automated reviewer /root/verify_ethereum_100",
        "notes": [
          "Checked account balance/nonce/codeHash/storageRoot; Solidity persistent storage, per-call memory, calldata, packing and mapping-derived locations; ERC-20 balanceOf remains token accounting.",
          "RPC block/tag queries and Solidity Logs distinguish historical state, events and persistent storage. Proxy storage-compatibility concern is a documented-mechanism inference."
        ]
      }
    },
    {
      "id": "ethereum-state-and-storage-fact-slots",
      "articleSlug": "ethereum-state-and-storage",
      "statement": "Slots: Solidity arranges persistent values into storage slots according to layout rules.",
      "sourceIds": [
        "source-2b10f2b55ba1af87"
      ],
      "sourceLocators": [
        {
          "sourceId": "source-2b10f2b55ba1af87",
          "locator": "Layout of State Variables; Mappings and Dynamic Arrays"
        }
      ],
      "scope": {
        "collection": "ethereum",
        "dataAsOf": "2026-10-02",
        "blockHeight": null
      },
      "qualification": "",
      "evidenceStatus": "documented",
      "verification": {
        "status": "verified",
        "method": "independent automated source review",
        "checkedAt": "2026-10-02T18:12:41.505Z",
        "reviewer": "Codex independent automated reviewer /root/verify_ethereum_100",
        "notes": [
          "Checked account balance/nonce/codeHash/storageRoot; Solidity persistent storage, per-call memory, calldata, packing and mapping-derived locations; ERC-20 balanceOf remains token accounting.",
          "RPC block/tag queries and Solidity Logs distinguish historical state, events and persistent storage. Proxy storage-compatibility concern is a documented-mechanism inference."
        ]
      }
    },
    {
      "id": "ethereum-state-and-storage-fact-token-balance",
      "articleSlug": "ethereum-state-and-storage",
      "statement": "Token balance: ERC-20 exposes balances through its contract interface.",
      "sourceIds": [
        "source-ac4ad503a55127bb"
      ],
      "sourceLocators": [
        {
          "sourceId": "source-ac4ad503a55127bb",
          "locator": "totalSupply; balanceOf; transfer; decimals; approve; allowance; transferFrom; Transfer"
        }
      ],
      "scope": {
        "collection": "ethereum",
        "dataAsOf": "2026-10-02",
        "blockHeight": null
      },
      "qualification": "",
      "evidenceStatus": "documented",
      "verification": {
        "status": "verified",
        "method": "independent automated source review",
        "checkedAt": "2026-10-02T18:12:41.505Z",
        "reviewer": "Codex independent automated reviewer /root/verify_ethereum_100",
        "notes": [
          "Checked account balance/nonce/codeHash/storageRoot; Solidity persistent storage, per-call memory, calldata, packing and mapping-derived locations; ERC-20 balanceOf remains token accounting.",
          "RPC block/tag queries and Solidity Logs distinguish historical state, events and persistent storage. Proxy storage-compatibility concern is a documented-mechanism inference."
        ]
      }
    }
  ],
  "sources": [
    {
      "id": "eth-accounts",
      "label": "Ethereum accounts",
      "publisher": "ethereum.org contributors",
      "url": "https://ethereum.org/en/developers/docs/accounts/",
      "locator": "Account types; An account examined; Account creation",
      "note": "Key-controlled and code-controlled accounts, balances, nonces and storage.",
      "version": null,
      "checkedAt": "2026-10-02T17:03:41.958Z",
      "contentSha256": "262a5694899ae6f774aacae66b13d6929b658ecc9e23c276af9e23ee9455f034",
      "recordId": "source-2fb64d6fc5cedb00"
    },
    {
      "id": "solidity-layout",
      "label": "Layout of State Variables in Storage and Transient Storage",
      "publisher": "Solidity contributors",
      "url": "https://docs.soliditylang.org/en/v0.8.30/internals/layout_in_storage.html",
      "locator": "Layout of State Variables; Mappings and Dynamic Arrays",
      "note": "Persistent storage slots, packing and mappings.",
      "version": "Solidity 0.8.30 documentation",
      "checkedAt": "2026-10-02T17:03:42.820Z",
      "contentSha256": "de5fd67613e71fdb6b46e30bcb1c7e63380ea40d9521e757cfba947a5ee8d738",
      "recordId": "source-2b10f2b55ba1af87"
    },
    {
      "id": "solidity-delegatecall",
      "label": "Solidity: Delegatecall and Libraries",
      "publisher": "Solidity contributors",
      "url": "https://docs.soliditylang.org/en/v0.8.30/introduction-to-smart-contracts.html",
      "locator": "Delegatecall and Libraries; Storage, Memory and the Stack; Logs; Message Calls",
      "note": "Execution uses another contract’s code in the caller’s context and storage.",
      "version": "Solidity 0.8.30 documentation",
      "checkedAt": "2026-10-02T17:03:42.822Z",
      "contentSha256": "9fde27b9eb16bcd47d5e9fb73a80d2d3b288ae7b74ac56b29956267028fe7a55",
      "recordId": "source-7399ee01181109d4"
    },
    {
      "id": "erc20",
      "label": "ERC-20 Token Standard",
      "publisher": "Ethereum Improvement Proposals",
      "url": "https://eips.ethereum.org/EIPS/eip-20",
      "locator": "totalSupply; balanceOf; transfer; decimals; approve; allowance; transferFrom; Transfer",
      "note": "Token supply, displayed units and balance accounting.",
      "version": "ERC-20",
      "checkedAt": "2026-10-02T17:03:45.826Z",
      "contentSha256": "98bda5e4707841a68684879878c4c165fdaa47d89ed69ebf232ab9be06ff050e",
      "recordId": "source-ac4ad503a55127bb"
    },
    {
      "id": "eth-jsonrpc",
      "label": "Ethereum JSON-RPC",
      "publisher": "ethereum.org contributors",
      "url": "https://ethereum.org/en/developers/docs/apis/json-rpc/",
      "locator": "eth_getTransactionByHash; eth_getTransactionReceipt; eth_call; eth_getLogs; eth_getCode; eth_estimateGas; eth_getBalance; eth_getStorageAt; eth_getTransactionCount; default block parameter",
      "note": "RPC response fields, transaction receipts, call simulation and log filtering.",
      "version": null,
      "checkedAt": "2026-10-02T17:03:42.060Z",
      "contentSha256": "ed13997ec4f415dff80883add0730d4e64bcc8c17b95dd4f6c27aed0241a4073",
      "recordId": "source-a5154b4118a3d15f"
    }
  ],
  "related": {
    "articles": [
      "smart-contract-events",
      "delegatecall-explained",
      "ethereum-nodes-rpc",
      "ethereum-access-lists"
    ],
    "dossiers": [],
    "wallets": []
  },
  "revisionHistory": [
    {
      "date": "2026-10-02",
      "kind": "published",
      "summary": "First publication after primary-source research and independent automated verification."
    }
  ],
  "citation": "Degrees of Satoshi editorial project. “Ethereum state and storage: what contracts remember.” Published 2026-10-02; updated 2026-10-02. https://degreesofsatoshi.com/encyclopedia/ethereum-state-and-storage/"
}
