Skip to content

v1.4.0 — Nervos DAO Protocol Integration

Choose a tag to compare

@RaheemJnr RaheemJnr released this 08 Mar 20:06
e0eb56a

What's New

Nervos DAO Integration

  • Deposit to DAO: Lock CKB in the Nervos DAO to earn compensation (minimum 102 CKB)
  • Withdraw from DAO (Phase 1): Initiate withdrawal, converting deposit cell to withdrawing cell
  • Unlock from DAO (Phase 2): Claim deposited CKB + accumulated compensation after 180-epoch lock period
  • Compensation tracking: Real-time display of accrued DAO compensation per deposit
  • Cycle progress: Visual progress bar showing position within current 180-epoch lock cycle with phase indicators (Normal → Suggested → Ending)
  • Lock countdown: Hours remaining until unlock displayed for locked deposits
  • 7-state DAO FSM: Full deposit lifecycle tracking (Depositing → Deposited → Withdrawing → Locked → Unlockable → Unlocking → Completed)
  • Auth-gated deposits: Biometric or PIN authentication required before DAO deposits

JNI DAO Utilities (Rust)

  • nativeExtractDaoFields: Parse DAO header into C/AR/S/U fields
  • nativeCalculateMaxWithdraw: Compute deposit + compensation using RFC-0023 formula
  • nativeCalculateUnlockEpoch: Calculate phase 2 unlock epoch with 180-epoch boundary rounding

UI

  • New DAO tab with deposit list, deposit bottom sheet, and compensation progress bars
  • DAO transaction badges in activity feed (DAO Deposit, DAO Withdraw, DAO Unlock)
  • Neuron-style deposit cards with status, compensation, and lock info
  • Learn CKB link added to website navbar and footer

Testing

  • 9 new test files covering DAO models, constants, direction detection, transaction building, ViewModel state, and formatting

Bug Fixes & Hardening

  • Paginated cell/transaction fetching for large deposit sets
  • Epoch fraction validation (length > 0, index < length)
  • Max withdraw return value guards preventing silent corruption
  • Deposit block hash preservation on header fetch failure
  • Clipboard auto-clear after 30s when copying private key