How programmable escrow works

Define who can act, what must happen before money moves, and when stablecoins can be released — without giving custody to a central intermediary.

The core idea

Who must do what before money can move?

Trustless Work turns that question into programmable escrow infrastructure. Funds are held non-custodially in smart contracts, while roles, milestones, approvals, release authority, and exception paths define the transaction's trust model.

The application controls the experience; Trustless Work provides the escrow primitive underneath. This lets platforms and enterprises embed conditional stablecoin payments without designing and maintaining bespoke escrow contracts from scratch.

Escrow lifecycle

Roles sign actions. Actions mutate the escrow.

The blue boxes are snapshots of the same escrow contract over time. Authorized roles sign functions that change properties, state, or balances.

Example

1,000 USDC milestone escrow

Roles define authority, not necessarily unique users or wallets. Compatible roles may be assigned to the same address depending on the workflow and contract rules.

Step 1

Configure and initialize the escrow

Issuer / Platform

Action

initializeEscrow()

escrow configurations

Result

Initialized

Step 2

Fund the protected balance

Depositor / Payer

Action

fund() or deposit from any Stellar Address

amount

Result

Funded

Step 3

Report milestone progress

Service Provider

Action

update milestones

status, evidence

Result

Work Reported

Step 4

Validate the agreed condition

Approver

Action

approve()

Result

Approved

Step 5

Execute the authorized release

Release Signer

Action

release()

Result

Released

Open this page on a tablet or desktop to explore the full interactive escrow state diagram.

Roles authorize actions

A role signs a permitted function call. The role does not directly rewrite escrow state.

Actions mutate the contract

Functions can change escrow properties, lifecycle state, move balances, or combine those effects.

The contract owns the state

Each blue snapshot shows the same escrow after an authorized action has changed its state or properties.

Action by action

See exactly what each signed action changes

Each step uses the same model: an authorized role signs a function, the function mutates the escrow contract, and the resulting state becomes the input for what happens next.

Step 1

Configure and initialize the escrow

The issuer or platform defines the escrow configuration and creates the escrow instance. The contract starts with milestones and roles already configured and a zero balance.

Signed byIssuer / Platform

Step 2

Fund the protected balance

The depositor or payer funds the escrow, or funds can be deposited from any Stellar address. The balance becomes protected and the configured roles are locked while funds remain in the contract.

Signed byDepositor / Payer

Step 3

Report milestone progress

The service provider updates a milestone with status or evidence. The contract data changes while the protected balance remains in escrow.

Signed byService Provider

Step 4

Validate the agreed condition

The approver confirms that the milestone or agreed condition has been satisfied. Approval changes validation state; it does not move the 1000 balance.

Signed byApprover

Step 5

Execute the authorized release

The release signer executes payment after the required conditions are satisfied. This action moves balances out of escrow and distributes value to the configured destinations.

Signed byRelease Signer

Exception path

What happens when there is a dispute?

A dispute interrupts the normal settlement path. An authorized role opens the dispute, the escrow enters a disputed state, and the dispute resolver signs the resolution that determines the settlement outcome.

Escrow Contract

Active Escrow

BalanceProtected
StatusIn progress
DisputeNo

Authorized Role

raiseDispute()

reason, evidence

Escrow Contract

Disputed

BalanceProtected
DisputeOpen
Release pathPaused

Dispute Resolver

resolveDispute()

resolution outcome

Escrow Contract

Resolved

DisputeResolved
OutcomeDetermined
BalanceReady to settle

Which role may open a dispute depends on the contract version and configured workflow. The dispute resolver is a resolution role, not the party that opens the dispute.

The primitives behind programmable escrow

Funds

What it is: Stablecoins held by the escrow contract until release conditions are satisfied.

Why it matters: The payment is protected without requiring a central operator to custody funds.

Roles

What it is: Explicit authorities for funding, reporting progress, approving outcomes, releasing funds, administration, or resolving exceptions.

Why it matters: The trust model becomes visible instead of being hidden inside manual operations.

Milestones

What it is: Conditions or checkpoints that describe what must happen before payment can progress.

Why it matters: They connect economic outcomes to observable delivery, verification, or process state.

Release rules

What it is: Contract-enforced conditions that determine when an authorized actor may move funds.

Why it matters: Approval, release authority, and fund receipt can remain separate instead of collapsing into one party.

Auditability & Observability by Design

Trustless Work creates a complete, observable record of how funds move and who approved each step. Every escrow tells a clear story — without external logs, emails, or spreadsheets.

Structured Approval History

  • Every approval is recorded
  • Each signature is linked to a specific role
  • No ambiguity about who approved what

Post-Hoc Auditability

  • Escrows can be reviewed after completion
  • Approvals and releases are already structured
  • No reconciliation across systems required

Example: Payroll

Payroll processed through escrow can be audited after the fact by simply reading the escrow state. Every approval and release is already visible and verifiable.

How Escrow Is Used in Real Systems

Capital Inflows

When capital enters your platform, escrow ensures funds are reserved, transparent, and conditionally used.

  • Crowdfunding and pre-funding
  • Security deposits and collateral
  • Investor capital and tokenization flows
  • Prepaid and escrow-backed services
Explore capital inflow use cases →

Capital Outflows

When capital leaves a treasury, escrow enforces milestone-based release and long-term auditability.

  • Payroll and contractors
  • Grants and bounties
  • Milestone-based projects
  • Treasury-controlled distributions
Explore capital outflow use cases →

Platform in the Middle

When a platform coordinates payments between parties, escrow enables trust without custody.

  • Marketplaces and freelance platforms
  • P2P exchanges and OTC desks
  • Trade finance and delivery-vs-payment
  • Asset-backed commerce
Explore platform use cases →

Escrow Types

Single-Release Escrow

The protected amount is released once after the required approval conditions are satisfied.

Best suited for:

  • Security deposits
  • Asset transfers
  • One-time service agreements
  • Simple buyer–seller transactions

Why it matters:

  • Reduces complexity for straightforward agreements
  • Fits workflows where one protected payment follows final acceptance
  • Minimizes coordination overhead

Multi-Release Escrow

Funds can be released progressively as milestone-specific approval conditions are satisfied.

Best suited for:

  • Milestone-based projects
  • Grants and funding programs
  • Long-running service engagements
  • Progress-based payments

Why it matters:

  • Reduces risk over time
  • Aligns payments with progress
  • Provides ongoing control and visibility

What You Can Build with Trustless Work

Conditional Payments

  • Marketplace buyer–seller flows
  • Gig and freelance payments
  • Escrow-backed service agreements

Capital Allocation & Control

  • Grants and milestone-based funding
  • Crowdfunding with progress checks
  • Treasury-controlled disbursements

Asset-Backed Workflows

  • Security deposits
  • Trade and delivery-based payments
  • Escrow-backed guarantees

Enterprise Approvals

  • Vendor payments
  • Internal approval flows
  • Compliance-driven fund releases

Who Uses Trustless Work

Platforms & Marketplaces

Enable trusted payments without building escrow infrastructure from scratch.

Stablecoin-Native Businesses

Coordinate payments and approvals with full visibility and control.

Enterprises

Introduce structured approvals and auditability into financial workflows.

Financial Innovators

Design new money flows that require accountability and transparency.

Builders & Product Teams

Integrate Trustless Work into platforms and workflows, enabling others to benefit from escrow without building trust infrastructure themselves.