CKB Pulse

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

Prefer
return self.exact_dao_type and self.data == DEPOSIT_DATA

Taken from the commit, shortened.

A test changed in the same commit

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

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)

More about Other

All 9 in this topic

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.

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.