circle-check
Our docs are AI-ready. Use them as context for any AI, or ask questions via the search bar.

Escrow Properties

An escrow is just structured data β€” a JSON body that defines how funds are held, released, and tracked. Each property tells the contract who does what, when funds move, and under which conditions.

TLDR:

  • Single-Release β†’ all milestones must be approved for one payout.

  • Multi-Release β†’ each milestone unlocks its own payout.

Below we break down the core properties of every escrow, and then highlight the differences between Single-Release and Multi-Release.

Single Release escrow

Core Structure

  • Escrow ID The on-chain identifier of the contract (also the deposit address). This is where funds are actually sent and locked.

  • Engagement ID & Title Configurable strings that help you identify the escrow in your own system β€” for example, linking it to an invoice, project ID, or marketplace order.

  • Description Human-readable explanation of the escrow’s purpose. Useful for context in dashboards, audits, or dispute resolution.

  • Roles Every escrow defines who can act on it:

    • Approver β†’ validates milestone completion

    • Service Provider β†’ delivers the work

    • Platform Address β†’ the platform itself, able to take fees or adjust config before funding

    • Release Signer β†’ executes the release of funds

    • Dispute Resolver β†’ arbitrates conflicts, can re-route funds

    • Receiver β†’ final destination of the funds πŸ‘‰ See Roles for full detail.

  • Amount & Platform Fee

    • Single-Release: the total amount to be paid once conditions are met, plus an optional platformFee percentage sent to the platform.

    • Multi-Release: the total amount is distributed across milestones (each milestone defines its own amount). The platform fee still applies globally.

  • Trustline Defines the token being used (address and decimals). This is how Stellar escrows know which asset to accept. Typically USDC, but any Stellar-issued token is supported.

  • Flags Internal state markers that describe what’s happening:

    • disputed β†’ a party raised a dispute

    • released β†’ funds have already been released

    • resolved β†’ a dispute has been settled

    • approved (Multi-Release only) β†’ milestone has been approved by approver


Milestones

Milestones define what must be completed to unlock funds.

  • Single-Release Escrow

    • You can define one or many milestones, but the release is all-or-nothing.

    • Funds are only released once all milestones are approved.

    • Each milestone tracks:

      • description β†’ what’s being delivered

      • status β†’ pending, approved, in dispute, etc.

      • evidence (optional) β†’ proof of delivery

      • approvedFlag β†’ true when the approver signs off

  • Multi-Release Escrow

    • Each milestone has the same properties as the single release, plus its own amount and flags.

    • When a milestone is approved, its funds can be released without waiting for others.

    • Milestones include:

      • amount β†’ how much is unlocked upon approval

      • flags β†’ released, disputed, resolved

      • Receiver β†’ final destination of the funds

This structure allows a project to fund and release in phases, not all at once.


Putting It Together

  • Single-Release = one payout, triggered when all milestones are approved. Amount + release & dispute flags live at the top level of the escrow.

  • Multi-Release = multiple payouts, each milestone has its own amount and flags. The total escrowed amount is distributed across milestones.

Both share the same core structure β€” IDs, roles, description, trustline, and platform fee. The difference is:

  • Single-Release β†’ milestones are β€œcheckpoints” for one big release.

  • Multi-Release β†’ milestones are β€œtranches,” each tied to its own release.


πŸš€ Next Steps

Last updated

Was this helpful?