Implements Issue #44 by enforcing a maximum vesting duration to prevent overflow/math edge cases.#93
Merged
JerryIdoko merged 7 commits intoVesting-Vault:mainfrom Feb 26, 2026
Conversation
Issue Vesting-Vault#44: enforce MAX_DURATION=315360000 (10y) and revert on longer schedules.
Contributor
|
Resolve conflicts |
Contributor
|
resolve conflicts |
Contributor
Author
|
Done @JerryIdoko |
Great-2025
pushed a commit
to Great-2025/Contracts
that referenced
this pull request
Mar 27, 2026
- Add PathPaymentConfig, PathPaymentClaimEvent, and PathPaymentSimulation types - Implement configure_path_payment() for admin setup of auto-exit feature - Add claim_with_path_payment() for instant token-to-USDC swaps in one transaction - Include simulate_path_payment_claim() for gas-free dry-run simulation - Add comprehensive test suite covering all path payment scenarios - Integrate with existing vesting vault infrastructure - Support custom swap paths and minimum destination amounts - Include proper error handling and event emission Resolves Vesting-Vault#146 and Vesting-Vault#93
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
MAX_DURATION = 315360000seconds (10 years).(end_time - start_time) > MAX_DURATION(and rejectsend_time < start_time) in:create_vault_fullcreate_vault_lazybatch_create_vaults_lazybatch_create_vaults_fullGrantContract::initialize_grantandVestingVault::initializefor consistency across vesting entrypoints.SPEC.mdand added tests covering the cap behavior.Testing
cd contracts/vesting_curves && cargo testAcceptance criteria
MAX_DURATION = 315360000duration > MAX_DURATIONclose #70