{
  "id": 8058,
  "title": "EIP-8058: Contract Bytecode Deduplication Discount",
  "status": "Draft",
  "type": "Standards Track",
  "category": "Core",
  "summary": "If you deploy a contract that's exactly the same as one that already exists and you include that existing contract's address in your transaction's access list, you don't pay the per-byte code deposit again—the new contract just points to the already-stored code.",
  "impacts": [
    "Cheaper deployments for apps that spin up many identical contracts (e.g., factory wallets or clones); no change to how transactions are sent.",
    "Can cut deployment costs for factory/clone patterns by adding a reference contract address to the access list; update builders and deploy scripts to include access lists and handle cases without a discount.",
    "Update gas estimation and access-list generation to surface potential deduplication discounts and clearly indicate when the discount will or won't apply.",
    "Estimators, simulators, and tracers should build the CodeHash Access-Set from the access list at tx start and report when deduplication triggers; consider dual estimates (with/without discount).",
    "Rollups mirroring L1 gas semantics may adopt this to lower duplicate deployment costs; coordinate with any increased GAS_CODE_DEPOSIT (e.g., per EIP-8037) and access-list handling in sequencers.",
    "Minimal runtime overhead; implement building the CodeHash Access-Set and conditional charging; no trie/schema changes. Same-block ordering effects are deterministic.",
    "No consensus changes on the CL—standard fork coordination only.",
    "Implement access-list–based set W, hash check on successful CREATE/CREATE2, and conditional code-deposit charging per EIP-2930/2929. Also, consider implementing a code -> address reverse index to avoid complexity to users on finding the required address.",
    "Aligns gas costs with actual storage usage for duplicate deployments.",
    "Deterministic and consensus-safe: depends on access lists and current state, not local databases.",
    "No new transaction format or reverse indexes; reuses EIP-2930 infrastructure.",
    "Can yield major savings when GAS_CODE_DEPOSIT is high (e.g., under EIP-8037).",
    "Encourages bytecode reuse and efficient factory/clone patterns."
  ],
  "discussion_url": "https://ethereum-magicians.org/t/eip-8058-contract-bytecode-deduplication-discount/25933",
  "source_markdown_url": "https://github.com/ethereum/EIPs/blob/master/EIPS/eip-8058.md",
  "canonical_url": "/latest/eips/8058.json",
  "markdown_url": "/latest/eips/8058.md",
  "citations": [
    {
      "recordId": "eip-8058",
      "artifactPath": "normalized/8058.json",
      "url": "/records/proposal/eip-8058/normalized/8058.json",
      "label": "EIP-8058: Contract Bytecode Deduplication Discount",
      "snippet": "If you deploy a contract that's exactly the same as one that already exists and you include that existing contract's address in your transaction's access list, you don't pay the per-byte code deposit again—the new contra"
    }
  ]
}
