Skip to main content

Crate jiminy_vesting

Crate jiminy_vesting 

Source
Expand description

§jiminy-vesting

Linear, cliff, stepped, and periodic unlock schedules.

Calculate how many tokens a user can claim right now, given a schedule and a timestamp. Covers every common vesting curve: linear with cliff, stepped (monthly/quarterly), periodic, and custom combinations.

Re-exports§

pub use pinocchio;

Functions§

check_cliff_reached
Check that the cliff timestamp has been reached.
claimable
Compute the claimable amount (vested minus already claimed).
elapsed_steps
Compute the number of elapsed vesting steps given timestamps.
unlocked_at_step
Compute the unlocked amount under a stepped/periodic schedule.
vested_amount
Compute the vested amount under a linear schedule with cliff.