Skip to content

Implement Token Vesting Contract #205

@Jagadeeshftw

Description

@Jagadeeshftw

Description
Develop a vesting contract/module with a time-locked release mechanism that can be used for treasury vesting schedules and grant disbursement. The implementation should support a beneficiary, total allocation, start time, cliff, vesting duration, and claim operation.

Requirements and context

  • Must be secure, tested, and documented.
  • Should be efficient and easy to review.
  • Include clear invariant checks: vested amount is monotonic and never exceeds allocation.
  • Add event(s): VestingCreated, VestingClaimed, VestingRevoked (if revocation is supported).
  • Use the project’s stack and conventions (Soroban/Rust), not Solidity/JS.

Suggested execution

  • Fork the repo and create a branch: git checkout -b feature/token-vesting
  • Implement changes:
    • Add vesting data model and storage keys.
    • Add create/claim/read methods.
    • Add time-based release math with cliff and end cap.
    • Add auth rules for creator/admin/beneficiary.
  • Write comprehensive tests (unit + integration style in current Rust test setup).
  • Add documentation (vesting.md) with usage examples and edge-case behavior.
  • Include Rust doc comments for public functions and security assumptions.
  • Run tests, capture output, and include security notes in PR.

Example commit message
feat: implement token vesting with tests and docs

Guidelines

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions