Skip to content

feat: enforce vesting cliff_secs gate before pro-rata accrual - #865

Merged
thlpkee20-wq merged 1 commit into
RevoraOrg:masterfrom
ugoocreates-pixel:feat/vesting-cliff-secs
Aug 31, 2026
Merged

thlpkee20-wq merged 1 commit into
RevoraOrg:masterfrom
ugoocreates-pixel:feat/vesting-cliff-secs

Conversation

@ugoocreates-pixel

Copy link
Copy Markdown

Closes #853

Implements vesting cliff support with a discrete cliff_secs gate before any pro-rata accrual begins, enforcing a hard zero claim before the cliff while preserving schedule arithmetic afterward.

Changes:

  • Added cliff_secs: u64 parameter to the VestingSchedule struct and the vesting_register registration function.
  • Added a typed VestingCliffNotReached (109) error to the VestingError enum to avoid silently returning zero when attempting to claim before the cliff.
  • Updated compute_vested to strictly return 0 if the current timestamp is less than start_ts.saturating_add(cliff_secs).
  • Enforced the VestingCliffNotReached check in vesting_claim prior to computing claimable tokens.
  • Added comprehensive regression and boundary tests in vesting_test.rs covering happy paths, pre-cliff error emissions, and boundary conditions (exactly at start_ts + cliff_secs). Existing deployment API compatibility rules are maintained.

@drips-wave

drips-wave Bot commented Aug 30, 2026

Copy link
Copy Markdown

@ugoocreates-pixel Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@thlpkee20-wq
thlpkee20-wq merged commit e615388 into RevoraOrg:master Aug 31, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add vesting cliff support with discrete cliff_secs gate before any pro-rata accrual begins

2 participants