All lessons · Other · Start here · Glossary
Recognizing a Nervos DAO deposit cell (not a withdrawing one)WorkingSeen again
Seen again · Check: right · Checked 2026-11-19
Treat a cell as a Nervos DAO deposit only if its type script exactly matches the DAO type script and its data is exactly 8 zero bytes. The DAO type script has code hash 0x82d76d1b75fe2fd9a27dfbaa65a039221a380d76c926f378d3f81cf3e7e13f2e, hash_type type and empty args. A phase one withdrawing cell has the same type script but a nonzero block number in its 8 data bytes, so it fails this check, as do data of any other length and look alike type scripts.
Why it matters: Without the exact type and data check, look alike scripts and phase one withdrawing cells are counted as live deposits, so stake or voting weight survives a withdrawal or can be faked.
joined with the ckb-service-runner card teaching the same check
Pattern
return self.exact_dao_type and self.data == DEPOSIT_DATATaken from the commit, shortened.
A test changed in the same commit
It sits next to the fix. We did not run it.
- ckb-service-runner/ckb-service-runner:
acceptance/a7/p3.test.mjs
- Concepts
- Indexer queries and cell collection, Data encoding (molecule, hex, bigints)
- Evidence
- Seen again: seen in two or more projects
- First seen
- 2026-10-08
- Last changed
- 2026-10-20
- Last checked
- 2026-11-19
- Check against the commit
- right: the lesson follows from its commit and still holds in the code today
Sources (2)
- 2026-10-08 · poshboytl/omavote · more from this project
- 2026-10-20 · ckb-service-runner/ckb-service-runner · more from this project
More about Other
- Hand-encoding WitnessArgs in molecule
- Restrict script hashType to data, type, data1, data2 when loading config
- Strict validation of molecule table headers in hand written decoders
Do you maintain a project this lesson came from? Confirm or correct it
Cite this lesson
LusoCryptoLabs, "Recognizing a Nervos DAO deposit cell (not a withdrawing one)", CKB lessons, https://pulse.lusocryptolabs.com/learned/other/recognizing-a-nervos-dao-deposit-cell-not-a-withdrawing-one, CC BY 4.0, last changed 2026-10-20.