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.
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
VestingCreated,VestingClaimed,VestingRevoked(if revocation is supported).Suggested execution
git checkout -b feature/token-vestingvesting.md) with usage examples and edge-case behavior.Example commit message
feat: implement token vesting with tests and docsGuidelines