Feat/escrow milestone dispute#315
Merged
manoahLinks merged 2 commits intoApr 29, 2026
Merged
Conversation
|
@Praizfotos 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! 🚀 |
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
Adds a new
escrowSoroban smart contract supporting milestone-based fund release and arbiter-mediated dispute resolution. Funds are locked on creation and released incrementally as the depositor approves each milestone. Either party can open a dispute, which freezes the escrow until the arbiter splits the remaining balance.Fixes #(issue)
Type of Change
Changes Made
soroban-contract/contracts/escrow/Cargo.toml— new crate, mirrors workspace conventionssoroban-contract/contracts/escrow/src/lib.rs— contract implementation:initialize— one-time admin setup viaupgradeablecratecreate_escrow— pulls full sum from depositor, stores per-milestone amountsapprove_milestone— depositor releases a milestone's funds to recipient; auto-closes when all milestones doneopen_dispute— depositor or recipient freezes escrow inDisputedstateresolve_dispute— arbiter splits remaining balance with configurablerecipient_shareget_escrow— read-only queryupgradeablecrateEscrowCreated,MilestoneApproved,EscrowClosed,DisputeOpened,DisputeResolvedsoroban-contract/contracts/escrow/src/test.rs— 8 unit tests covering full lifecyclesoroban-contract/Cargo.toml—contracts/escrowregistered in workspaceTesting
create_escrowtransfers funds from depositorapprove_milestonereleases correct amount to recipientresolve_disputecorrectly splits remaining balanceresolve_disputefails when no dispute is openrecipient_share(exceeds remaining) rejectedstellar contract deploy)Checklist
soroban-sdkandupgradeablefrom workspace)Additional Notes
recipient_shareinresolve_disputeis an absolute amount (not a percentage), giving the arbiter full flexibility.closes #246