Skip to content

feat: add linear-vesting recurring disbursement path with cliff and c… - #550

Merged
thegreatfeez merged 1 commit into
Ac0rdP:mainfrom
akprinciple:Add-the-LinearVesting-disbursement-path
Aug 31, 2026
Merged

feat: add linear-vesting recurring disbursement path with cliff and c…#550
thegreatfeez merged 1 commit into
Ac0rdP:mainfrom
akprinciple:Add-the-LinearVesting-disbursement-path

Conversation

@akprinciple

@akprinciple akprinciple commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

closes #450

Summary

This PR implements the LinearVesting disbursement model for recurring schedules in the contract.

When a recurring schedule is initialized with RecurringKind::LinearVesting, disburse_recurring dynamically computes the claimable payout

Core Constraints & Math

  • Cliff Gating: Ensures zero tokens are claimable prior to reaching cliff_time.
  • Cap Enforcement: Clamps the cumulative claimable amount to the specified total_cap.
  • Delta Payouts: Subtracts previously disbursed totals so recipients only receive the newly vested delta for the current execution window.
  • Overflow Protection: Implements checked arithmetic across all elapsed time and vesting calculations to prevent integer overflow and underflow vulnerabilities.

What Changed

  • Vesting Logic Integration: Added the linear-vesting payout calculation branch inside disburse_recurring.
  • Cliff Validation: Enforced cliff-period validation prior to payout evaluation.
  • Accrual Tracking: Computed newly claimable token amounts relative to historical disbursements.
  • Cap Clamping: Bound final disbursement amounts to the configured vesting ceiling.
  • Backward Compatibility: Preserved the standard fixed-period disbursement execution path for non-vesting recurring schedules without regression.

@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

@akprinciple is attempting to deploy a commit to the thegreatfeez's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@akprinciple 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

@thegreatfeez
thegreatfeez merged commit 8a48736 into Ac0rdP:main 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 the LinearVesting disbursement path computing claimable amount as a continuous function of elapsed time, respecting cliff and cap

2 participants