feat: implement milestone vesting and pro-rata refund logic#125
Open
Wilfred007 wants to merge 12 commits into
Open
feat: implement milestone vesting and pro-rata refund logic#125Wilfred007 wants to merge 12 commits into
Wilfred007 wants to merge 12 commits into
Conversation
|
@Wilfred007 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! 🚀 |
…ew storage layout
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.
Description
This PR implements milestone vesting, fixes pro-rata refund calculations, and adds multi-signature authorization verification in the
stellar-grantscontract.Key Changes
Milestone Vesting:
vesting_period: u64to theMilestonestruct.VestingPendingstate to safely defer payouts after milestone approval.vesting_claim(env, grant_id, milestone_idx, recipient)function to allow permissionless fund pulling once the time-lock expires.finalize_grant_releaseto distinguish between immediate and deferred payouts.Refined Refund Logic:
cancel_grantto distribute refunds pro-rata based on the current remaining escrow balance and the total-ever-contributed amounts of funders.Multi-Signature Authorization Verification:
test_reviewer_multisig_authorization, verifying that the contract's authorization logic correctly handles Stellar multi-sig accounts and contract-based Smart Wallets.Security and Verification
cargo test).Closes #83
Closes #81
Closes #105
Closes #101