Skip to content

[Feature]: Partial Milestone Payment Release #190

Description

@SudiptaPaul-31

🔍 Problem Statement

Description

Implement secure partial payment releases for milestone-based contracts. This allows clients to approve and release funds for individual milestones while ensuring escrow balance integrity and preventing double spending.


Requirements

  • Each milestone has an allocated amount — defined at contract creation.
  • Client approves individual milestones — approval triggers release of that milestone’s funds.
  • Contract releases only that milestone's funds — no excess withdrawal allowed.
  • Prevent double spending/double release — enforce idempotency checks.
  • Track remaining escrow balance — update after each release.
  • Emit contract events — log approvals, releases, and balance updates.

Acceptance Criteria

  • Remaining escrow balance is tracked — contract state reflects updated balance after each release.
  • Released amount cannot exceed milestone allocation — strict enforcement of limits.
  • All important actions emit contract events — visible in transaction logs for transparency.
  • Double release attempts are rejected — contract prevents duplicate payouts.
  • Client-only authorization — only the client can approve and trigger milestone releases.
  • Comprehensive contract tests — cover valid releases, invalid attempts, and edge cases.

📈 Expected Impact

High — Would significantly improve user experience

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions