Skip to content

feat: Implement periodic vesting steps (Issue #14)#102

Merged
JerryIdoko merged 2 commits intoVesting-Vault:mainfrom
lifewithbigdamz:main
Feb 26, 2026
Merged

feat: Implement periodic vesting steps (Issue #14)#102
JerryIdoko merged 2 commits intoVesting-Vault:mainfrom
lifewithbigdamz:main

Conversation

@lifewithbigdamz
Copy link
Contributor

@lifewithbigdamz lifewithbigdamz commented Feb 26, 2026

Closes #14


  • Add step_duration parameter for periodic vesting schedules
  • Implement step function calculation with rounding down to nearest month
  • Add helper functions for common time durations (monthly, quarterly, yearly)
  • Create comprehensive test suite for periodic vesting functionality
  • Fix duplicate struct definitions and broken functions
  • Add detailed documentation and usage examples

Acceptance Criteria:
✅ If step_duration > 0, calculate vested = (elapsed / step_duration) * rate * step_duration ✅ Round down to the nearest month

This enables both linear (step_duration = 0) and periodic (step_duration > 0) vesting while maintaining backward compatibility with existing vaults.

lifewithbigdamz and others added 2 commits February 26, 2026 08:58
- Add step_duration parameter for periodic vesting schedules
- Implement step function calculation with rounding down to nearest month
- Add helper functions for common time durations (monthly, quarterly, yearly)
- Create comprehensive test suite for periodic vesting functionality
- Fix duplicate struct definitions and broken functions
- Add detailed documentation and usage examples

Acceptance Criteria:
✅ If step_duration > 0, calculate vested = (elapsed / step_duration) * rate * step_duration
✅ Round down to the nearest month

This enables both linear (step_duration = 0) and periodic (step_duration > 0) vesting
while maintaining backward compatibility with existing vaults.
@JerryIdoko JerryIdoko merged commit cd03803 into Vesting-Vault:main Feb 26, 2026
1 check failed
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.

#14 Issue 14: [Logic] Periodic Vesting Steps

2 participants