Lotus V2 resource pricing: prior art, principles and recommended values
On this page
Status: research for an owner decision (2026-11-18, revised the same day after owner feedback). It changes no normative file and no code. It builds on the resource calibration (called "the calibration note" below) and takes these owner decisions as given:
- 2 cu per wire byte (2026-11-13);
- no tail floor or ceiling:
T_minandT_maxare removed, so the tail isT = isqrt(T_g² · W / W_g)with no clip (2026-11-18); k_boot = 20,B_0 = 150,000 XPI,R_0 = 2^20 · B_0,T_g = 378 XPI;- the calibration note's recommended values, approved on 2026-11-18;
- the cu is a ratio unit, not a speed unit. The atom price of a cu comes from the burn floor and the EMA. Throughput and validator requirements are settled by the 100k tx/s benchmark, not by the cu schedule (2026-11-18).
Every number here comes from the calibration note's measurements and its reference module (tools/lotus-v2-reference/lotus_v2_reference/resources.py), used read-only. See Reproduce.
What the revision changed:
- The cu is now defined by a reference operation, not by a machine (section 1).
- Freeze gate 1 is now a ratio cross-check on any second machine, not an x86 run.
- The as-built state-key price (657 cu) and the 33,800 tx/s figure are withdrawn. They were measured on the
lotus_v2library path, not on the node's block path.
Decision summary
The unit. 1 cu = one reference hash H_ref: one tagged BLAKE3 hash whose message takes two compressions. That is the shape of every state-tree node hash and of the 67-byte tagged preimages the schedule already charges. Every price is
weight(op) = ⌈1.5 × max over measured machines of t(op) / t(H_ref)⌉
The measured set is the M5 Max today. On it, t(H_ref) = 99.6 ns, within 0.4% of the 100 ns the calibration note used as its unit. So every approved weight is unchanged except Ed25519, which rises from 49,200 to 49,400 cu. Absolute speed drops out: a faster or slower machine changes the atom price of nothing. Only a machine on which some operation is slower relative to H_ref raises that operation's weight.
The approach. Price each operation by its worst measured ratio to H_ref, with a 1.5× margin for ratio variance between machines. Price each wire byte at a design ratio, 2 H_ref. Bound the worst block separately for each resource, as a multiple of a design block. Let the burn-floor shifts decide how many atoms a cu costs.
The prior art supports this:
- Ethereum's 2016 Shanghai attacks, Bitcoin's quadratic hashing, Cardano's 2024 reference-script attack and Zcash's 2022 spam were all ratio errors. One operation was priced far below its cost relative to everything else. None of them was caused by hardware being slower than expected.
- Lotus can raise a price later by soft fork (
C_enforceabove the frozenC_account, P05). Lowering one is a hard fork. Err high at genesis.
| Constant | Recommended (in cu = H_ref) |
Ratio on the M5 (t ÷ t(H_ref)) |
Why | Risk if wrong |
|---|---|---|---|---|
| Unit | 1 cu = one two-compression tagged BLAKE3 hash | 1 | It appears in the schedule already. It is built from 32-bit add, xor and rotate, which cost about the same everywhere. It sits in the middle of the cost range. | If H_ref is unusually fast on some machine, many ratios rise there. The margin covers 1.5×, and a cross-check finds anything more. |
| Wire byte | 2 cu (owner decision), for every serialized byte, including the header, count and frame bytes in C_envelope; resolved coin bytes 1 cu |
design ratio, not measured | A byte is relayed by everyone and archived forever, so it is priced at 2 node hashes. This halves the bytes a given burn buys compared with 1 cu per byte. | A ratio set too low makes byte-heavy blocks the cheapest way to load validators (Ethereum, EIP-7623). |
| BIP340, ECDSA secp256k1 | 210 | 135.7, 133.2 | ⌈1.5 × 136.7⌉ = 206 with the signing preimage | The sig/hash ratio differs between architectures (64-bit multiply versus 32-bit ARX). The second-machine check measures exactly this. |
| ECDSA P-256 | 620 | 410.8 | ⌈1.5 × 410.8⌉ = 617 | The OpenSSL version and platform change the ratio. |
| Ed25519 (profile 2) | 49,400 (was 49,200) | 32,885 | ⌈1.5 × 32,885⌉ = 49,328. Price the strict verifier as built. | Overpricing a niche profile costs little. |
| Hash and VM opcodes | The calibration note's per-KiB table, unchanged | 77 cases | All 77 measured cases stay covered in the new unit (refitted). | Unmeasured opcodes keep conservative defaults and can be raised by soft fork. |
Invocation, MAX_INVOCATION_COST |
6 + 1 per script byte; cap 2^22 | setup 3.38 | ⌈1.5 × 3.38⌉ = 6 | Keep wallet scripts far below the cap, so a later price rise cannot leave existing coins unspendable (as EIP-1884 broke contracts). |
Hash charge h(n) |
1 cu per 64-byte block, 64 bytes reserved for the tag | 1 for 2 compressions | Charges H_ref itself at 3 cu, so it carries more than 1.5× margin |
None found |
| Storage read | 64 cu per resolved coin and per state key (approved) | warm MDBX read 6.4. Cold read not measured. | This is about 10 warm reads. It is held at the approved value until cold reads are measured as a ratio. | Cold state is the classic underpricing (EIP-2929). Pending, with the state key. |
| State key | Pending measurement. The approved 27-level charge (87 CPU + 64 read = 151 cu) is a placeholder only. | not yet measured on the node path | The node validates through SmtBatchUpdateParallel (prefix-compressed tree, deferred dirty-node hashing, up to 16 shards in parallel). It has not been measured. |
This is the largest open pricing risk (gate 3). |
C_envelope |
286 + 2F + 7N | The approved 148 + F + 7N, with 2 cu per byte applied to the header, count and frame bytes | Negligible | |
S_tx_knee |
18 | Payments pay +0.5%, and a 100-input consolidation +34% | Low | |
w |
10 | The EMA follows sustained load, and the quadratic term prices spikes | 8 reprices honest surges too fast; 12 gives an attacker days at the floor price | |
E_min = E_0 |
2^34 | 4 atoms per cu on a quiet chain. Payments pay only the byte fee up to about 107,000 tx/s with the approved schedule. | Lower makes CPU-dense spam cheap | |
S_linear |
32 | G1, G2 and G3 hold (below) | 33+ weakens sustained pricing; 31 or less raises fees at the design load | |
S_quad |
32 | A 2× spike from a quiet chain burns 418,746 XPI. Keep S_quad ≤ 33 for the u128 precheck. |
34 halves the spike guard |
Worst blocks, as multiples of a design block (one launch subsidy of burn, approved schedule, 2 cu per byte; from the calibration note's search). These are ratios, so the 100k tx/s benchmark scales them directly:
- CPU: about 2.8× a design block's CPU work (a P-256 loop);
- bytes: about 2.7× (about 8.3 GB of 8 KiB witness arguments, against 3.0 GB for a design block);
- storage reads: about 1.4× (1-input, 64-output transactions).
If the benchmark shows that a design block validates within the block interval with a factor of 3 to spare, no budget's worst block exceeds it.
G3 and the EMA bound without T_min and T_max (section 2). The redefinition does not change these.
- The EMA cannot overflow u64, whatever the issuance. E never exceeds the largest block cost seen, and blocks of 2^64 cu or more are rejected as unpayable.
- G3 holds, restated against the current tail and recent burn. The smallest possible tail, at
POW_LIMITwork, is 0.584 XPI. At that tail, a coinbase-only block (about 1,438 cu) can pay its floor unless about 3.9R_0were burned within the EMA's memory. That is the proved bound; the cheapest attack found needs about 13.7R_0. Everything issued through year 4 is 0.64R_0. - No cap or retune is needed. The levers are
S_linear(+1 withE_mindoubled needs 4× the burn) andw(+1 needs 2×).E_mindoes not help. - The pending state-key measurement matters here. If it raised a coinbase-only block to about 3,500 cu, the proved threshold would fall to about 0.65
R_0.S_linear = 33withE_min = 2^35would restore about 2.8R_0.
Freeze gates:
| Gate | Can research close it? | What is left |
|---|---|---|
| 1. Ratio cross-check on any second machine | No, it needs a measurement, of any architecture. | Run the existing harness on one more machine. Until then, the 1.5× margin covers ratio variance between machines. |
| 2. Ed25519 | Yes, by decision: freeze 49,400. | Nothing |
| 3. State-key price | No. | Measure SmtBatchUpdateParallel (src/primitives/block.cpp) at 10M+ coins, warm and cold, on 1 to 16 threads, as ratios to H_ref. Include the cold storage read. |
| 4. Bandwidth | The decision is closed by 2 cu per byte. | Bytes per block at design and worst case are now ratios that the 100k benchmark checks. |
Throughput (section 5). A cu price is an exchange rate between operations and says nothing about speed. The atom price of a cu comes from the burn floor. How fast blocks validate is the 100k tx/s benchmark's question.
The 120k+ tx/s figures were bursts of 1,000 to 6,000 transactions on a small, fully cached state, timing one stage. They show the hot path is fast, not what is sustained. The sustained rate on a large state, and on the node's actual path, is what the benchmark has to show.
1. The unit: 1 cu = one reference hash
Why a reference operation, not a machine
The calibration note's unit, "1 cu = 100 ns of one M5 Max core", tied every weight to one machine's absolute speed. It then needed an estimate of how fast a reference server is (the old gate 1). But nothing in consensus uses absolute speed:
- The atom price of a cu is set by the burn floor,
(C · max(E, E_min)) >> S_linearandC² >> S_quad. Those shifts were fitted against block costs in cu, not seconds. - If every operation ran twice as fast, every weight would stay the same, and so would every fee and burn.
- How much a validator can do in 120 s is a separate question, about validator requirements. The 100k tx/s benchmark answers it.
What consensus does depend on is the ratio between operations. That is the price of one kind of work in terms of another, and an attacker exploits a wrong ratio by buying only the underpriced work.
The choice
H_ref is one tagged BLAKE3 hash whose message takes two compressions. It is measured as the harness case tagged/67 (a 67-byte message): 99.6 ns on the M5 Max. Option C's 99-byte tree-node preimage is also two compressions (P05).
Why this operation:
- It is already in the schedule, and it is the most frequent CPU operation in it. Every state-tree node, every outpoint key and most of a transaction's identity hashing is this shape. The hash charge
h(n)stays exact: 1 cu per 64-byte block. - It is stable across architectures. A single BLAKE3 compression is 32-bit additions, xors and rotations, which every 64-bit CPU runs at about one per cycle per lane. For a single block it needs no SIMD; SIMD speeds up only messages above about 1 KiB. A signature check depends on 64×64-bit multiplies and on library assembly, which vary more between platforms, so it is a worse reference.
- It sits in the middle of the cost range. A byte copy is a small fraction of it and a signature check about 137 of it, so neither the cheap nor the expensive end dominates the rounding.
- The approved numbers stay put. 99.6 ns is within 0.4% of the old 100 ns unit.
The alternative, "1 cu = 1/128 of a BIP340 verification" (88 ns on the M5), would raise every CPU weight by about 13% and tie the unit to the operation whose cross-platform ratio is least certain.
The pricing rule
weight(op) = ⌈ m × max_{machine ∈ measured set} ( t_machine(op) / t_machine(H_ref) ) ⌉, m = 1.5
- The measured set is any collection of machines, with no particular architecture required. Today it is the M5 Max only.
- Adding a machine can only raise weights, and only for operations whose ratio to
H_refis worse on it. A machine that is uniformly slower changes nothing. If BIP340 takes 160H_refon some x86 server instead of 137, BIP340 rises to ⌈1.5 × 160⌉ = 240, and every other weight stays put unless its own ratio also worsened. - If
H_refitself is relatively slow on the new machine, every ratio there falls and nothing changes. If it is relatively fast, several weights may rise. That is the one systematic risk in the choice, and the cross-check measures it. - The margin 1.5 is a bound on ratio variance. It covers an operation being up to 1.5 times more expensive, relative to a node hash, on some machine than on the measured ones, plus run-to-run noise (1.6% median, 7.6% worst in the repeat run).
The approved values in the new unit
Refitting all 77 measured cases with t(H_ref) = 99.6 ns changes the required value of 11 cases by 1 to 0.4%:
| Item | Ratio | Needed (⌈1.5 × ratio⌉) | Approved | New |
|---|---|---|---|---|
CHECKSIG type 1 with its preimage |
136.7 | 206 | 210 + key push 2 | 210 (unchanged) |
CHECKDATASIG BIP340 / ECDSA secp256k1 |
135.7 / 133.2 | 204 / 200 | 210 | 210 |
CHECKDATASIG P-256 |
410.8 | 617 | 620 | 620 |
CHECKDATASIG Ed25519 (as built) |
32,885 | 49,328 | 49,200 | 49,400 |
| Invocation setup | 3.38 | 6 | 6 | 6 |
LOG 1,024 B / SQRT 1,024 B / MUL 1,024 × 1,024 |
7,114 / 621 / 149 | 10,671 / 931 / 224 | charged 11,376 / 2,215 / 478 | unchanged |
LESSTHAN 1,024 B, DIV 1,024 / 1,024, LOG 128 B |
50 / 63 / 193 | charged 53 / 1,610 / 198 | unchanged | |
| Transaction preparation, 1-in/256-out | 1,158 | outer hashes charge 2,086 | unchanged | |
| Every other measured case | unchanged | unchanged |
Only Ed25519 crosses its charge, by 0.26%. Every L(tx), C_tx, C_envelope, burn and fee figure in the calibration note and below is therefore unchanged.
What a byte is worth
2 cu per wire byte means one byte is priced like two node hashes, or four BLAKE3 compressions. That is not a measurement. Bandwidth and archive storage cannot be expressed as a CPU ratio on one machine. It is a design ratio, set by the owner at twice P05's normalisation.
What the ratio does:
- In a 1-in/2-out payment, 502 of its 1,437 cu are for bytes and the rest is compute and state. The byte fee and the cu floor stay in the same proportion as when the schedule was approved.
- It halves the bytes that one atom of burn can buy relative to compute. The worst block bought with a launch subsidy carries about 8.3 GB rather than 16.6 GB, about 2.7 design blocks of bytes.
If the 100k benchmark shows that relaying bytes is the binding constraint at design load, the byte ratio is the lever. Raising it is a soft fork on C_enforce.
Why ratio variance is the real risk
The 2016 Shanghai attacks are the clearest example. In September and October 2016, Ethereum blocks took tens of seconds to process, and some nodes could not keep up. Ethereum hardware was not slow. The problem was that EXTCODESIZE cost 20 gas, the same order as arithmetic, while it forced a disk read hundreds of times more expensive than an ADD. An attacker filled blocks with nothing else and bought disk time at a 10 to 35 times discount. Ethereum's fix, EIP-150, changed that ratio: it raised state reads by 10 to 35 times and left the rest of the schedule alone. The block gas limit, and so the absolute budget, did not cause the attack and was not the fix.
The same holds for every case in section 3:
- Bitcoin's quadratic sighash was a hashing-to-byte ratio that grew with transaction size.
- Cardano's 2024 reference scripts had a deserialisation-to-fee ratio of infinity.
- Broken Metre's programs ran 100 times slower than typical contracts per unit of gas: a ratio again.
When the machines are faster or slower overall, the operators' hardware requirements change, not the security of the price schedule. A ratio error lets an attacker concentrate a block on one operation and make validation take ratio-error times longer than the same cu of normal traffic, on every machine. That is what the margin and the cross-check guard against.
2. G3 and the EMA bound without T_min and T_max
Unchanged by the redefinition, because it is stated in cu and atoms.
What changed
The calibration note proved two things using the tail clip:
- The EMA bound.
E < 2^43.75, usingR_0 + 2^32 · T_maxas the burn budget. - G3. A coinbase-only block can pay its floor from
T_min = 94.5 XPIat that E.
Without the clip, both inputs are gone.
The EMA never overflows, independent of issuance
E' = E − (E >> w) + (C >> w) keeps E at or below max(E, C). If E ≤ X and C ≤ X, then E' ≤ X − ⌊X/2^w⌋ + ⌊X/2^w⌋ = X, because E − ⌊E/2^w⌋ never decreases as E grows. So E_n ≤ max(E_0, max_k C_k) < 2^64, given the calibration note's rejection of blocks of 2^64 cu or more.
That precheck assumes a u64 subsidy. With no clip, T_n reaches MAX_MONEY at about 1.5 × 10^20 times genesis work and exceeds u64 at about 2.4 × 10^21 times. The spec must say what happens there; a checked-overflow rejection would be a cap by another name. This is outside this note.
Bounding E by recent burn
With a = 2^−w and decay weights d_k = (1 − a)^age:
E_n ≤ E_0 + a·Σ d_k C_k + 2^w
a·Σ d_k C_k ≤ sqrt(a) · sqrt(Σ d_k C_k²) (Cauchy–Schwarz, Σ d_k ≤ 1/a)
C_k² ≤ 2^S_quad · (P_k + 1) (each block burns P_k ≥ C_k² >> S_quad)
⇒ E_n ≤ E_0 + sqrt(2^(S_quad − w) · (D_n + 2^w)) + 2^w, D_n = Σ d_k P_k
D_n is the decayed burn: each block's burn weighted by (1 − 2^−10)^age. It needs no issuance cap. At a steady design load, D is about 1.4 × 10^14 atoms and the bound is about 2.4 × 10^10 plus the decayed E_0, against an actual E of 1.7 × 10^10.
For comparison with the old statement, the lifetime bound at a constant work level:
Work (× W_g) |
Tail | Lifetime budget over 2^32 blocks | E bound | Coinbase-only floor as a share of the tail |
|---|---|---|---|---|
| 1/16 | 94.5 XPI | 2^59.0 | 2^40.5 | 0.50% |
| 1 | 378 XPI | 2^60.6 | 2^41.3 | 0.22% |
| 1,024 | 12,096 XPI | 2^65.5 | 2^43.75 | 0.037% |
| 3.3 × 10^8 | 6.9 million XPI | 2^74.6 | 2^48.3 | 0.0016% |
| 1.5 × 10^20 | 4.6 × 10^12 XPI | 2^94 | 2^58 | 0.000002% |
When work is steady, the guarantee gets stronger as work grows: the floor's share of the tail falls as 1/sqrt(T). The only danger is a tail that is low now after a burn that was large recently.
G3 restated
A coinbase-only block at step n is affordable if T_n ≥ K + ((C_cb · max(E_n, E_min)) >> S_linear) + (C_cb² >> S_quad). That holds whenever the decayed burn is below
D*(T) = ((T − K − (C_cb² >> S_quad)) · 2^S_linear / C_cb − E_0 − 2^w)² · 2^(w − S_quad)
The smallest possible tail is at POW_LIMIT work. With the placeholder 2^224 − 1, the work per block is 2^32, which is 2.39 × 10^−6 of W_g, so T ≥ isqrt(T_g² · 2^32 / W_g) = 583,895 atoms (0.584 XPI). The static part is easily affordable at that tail: 5,752 atoms of floor, plus K of 37,700 atoms at 100,000 atoms/kB or 377 at 1,000.
The decayed burn that breaks G3 (MIN_FEE_PER_KB = 100,000, shifts (32, 32), w = 10):
| Tail now | Coinbase-only block | Proved D* |
Cheapest attack found |
|---|---|---|---|
| 0.584 XPI | 1,299 cu (envelope bytes at 1 cu) | 4.85 R_0 |
16.8 R_0 |
| 0.584 XPI | 1,438 cu (recommended) | about 3.9 R_0 |
about 13.7 R_0 |
| 0.584 XPI | about 3,500 cu (sensitivity, if the pending state-key measurement comes out near the withdrawn library figure) | about 0.65 R_0 |
about 2.3 R_0 |
3.78 XPI (work at 10^−4 W_g) |
1,299 cu | 231 R_0 |
|
| 94.5 XPI | 1,299 cu | 1.5 × 10^5 R_0 |
|
378 XPI (T_g) |
1,299 cu | 2.4 × 10^6 R_0 |
R_0 is 157.3 billion XPI. The cheapest attack holds a constant block cost for k blocks, searched over k from 64 to 4,096; the best k is about 1,024.
- During the bootstrap, G3 holds unconditionally, at any hash rate. Everything issued by year 4 is 0.64
R_0. - Later, G3 can fail only if total supply has grown past several
R_0through a long high-work era, hash power then falls more than about 10^14 times to nearPOW_LIMIT, and someone burns severalR_0within about a day. - Even then the chain does not halt. One transaction paying about 2.3 XPI in fees funds the next block's floor.
| Lever, for the 3,357 cu sensitivity case | Proved | Cheapest attack | Cost |
|---|---|---|---|
| None: (32, 32), w 10 | 0.70 R_0 |
2.5 R_0 |
|
| w 11 | 1.41 R_0 |
5.0 R_0 |
The EMA follows sustained load half as fast |
S_linear 33, E_min 2^35 |
2.82 R_0 |
8.7 R_0 |
Sustained-load pricing is halved |
S_quad 31 |
2× | Doubles spike burns and raises fees at the design load | |
E_min |
no effect | ||
POW_LIMIT (higher minimum work) |
in proportion to the minimum work | An existing consensus constant, still a placeholder |
Recommendation: keep (32, 32) and w = 10. Replace G3's wording, "affordable from T_min at every reachable EMA", with the relative statement and the D* formula. No finite parameter makes G3 unconditional while total issuance is unbounded. Revisit S_linear only if the state-key measurement makes coinbase-only blocks much more expensive. C16a's issuance bound still refers to T_max and needs a separate edit.
3. Prior art
Ethereum gas
- The 2016 Shanghai attacks and EIP-150. Opcodes that read state (
EXTCODESIZEat 20 gas, andBALANCE,SLOADandCALL) were priced as if every read hit the cache, while the attack forced disk reads. Clients first shipped caching fixes (Ethereum blog, 2016-09-22). Then EIP-150 raised those opcodes by 10 to 35 times and added the 63/64 call-gas rule. EIP-161 cleared the roughly 20 million empty accounts the attack had created. Lesson: a ratio error between computation and disk, corrected by changing the ratio. - EIP-1884 (2019). As the state grew, trie reads got slower relative to computation:
SLOAD200 → 800,BALANCE400 → 700. Contracts that relied on the 2,300-gas stipend broke. Lesson: raising a price after launch can break what was built against the old price. Leave headroom under caps. - EIP-2929 and EIP-2930 (2021). The first access to an account or slot in a transaction costs 2,600 or 2,100 gas; later accesses cost 100. EIP-2929 cites attack transactions that took 20 to 80 s, and expects about 7 to 27 s after the change. Lesson: the first random read is the expensive case. Lotus prices every read as a first read, because C24 makes charges independent of caches.
- EIP-1559 (2021). It separates a target block size from the maximum, with a burned base fee; Roughgarden (2020) analyses it. It sets the price level and the throughput, not the relative weights. That is the same division of labour as Lotus's shifts versus its cu schedule.
- Bytes against compute, in both directions. EIP-2028 cut calldata from 68 to 16 gas per byte. Later, EIP-7623 (2025) added a floor of 10 and 40 gas per byte to shrink the worst-case block. Follow-up analyses showed how access lists get around it (ethresear.ch), and later drafts raise it again. Lesson: the byte-to-compute ratio is a design choice, and it sets the worst block in bytes.
- Repricing by measurement (2025–26). EIP-7883 raises
MODEXP, which benchmarks found underpriced relative to other precompiles. EIP-7904 (a draft) reprices many opcodes from measurements on several clients. EIP-7825 caps a transaction at 2^24 gas. Lesson: ratios are measured on several implementations and machines, and the worst one sets the price. This is the max-over-machines rule.
Bitcoin
MAX_BLOCK_SIGOPS = 20,000(2010) counted signature operations in scripts that were never executed and missed the ones that were. P2SH (BIP16) added accurate counting. Lesson: count the work actually done.- Quadratic signature hashing. Hashing work grew with the square of transaction size, so a hashing-to-byte ratio grew without bound. CVE-2013-2292 described a 1 MB transaction that would take minutes (Bitcoin wiki). F2Pool's 2015 megatransaction took about 25 s (Rusty Russell). BIP143 fixed it for SegWit, and P05's fixed-size preimages are the same fix.
- Weight (BIP141) is a hand-set ratio between resources, 4:1 for non-witness to witness bytes, frozen for nine years.
- Taproot (BIP342) gives each input a signature budget of 50 + its witness size, and each check costs 50. That fixes a signature-to-byte ratio.
- BIP54 found legacy worst-case blocks long after launch. It limits legacy sigops to 2,500 per transaction and reports a 40-fold smaller worst case. Lesson: the worst-case search is never finished.
Bitcoin Cash, Lotus's parent tier
- SigChecks (2020) allows at most one signature check per 141 bytes.
- VM limits (2025) gives each input an operation-cost budget of 800 per "density control" byte (unlocking bytecode + 41). Each instruction costs a base of 100, and hashing is counted in 64-byte digest iterations. The CHIP says this raises the compute available to real contracts more than 100 times while halving worst-case node compute.
Lesson: this is the nearest prior art. Costs are ratios fitted to cross-implementation benchmarks, in a unit tied to hashing and bytes, not to a machine.
Solana, Cardano, Kaspa, Monero, Zcash
- Solana. Compute units have fixed per-instruction and per-syscall costs. Block caps were raised by governance as clients improved (48M → 60M → 100M), while each writable account keeps a separate 12M CU budget for work that must run serially. Lesson: the unit prices ratios, while capacity is raised separately as software improves. That is the split the owner chose.
- Cardano. Plutus cost models are fitted from benchmarks of each builtin. In June 2024, reference scripts, which were charged nothing for their size, were used to attack the network. A per-byte fee of 15 lovelace was added, multiplied by 1.2 for each 25 KiB (Cardano docs; Intersect, 2024-06-27). Lesson: every byte a node must process needs a nonzero ratio.
- Kaspa. KIP-9 adds a storage mass,
C · (Σ 1/outputs − Σ 1/inputs), kept as a separate dimension from compute mass. Lesson: state growth is its own resource. - Monero. A block of weight W above the 100-block median M loses
reward × (W/M − 1)²of its reward, with W ≤ 2M (Zero to Monero 2.0, chapter 7). A 100,000-block long-term median was added in 2019 to resist ratcheting (MRL logs). Compared withS_quad: - both surcharges are quadratic and paid by forgoing reward (Lotus's underclaim);
- Monero's is centred on the recent median, while Lotus's quadratic term is absolute and only its linear EMA term follows use;
- Monero's penalty shrinks as the reward falls, while Lotus's burn is in atoms;
- Monero's long-term median plays the role of Lotus's w = 10 and an
E_minabove the design load. - Zcash. The 2022 shielded spam led to ZIP-317, a fee per logical action.
Academic work
- Perez and Livshits, "Broken Metre" (NDSS 2020, arXiv:1909.07220). A genetic search found EVM programs about 100 times slower per unit of gas than typical contracts. The page cache moved execution time by an order of magnitude. Lesson: search automatically for operations whose ratio is off, with caches cold.
- Chen et al. (ISPEC 2017) identified underpriced EVM operations from measured time per unit of gas.
- Yang, Murray, Rimba and Parampalli (arXiv:1905.00553) found large inconsistencies in time per unit of gas between opcodes and between clients. That is the cross-machine ratio variance that the margin covers.
- Diamandis et al. (arXiv:2205.07919) show why one scalar lets a block concentrate on one resource. This is the theory behind bounding the worst block per resource.
4. Principles for a chain with frozen prices
- Price ratios, not speeds. Define the unit by a reference operation. A weight is the worst measured ratio, times a margin. Absolute speed belongs to validator requirements and the throughput benchmark.
- Price the code as built, on the path that validates. Measure the node's block path, not a library path that does not run during validation (section 6).
- Size the margin to ratio uncertainty. 1.5× covers kernels measured on the target code on one machine. A second machine of any architecture tests it. Operations not yet measured keep conservative defaults.
- Cold versus warm. Price every first touch of state as a read, because consensus cannot see caches (C24). Measure the cold read as a ratio before freezing it.
- Bytes are priced by a design ratio, chosen so that byte-heavy blocks are not the cheapest way to load validators. Bandwidth has no CPU ratio to measure.
- Bound the worst block per resource, as a multiple of a design block, so that the throughput benchmark covers it directly.
- Sustained versus burst. Sustained throughput is for the benchmark on a large, realistic state. The shifts price bursts. Burst microbenchmarks on an empty state justify neither.
- Leave headroom under hard caps, so that raising a price never makes existing coins unspendable.
- Use the error asymmetry. Raising a price is a soft fork and lowering one a hard fork, so err high at genesis.
5. Pricing and throughput: the owner's question
Why earlier benchmarks showed 120k+ tx/s. The figures are in the victory report, section 12: 156k tx/s for a 4,000-transaction burst, 201k tx/s for a 6,001-transaction block connect, and 460k tx/s for mempool overlay inserts. They measured:
- bursts of 1,000 to 6,000 transactions, which is milliseconds of work;
- a small, fully cached state of about 100,000 coins in RAM;
- 16 to 18 M5 threads;
- one stage at a time, without relay, the disk commit or undo data;
- batched Schnorr checks, which consensus cannot assume, because a failed batch falls back to single checks.
They show the hot path is fast. They do not show what a validator sustains on a large state.
How price relates to throughput. A cu price is an exchange rate between kinds of work, in H_ref units. It does not encode any speed, so it cannot set throughput. Throughput comes from three separate things:
- What validators can do. The 100k tx/s benchmark measures it on the node's path.
- The atom price of a cu. The burn floor sets it.
E_minand the shifts were fitted so that payments pay only the byte fee up to about 107,000 tx/s. - Bursts. The quadratic term prices them.
The cu schedule's job is to make sure no transaction shape gets more validator work per cu than a payment does, beyond the stated worst-case multiples (2.8× CPU, 2.7× bytes, 1.4× reads). If the benchmark shows design blocks validate with that much room to spare, the worst blocks fit too.
Withdrawn. The earlier note gave 33,800 tx/s as "what the reference validator sustains on the shipping code", and cited 1,200 tx/s cold and 7,700 tx/s warm from the state-tree lane's connect runs. Those came from the lotus_v2 library state path (incremental_utxo.cpp and DiskStateStore) before option C. The node validates blocks through src/primitives/block.cpp → SmtBatchUpdateParallel, which uses the prefix-compressed tree with deferred dirty-node hashing and hashes up to 16 shards in parallel. None of those figures describes it.
6. Notes per constant
- 2 cu per byte, applied consistently, including the 134 header bytes, the 4-byte count and the frame prefixes in
C_envelope(286 + 2F + 7N). With the approved schedule: - a payment is 1,430 cu linear and 1,437 effective;
- a 2-in/2-out payment is 2,342;
- a 100-input consolidation is 120,036, 34% over linear at knee 18;
- a coinbase-only block is about 1,438.
Payments pay only the byte fee (25,100 atoms) up to about 107,000 tx/s. A 1×, 2× or 10× spike from a quiet chain burns 139,367, 418,746 or 7,694,250 XPI.
- State key: pending measurement (gate 3).
- Withdrawn: the as-built price of 657 cu, its 33,800 tx/s design load and the 40,770-atom fee at that load. They came from the library tree at 080ad66f2c, before option C.
- What to measure: the node's
SmtBatchUpdateParallelat 10M+ coins, warm and cold, on 1, 2, 4, 8 and 16 threads, per key inserted and erased, as a ratio toH_ref. Also measure the cold storage read as a ratio. That gives both the per-key price and how parallel it really is. - How to price it: if the work is spread over cores, the per-key ratio is the total work. The serial remainder must also fit the 100k benchmark, which is a validator requirement, not a price.
- Placeholder until then: the approved 151 cu per key (27 levels ×
h(67)+ leaf hashes + 64 read). - To settle with the same measurement: depth. Option C paths average
log₂ n + 1.3nodes, plus up to about 8 splits among one transaction's outputs. Charging 40 levels (190 cu) would cover that and modest grinding, and would raise the design-load fee by 9%. Charging all 257 levels would add about 690 cu per key, more than doubling a payment's cost. Grinding a path one level deeper costs the attacker about twice as many hash attempts and lengthens only their own paths. - Storage read. 64 cu is the approved value: about 10 warm MDBX reads (warm ratio 6.4). It stays until the cold-read ratio is measured.
- Unmeasured opcodes (
STATEVERIFY,STATEHASH,MULPOW2,MERKLEROOT_INDEXED, branch reads). Keep the defaults. Run a Broken-Metre-style automated search over VM programs for the largest time per cu, as a ratio toH_ref. - Fee floor. Atom figures assume
MIN_FEE_PER_KB = 100,000, the issuance note's recommendation; P05 still says 1,000. G3 barely depends on it. The atom price per cu may also be indexed to mining work; another lane is studying that (lotus-v2-work-indexed-fee-floor.md). The ratios here are independent of that choice.
7. What this does not establish
- No new measurements. Every ratio comes from one machine, the M5 Max, before option C.
- No second-machine ratios, no cold-read ratio, and no measurement of the node's state path.
- The worst-block multiples come from the calibration note's search (
attack_shapes()). It is a search, not a proof. - The G3 "cheapest attack" is a search over constant-cost attacks. The proved figure is the Cauchy–Schwarz bound.
POW_LIMITis a placeholder.- Some prior-art specifics, notably Monero's long-term median details and the BIP54 slow-block ratios, come from secondary write-ups. Check them against primary sources before quoting them in a spec.
Reproduce
From the repository root, standard library only:
PYTHONPATH=tools/lotus-v2-reference python3 -m lotus_v2_reference.resources
The figures in this note came from a short script that imports resources and calibration read-only:
- The new unit:
fit_opcodes(replace(ENVELOPE, ns_per_cu=MEASURED_NS["tagged_blake3_67"])), which gives the required weight of every measured case inH_refunits and the cases it covers. - The 2-cu-per-byte schedule:
replace(RECOMMENDED, wire_byte=2). - The worst blocks:
max_block_for_budgetandworst_block_seconds. Each per-budget time is divided by a design block's time in the same budget. - The tail at
POW_LIMIT:isqrt(T_g² · 2^32 // W_g). - G3: the
D*formula of section 2, plus a constant-cost attack search over k = 64 to 4,096 blocks using the exact integer EMA.
References
Ethereum:
- EIP-150, EIP-161, EIP-1884, EIP-2028, EIP-2929, EIP-2930, EIP-1559, EIP-7623, EIP-7825, EIP-7883, EIP-7904
- Ethereum blog: transaction spam attack, next steps (2016)
- Worst-case block size and calldata repricing
Bitcoin and Bitcoin Cash:
- BIP16, BIP141, BIP143, BIP342, BIP54
- Bitcoin CVE list
- Rusty Russell (2015)
- BCH SigChecks
- BCH VM limits
- BCH 2025 upgrade
Other chains:
- Solana 100M CU blocks
- Cardano fees
- Intersect parameter committee, 2024-06-27
- Kaspa KIP-9
- Zero to Monero 2.0
- MRL, 2019-02-04
- ZIP-317
Academic:
- Perez and Livshits, Broken Metre
- Chen et al., ISPEC 2017
- Yang et al., arXiv:1905.00553
- Diamandis et al., arXiv:2205.07919
- Roughgarden, arXiv:2012.00854
Lotus:
- Resource calibration
- P05
daemon/audit/launch-plan.md- Victory report, section 12