Description — what to implement and the why/impact.
Implement milestone-based release schedules in the escrow contract (contracts/escrow). Currently, escrows typically release funds based strictly on time-locks. Adding milestone-based tracking allows funds to be released incrementally as specific project phases or deliverables are verified and approved on-chain by authorized reviewers.
Context & Requirements — background, constraints, design references, edge cases;
- Grounded in
contracts/escrow using soroban-sdk.
- Must allow defining an array or ordered list of milestones, each with a specific fraction or amount of the escrowed funds and a status (Pending, Completed, Disputed).
- Must allow authorized reviewers to mark milestones as completed and trigger partial payouts.
- Must handle edge cases such as partial withdrawals and cancellation of remaining unreleased funds.
Acceptance Criteria — a checklist ("- [ ] ...") of specific, testable conditions that define "done".
Implementation Guidance — likely files/modules to touch and a suggested approach
- Likely files:
contracts/escrow/src/lib.rs, contracts/escrow/src/storage.rs, and associated tests.
- Approach: Store milestones in a vector or indexed map in persistent storage. Ensure checked arithmetic is used when calculating payout amounts per milestone to prevent rounding errors or fund leakage.
Testing & Validation — how the contributor should prove it works
- Run
cargo test --package astroid-escrow to verify all escrow and milestone test cases.
- Build the optimized WASM via
stellar contract build to ensure compilation succeeds.
Submission Guidelines — must open a PR that includes "Closes #"; assignment is required before starting; follow the repo's existing style and conventions.
Wave complexity: Medium
Description — what to implement and the why/impact.
Implement milestone-based release schedules in the escrow contract (
contracts/escrow). Currently, escrows typically release funds based strictly on time-locks. Adding milestone-based tracking allows funds to be released incrementally as specific project phases or deliverables are verified and approved on-chain by authorized reviewers.Context & Requirements — background, constraints, design references, edge cases;
contracts/escrowusingsoroban-sdk.Acceptance Criteria — a checklist ("- [ ] ...") of specific, testable conditions that define "done".
contracts/escrow.INVALID_MILESTONE,MILESTONE_ALREADY_COMPLETED).Implementation Guidance — likely files/modules to touch and a suggested approach
contracts/escrow/src/lib.rs,contracts/escrow/src/storage.rs, and associated tests.Testing & Validation — how the contributor should prove it works
cargo test --package astroid-escrowto verify all escrow and milestone test cases.stellar contract buildto ensure compilation succeeds.Submission Guidelines — must open a PR that includes "Closes #"; assignment is required before starting; follow the repo's existing style and conventions.
Wave complexity: Medium