CKB Pulse

All lessons · Rust scripts and ckb-std · Start here · Glossary

Cheque lock receiver path must return the cell's capacity to the senderWorkingFrom one fix

From one fix · Check: right · Checked 2026-11-19

When a Cheque lock cell (RFC 0039) is spent on the receiver path, rule 1.b.ii requires the Cheque cell's CKB capacity to go back to the sender's lock. An output paying that CKB to the receiver fails with Cheque error 8 (SenderCapacityNotSame). So the Cheque lock cannot be used to deliver plain CKB to the receiver, and in this project's tests it also blocked an owner placed in the receiver role from reclaiming their own CKB.

Why it matters: A claim transaction that pays the Cheque cell's CKB to the receiver is rejected with Cheque error 8, so a design that counts on the Cheque lock to hand plain CKB to the receiver cannot work.

Pattern

assert!(err.to_string().contains("error code 8"), "expected Cheque error 8, got: {err}");

A test changed in the same commit

It sits next to the fix. We did not run it.

Concepts
Testing and devnet, Capacity and cell size
Evidence
From one fix: from one project, checked against its commit
First seen
2026-11-09
Last changed
2026-11-09
Last checked
2026-11-19
Check against the commit
right: the lesson follows from its commit and still holds in the code today

Sources (1)

More about Rust scripts and ckb-std

All 35 in this topic

Do you maintain a project this lesson came from? Confirm or correct it

Cite this lesson
LusoCryptoLabs, "Cheque lock receiver path must return the cell's capacity to the sender", CKB lessons, https://pulse.lusocryptolabs.com/learned/scripts/cheque-lock-receiver-path-must-return-the-cell-s-capacity-to, CC BY 4.0, last changed 2026-11-09.

Drawn from public commits and checked against the commit each one came from and the project's code today. Read the source before you rely on one. Text under CC BY 4.0: credit LusoCryptoLabs, CKB lessons, with a link to the lesson. Want a lesson changed or removed? Open an issue.