Todas as lições · Apps and UI · Começa aqui · Glossário
Nervos DAO hold time with term-locked withdrawalsPráticoDe uma correção
De uma correção · Verificação: em parte certa · Verificada em 2026-11-19
The Nervos DAO pays out phase 2 only at a whole number of 180-epoch cycles counted from the deposit epoch D, so a withdrawal started after D + 180×n matures at D + 180×(n+1). If a lock refuses phase 1 until a term of n cycles has passed, then in practice the funds are held (n + 1) × 180 epochs, not n × 180, and interest stops at the phase 1 block. Only a phase 1 that lands exactly in the boundary epoch fraction avoids the extra cycle.
Porque importa: Without it the app tells users a one-term deposit is held about 30 days when it is really about 60, and the last cycle earns no interest.
Padrão
termMs = daoTermPeriods * 180 * EPOCH_MS → (daoTermPeriods + 1) * 180 * EPOCH_MS when the withdrawal can only be started after the termUm teste mudou no mesmo commit
Está ao lado da correcção. Nós não o corremos.
- toastmanAu/daowow:
apps/web/test/model-timeline.test.js
- Conceitos
- Since and time locks, Other
- Evidência
- De uma correção: de um projeto, verificada contra o commit
- Vista pela primeira vez
- 2026-11-13
- Última mudança
- 2026-11-13
- Última verificação
- 2026-11-19
- Verificação contra o commit
- em parte certa: um núcleo verdadeiro, com uma parte solta ou demasiado larga
Fontes (1)
- 2026-11-13 · toastmanAu/daowow · mais deste projeto
Mais sobre Apps and UI
- Saving local state after the first step of a multi-step flow
- Exact CKB-to-shannon conversion with BigInt
- Lock-based fallback when a stored out point goes stale
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
LusoCryptoLabs, "Nervos DAO hold time with term-locked withdrawals", CKB lessons, https://pulse.lusocryptolabs.com/learned/apps/nervos-dao-hold-time-with-term-locked-withdrawals, CC BY 4.0, last changed 2026-11-13.