Skip to content

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

Description

@thlpkee20-wq

Description

vesting.rs currently implements straight-line vesting without an explicit cliff window. Many investor agreements require zero claimable amount until a cliff date (e.g. 12 months), then catch-up accrual. Add a cliff_secs parameter and enforce a hard zero claim before cliff while preserving full schedule arithmetic afterward.

Requirements and context

  • Must be secure, tested, and documented
  • Should be efficient and easy to review
  • Relevant code: Revora-Contracts/src/vesting.rs
  • Pre-cliff claim attempts must emit a typed VestingCliffNotReached error, not silently return zero

Suggested execution

  • Fork the repo and create a branch
  • git checkout -b feat/vesting-cliff-secs
  • Implement changes
    • Add cliff_secs: u64 to VestingSchedule
    • Gate claim_vested and vested_amount_at on now >= start + cliff_secs
    • Document interaction with vesting amendment under VESTING_AMENDMENT_IMPLEMENTATION.md
  • Validate security and correctness assumptions

Test and commit

  • Run tests
    • cargo test --all
  • Cover edge cases
    • now == start + cliff_secs exactly should release the full pre-cliff accrual
  • Include test output and security notes

Example commit message

feat: enforce vesting cliff_secs gate before pro-rata accrual

Guidelines

  • Minimum 95 percent test coverage
  • Clear documentation
  • Timeframe: 96 hours

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions