CKB Pulse

All lessons · Other · Start here · Glossary

Nervos DAO phase-one withdrawal layoutWorkingFrom one fix

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

In phase one, output i must mirror deposit input i (same capacity, lock and DAO type), with its data set to the deposit block number as a u64 LE, and the deposit block hash must be in header_deps. Put any fee-paying input and output after all deposits. A custom lock that enforces a full 180-epoch term before phase one pushes payout to the next cycle boundary (about deposit + 360 epochs, roughly 60 days).

Why it matters: Without index-aligned outputs the DAO type script rejects the withdrawal, and a lock that waits a full term before phase one silently doubles the time to payout.

Pattern

inputs/outputs: [...deposits(index-aligned), sponsor]; outputsData[i]=u64le(depositHeader.number); since = ABSOLUTE_EPOCH_FLAG | (depositEpoch + 180*periods + 1)

A test changed in the same commit

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

Concepts
Since and time locks, Transaction building and fees, Cell deps and script lookup
Evidence
From one fix: from one project, checked against its commit
First seen
2026-11-13
Last changed
2026-11-13
Last checked
2026-11-19
Check against the commit
partly right: a true core, with a part that is loose or too wide

Sources (1)

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, "Nervos DAO phase-one withdrawal layout", CKB lessons, https://pulse.lusocryptolabs.com/learned/other/nervos-dao-phase-one-withdrawal-layout, CC BY 4.0, last changed 2026-11-13.

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.