I replayed recent CKB mainnet transactions in ckb-debugger, one run per script group, to see where the cycles go. Every transaction is checked against the node: the groups have to add up exactly to the cycles the node recorded for it, or the transaction is listed as excluded instead of counted.
There are two samples, kept apart on purpose.
- A random sample: every non-cellbase transaction in every 12th block from 20,932,885 to 20,946,673 (5 Nov 12:54 to 7 Nov 04:00 UTC, about 39 hours). 1,002 transactions, all 1,002 matched the node, nothing excluded.
Script Groups Median p90 Share
secp256k1_blake160 (lock) 1,002 1,647,946 1,665,060 71.9%
unknown 0xa9267ff5...e981 (type) 175 1,801,237 1,836,377 13.7%
Type ID (type) 175 1,000,000 1,000,000 7.6%
Bitcoin SPV client, RGB++ (type) 33 1,366,700 1,551,628 2.0%
d.id time oracle, info (type) 648 45,174 45,175 1.3%
JoyID (lock) 4 6,833,689 6,862,057 1.2%
d.id time oracle, index (type) 648 32,977 32,977 0.9%
4 unknown locks (see below) 175 each 4,426 to 72,371 1.3%
Nervos DAO (type) 11 11,981 14,084 <0.01%
Per transaction: median 1,729,190 cycles, p90 4,607,770, max 6,865,540.
- A targeted sample. The random window has few or no xUDT, Omnilock or Spore transactions, so for 22 scripts I asked the node’s indexer for the most recent transactions in which each one ran (searching back from block 20,947,093, up to 3,000,000 blocks for the rare ones) and replayed up to 40 of each. 650 replays: 604 matched the node, none mismatched, and 46 older transactions (all at or before block 19,011,137) have no cycle total on the public node, so they are listed as not recorded rather than counted. These were picked by script, so they say what a script costs when it runs, not how much of mainnet it is. No shares here.
Script (per group) Matched groups Median p90
xUDT 41 20,564 20,717
Omnilock, Ethereum displaying 37 1,460,165 1,476,761
Omnilock, Bitcoin 40 1,458,571 1,472,092
JoyID 40 6,815,869 6,879,521
Spore 40 105,299 272,482
Spore Cluster 40 98,683 122,630
ckb-dex lock 39 24,267 39,032
RGB++ lock 1,444 1,418,522 1,419,245
BTC time lock (RGB++) 9 813,924 959,098
COTA 49 2,332,001 2,332,001
iCKB limit order 40 75,304 79,679
iCKB logic 8 105,870 160,850
anyone-can-pay 40 34,106 1,609,984
sUDT 20 5,540 32,871
d.id das-lock 61 282,271 3,862,283
Nervos DAO 40 11,974 13,826
Type ID 40 1,000,000 1,000,000
What I take from it:
-
Most of mainnet’s verification cost is still the default lock: secp256k1_blake160 is 71.9% of all cycles in this window, 1.60M to 1.67M per group for 90% of them. It runs once per distinct owner, so a transaction that spends cells of many owners costs that many times more. There was no such transaction in this window (the costliest was 6,865,540 cycles); in a window I measured on 28 Oct, one with 68 owners cost 111,979,599.
-
648 of the 1,002 random transactions are d.id’s time oracle updating its timestamp and block number cells. The two type scripts are cheap (about 45k and 33k); the cost of those transactions is the lock.
-
175 transactions follow one pattern I cannot name yet: secp256k1_blake160, a Type ID cell, a type script with code hash 0xa9267ff5…e981 at about 1.8M cycles, and four small locks (4,426 to 72,371 cycles). About 4.61M cycles per transaction. Their code cells were deployed in October 2021 and June 2022, so this is not a new protocol. It was in the targeted Type ID sample on 28 Oct as well (26 of 40), but not in that random window.
-
Type scripts are cheap next to locks. xUDT runs at about 20k cycles, Spore and Cluster around 100k, sUDT under 33k. In an xUDT transfer the lock is most of the bill: the commonest xUDT pattern in the sample was JoyID plus xUDT (16 of 40), at a median of 6,851,229 cycles for the whole transaction, against 1,677,720 for secp256k1 plus xUDT.
-
Locks vary a lot. Omnilock in Ethereum or Bitcoin mode is about 1.46M, close to secp256k1. JoyID is about 6.8M per group, four times that. The RGB++ lock is about 1.42M per group, but RGB++ transactions spend many cells with distinct args: 36 of the 40 sampled RGB++ transactions ran 40 RGB++ lock groups each and cost about 57M cycles.
-
Type ID shows exactly 1,000,000 because the node verifies it natively and charges a fixed amount; the tools charge the same.
I made the same measurement on 28 Oct with an older version of the tool. 389 transactions are in both runs (mostly in the targeted samples), and every one gave the same cycles for every group. So the differences between the two reports come from which transactions were on chain in each window, not from the tool.
The full report (min, median, p90 and max for each script, an example transaction, the cell each script’s code was loaded from, what ran together, and every excluded transaction with its reason): ckb-cycle-tools/atlas/2026-11-07/report.md at main · luongthanhtung03/ckb-cycle-tools · GitHub
The raw per-transaction, per-group results are in data.json next to it. The 28 Oct run is still there for comparison: ckb-cycle-tools/atlas/2026-10-28/report.md at main · luongthanhtung03/ckb-cycle-tools · GitHub
How it is measured: ckb-cycle-tools rebuilds each transaction as a ckb-debugger mock transaction from the node (input cells, cell deps with dep groups expanded, header deps) and runs each script group on the CKB-VM version of its block. Script names come from CCC’s known scripts plus a short table of code hashes published elsewhere (Spore and Cluster in @ckb-ccc/spore, RGB++ in rgbpp-sdk, d.id in its own repositories, iCKB’s deployment file, the ckb-dex SDK), each with its source next to it. Scripts with no published hash stay “unknown”. To reproduce the random sample:
npm ci
npm run atlas -- --rpc https://mainnet.ckb.dev/ --to 20946673 --blocks 13789 --stride 12 --max-txs 1002
The command for the targeted samples is at the end of the report; --script takes a script name or any code hash, so you can point it at your own script.
The numbers do not depend on the debugger release. 24 recorded transactions (22 mainnet, one for each script sampled above, and 2 testnet) were replayed under 16 ckb-debugger builds, every release from 0.121.0 to 1.1.2 (16 Nov), native and WebAssembly. Every build gave the same cycles for every group: ckb-cycle-tools/compat/RESULTS.md at main · luongthanhtung03/ckb-cycle-tools · GitHub
To measure your own contract before it reaches mainnet: since ckb-cycle-tools 1.1.0 on npm, a project made from ckb-script-templates can use its ckb-testtool tests as the scenarios (ckb-cycles scan, then ckb-cycles report). Steps: GitHub - luongthanhtung03/ckb-cycle-tools · GitHub
Two questions for anyone who knows mainnet traffic better than I do:
- 24 scripts in these transactions are still unknown to me, among them the 0xa9267ff5…e981 type script and the four locks from point 3. The report shows each one’s code hash (shortened; the full hashes are in data.json) next to the scripts it ran with. If you know one and can point to where its code hash is published, I will name it.
- Is there a script or a set of transactions you would like measured this way?
This is a snapshot, not a service. The tool is ckb-cycle-tools, MIT: GitHub - luongthanhtung03/ckb-cycle-tools · GitHub