Skip to content
Monpediaby Unity Nodes
ClosedPull Request

Add MIP-20: Linear Code-Loading Costs

by BaltoliCreated Nov 4, 2026monad-crypto/MIPs

ReferencesMIP-20

Adds MIP-20 (Draft), which replaces the flat cold code-load price with a cost linear in code size.

  • Code-loading operations (calls, EXTCODECOPY, the transaction to) charge G_code = CODE_LOAD_BASE_COST + CODE_LOAD_WORD_COST * ceil(|C| / 32) before loading code.
  • A new warm code set A_c, keyed by code hash and separate from warm accounts, prevents repeated charges for the same code within a transaction.
  • COLD_ACCOUNT_ACCESS_COST is repriced to cover only the account access and code size lookup, so EXTCODESIZE does not depend on code size.

The number 20 is assigned speculatively by an editor, so this skips the usual merge, assign and edit cycle.

Still open before Review:

  • discussions-to points at the forum root until a thread is created.
  • Pricing constants, Gas Benchmarking rationale, Test Cases and Reference Implementation are TODO, pending benchmarking.

馃 Generated with Claude Code

https://claude.ai/code/session_01JvndnHNbjUynZr3HS1MhH8