This post summarizes the iCKB contracts security review published in ickb/contracts. The review keeps evolving with the tests, so the report is the source of truth. Any new development gets its own post in this topic. Any question or feedback is more than welcome
Review started: 2026-05-01.
Reviewed contracts commit:454cfa9, the last commit that changed the contracts. The deployed code is immutable.
Executable test evidence: the scripts/tests/** suite around the release binaries, including the fuzzer, the exhaustive search and the chain replay.
Scope:iCKB Logic, Owned Owner, Limit Order plus the shared utils crate.
Dependencies: every library inside the deployed binaries, checked from its code, plus the known bugs of the compiler that built them (dependencies, compiler).
Prior external audit:Scalebit (2024-09-10), which reported three issues: two informational and one minor.
Results
One live issue, already known: the Limit Order confusion attack (LO-01). Anyone can create fake orders pointing at the master of someone else, because CKB doesn’t run output locks. A fake can trick the owner into melting it with their master, which strands their real order. The iCKB stack guards against it by comparing each order with the mint order created beside its master, as the whitepaper explains.
Nothing else is live:
iCKB Logic: deposits made without running it mint no iCKB, so their value is a donation to the pool. Paths built on them cost their user more than they return. No test shows theft, duplicated principal or a profit beyond what the caller already controls.
Limit Order: value, minimum match and the link of each real order to its master all hold.
Owned Owner: its pairing holds under locks that sign the whole transaction. The review assumes every current iCKB integration uses one.
Everything else: blocked paths, generic CKB rules, or edge cases that matter only for future integrations.
The appendix maps every scenario to the section that traces it, with the test that reproduces it where there’s one.
Test harness. 231 tests now run against the release binaries. Every cell is checked for realistic occupied capacity, and the harness mirrors two node rules the scripts can’t see: the capacity balance and the DAO lock-size rule. Golden vectors computed by the Rust code of the contracts are shared with the TypeScript oracle in the stack.
Receiptless deposits are now documented in the report and the whitepaper: they mint no iCKB, so the whitepaper calls them a donation to the pool.
Whitepaper corrections. Independent reviews of the whitepaper fixed the Limit Order minimum-match rule, the description of the SDK order resolution, the accounting in the exit example and a few smaller points.
Great update.
This appendix is almost exactly the kind of scenario map I would need before turning iCKB into a CellScript maturity benchmark. The attack-class structure, traces, expected results, and links to concrete tests make it much easier.
Hey all~ @ArthurZhang, glad the scenario map helped!
iCKB safety has always been my priority. With all the recent LLM incidents, I went back to the contracts. I was already pretty sure there was no issue (but you never know), so I threw at them every technique I could think of, fuzzing first and foremost!!
Right now, the greater concern I have is over the continuous reporting of vulnerabilities and breaches: PHP, Node.js, Binance, even the Linux kernel itself, all in ten days of October.
The time correlation is pretty telling: AI is what enables the speed of these developments, on both sides.
So once again I put that same speed on our side: I just want to be sure we’re doing our best to keep the contracts as safe as possible. They can’t be changed on chain, so I tried hard to make them accept something they shouldn’t. They held every single time!!
Same bytes: anyone can rebuild the contracts from source and get exactly the bytes running on chain.
Millions of attempts: 12 million random transactions plus every small combination of tricky cells (37.8 million more), each checked against the four protocol rules: over 50 hours of computing. Not a single break.
Real network rules: the tests now apply the same checks a CKB node runs. Every real iCKB transaction so far passes them.
Testing the tests: of the 231 planted bugs that still compiled, the tests catch 229. The other two change nothing.
A lying node can’t steal: since stack#66, the iCKB SDK checks what a node says before signing. A lying node can only make a transaction fail.
Bottom line: the iCKB contracts hold up, with nothing new found!! The one known limitation is still the fake limit order trick, which the iCKB Stack guards against. The report has the details and how to repeat every check. The appendix still maps every scenario to the section that traces it.
Last time I asked if the contracts accept something they shouldn’t. This time I asked what all those tests never even touched: which parts of the code on chain had never run?
So I traced it, instruction by instruction. About a third of each contract had never run. Most of that can’t run at all, but a few corners can. Each one now has its own test. Same result: nothing new found!!
Every reachable corner tested: the corners a transaction can reach now run in the tests. A close reading of the rest found nothing else that could change a result.
The tools that built them too: every library compiled into the contracts got checked from its code. So did about 2,200 known bugs of the compiler that built them: none was found to change what the contracts do.
The whole chain, for real: the deployed contracts now run on every iCKB transaction on chain, about 10,000. The chain accepted them all, so passing them all shows the tests run the contracts just like the chain does!!
The PR tells the whole story. The report has the details and how to repeat every check. If you ever find something, there is now a private way to report it.