Skip to main content

Vesting Schedules

CPLQ allocations at genesis are distributed via vesting schedules with cliff and linear unlock periods.

Vesting Model

Each VestingSchedule record tracks:

FieldDescription
addressRecipient address
schedule_idDiscriminator for multiple tranches per address
total_amountTotal CPLQ vesting under this schedule (uCPLQ)
cliff_heightNo CPLQ unlocks before this block height
start_heightLinear vest start (typically equals cliff height)
end_heightLinear vest completion height
claimed_amountCPLQ already moved to liquid balance

Unlock Calculation

The unlockedAmount function computes cumulative unlock:

  • Before cliff: Returns 0
  • Between start and end: Linear interpolation
  • After end: Returns full total_amount
  • Degenerate (endHeight <= startHeight): Returns full amount once past cliff

Claiming Vested CPLQ

Recipients must call MessageCPLQClaimVested to unlock vested CPLQ into their liquid balance:

canoliqctl cplq-claim-vested <address>

The handler reads the VestingIndex to find all schedule IDs for the address, then checks each schedule for newly unlocked amounts.

note

The FSM does not support range scans. A VestingIndex exists per address to enable enumeration without scanning all keys.