Skip to content

Gas Schedule

Ashen gas is denominated in abstract cycles and charged by the VM during execution. The canonical schedule lives in the repo at:

  • docs/gas-schedules/gas-v1.json (machine-readable)
  • docs/gas-schedules/gas-v1.md (human-readable)

This page summarizes the rules and how to read the schedule.

  • For any per_32b component, compute words32 = ceil(bytes / 32) and charge words32 * per_32b.
  • For per_32b_input / per_32b_output, apply the rule to input/output sizes independently.
  • Syscalls (including precompiles) always charge a dispatch base plus a syscall-specific cost.

The schedule is grouped into three tables:

  1. Opcode costs: base cost for ALU, shifts, branches, mul/div.
  2. Memory/page costs: warm/cold load/store costs, page penalties, and the predecode byte charge.
  3. Syscalls/precompiles: storage, calls, hashing, signature verification, and chain context queries.
  • Cold storage reads are more expensive than warm reads.
  • Writes are charged on written value size.
  • Range scans charge on query bytes and returned data bytes.
  • call and static_call charge on calldata + return bytes.
  • create charges on code bytes.
  • Hashing: keccak256, sha2_256, blake3
  • Signature verification: verify_sig
  • VRF verification: verify_vrf_ed25519

Low-cost syscalls for balance and block metadata: gas_limit, balance_of, self_balance, block_hash, block_header.

Storage write of 100 bytes:

  • words32 = ceil(100 / 32) = 4
  • storage_write = dispatch_base (30) + base (400) + 4 * per_32b (8)
  • Total = 30 + 400 + 32 = 462

Refer to docs/gas-schedules/gas-v1.md for the complete table and docs/gas-schedules/gas-v1.json for the canonical machine-readable source.