For the complete documentation index, see llms.txt. This page is also available as Markdown.

Release phase

Execute settlement in Trustless Work V2 after approval conditions are satisfied, with explicit Release Signer authorization, fee calculation, and dispute protection.

The Release Phase is where escrow authorization becomes settlement.

This is the point where funds actually leave the escrow contract and are transferred to their intended recipients.

Release answers:

Can the approved economic outcome now be executed?

The lifecycle distinction remains:

Status = communication

Approval = validation

Release = settlement

Approval does not move funds.

Release does.


Who can release funds?

Only an address assigned to the escrow's Release Signers role can execute a release.

V2 supports multiple Release Signers.

For example:

Any authorized Release Signer can execute a valid release.

Other roles do not gain this permission automatically.

Being an:

  • Approver

  • Service Provider

  • Platform

  • Admin

  • Receiver

  • Observer

does not by itself grant release authority.

Review Roles and Permissions


Release does not bypass contract conditions

A Release Signer has authority to execute an eligible settlement.

They do not have authority to override the escrow rules.

Before transferring funds, the contract verifies conditions such as:

  • the signer is authorized

  • the required approval thresholds are satisfied

  • the relevant settlement has not already been released

  • there is no unresolved dispute blocking settlement

  • sufficient funds are available

This distinction is important:

A Release Signer controls execution, not eligibility.

The contract determines whether the settlement is eligible.


Single-Release settlement

A Single-Release Escrow has one economic outcome.

Before release, every milestone must satisfy its configured approval target.

For example:

If all milestones satisfy their thresholds and the escrow is not disputed or already released, an authorized Release Signer can execute settlement.

The contract then releases the entire escrow amount.

Conceptually:

Single Release does not pay milestones independently.

The milestones collectively act as gates for one final settlement.

Compare Escrow Types


Multi-Release settlement

A Multi-Release Escrow settles at the milestone level.

Each milestone has its own:

  • amount

  • Receiver

  • approval state

  • dispute state

  • release state

An authorized Release Signer selects the milestones to release.

For example:

The Release Signer can release Milestones 1 and 3 without waiting for Milestone 2.


Batch release

V2 Multi Release supports releasing multiple eligible milestones in one operation.

For example:

Each selected milestone is validated independently.

Every milestone in the release batch must:

  • satisfy its approval threshold

  • not be disputed

  • not already be released

  • not already have a resolved dispute

Duplicate milestone indices are rejected.

If the batch passes validation, settlement is executed for those milestones.

This is useful for:

  • grant disbursements

  • project payouts

  • recurring operational settlement

  • marketplaces

  • automated settlement systems

  • agent-driven workflows


Disputes block normal release

Release cannot be used to bypass an active dispute.

Single Release

If the escrow is disputed, the normal release path is blocked.

The dispute applies to the entire protected settlement.

Multi Release

If a specific milestone is disputed, that milestone cannot be normally released.

Other eligible milestones can continue independently.

For example:

Once a dispute has been resolved, its economic outcome is handled through the dispute-resolution process rather than the normal release path.

Read Dispute Resolution


Fee distribution

Release calculates the economic distribution automatically.

For each settlement amount:

The current Trustless Work protocol fee is:

The Platform Fee is the optional fee configured during escrow setup.

For example:

assuming a 1% Platform Fee.

The contract performs the fee calculation during settlement.


Where the fees go

On release:

  • the Trustless Work protocol fee is sent to the Trustless Work fee address

  • the Platform Fee is sent to the configured Platform address

  • the remaining amount is sent to the Receiver

For Single Release, there is one Receiver.

For Multi Release, each released milestone pays its own configured Receiver.


Release state

Successful settlement updates the contract state so that the same economic obligation cannot be released twice.

Single Release

The escrow-level release state becomes:

The entire Single-Release escrow is now settled.

Multi Release

Each released milestone is updated independently:

This prevents already-settled milestones from being paid again while allowing the remaining milestones to continue.


Effects before transfers

V2 updates release state before executing token transfers.

This is an important smart-contract security pattern.

Conceptually:

rather than:

Updating state before external token interactions reduces the risk of the same settlement being executed recursively or more than once.


Approver + Release Signer

Sometimes the same participant is intentionally responsible for both validation and settlement.

For example:

V2 supports an approve-and-release operation for this configuration.

The signer must hold both roles.


Multi Release

For Multi Release, approve-and-release can:

  1. approve the selected milestones

  2. validate their release eligibility

  3. release those milestones

in a single transaction.

Conceptually:


Single Release

For Single Release, approve-and-release can approve selected milestones and then attempt the final escrow settlement.

However, all milestones must satisfy their approval targets before the release can succeed.

For example:

An approve-and-release call for Milestone 2 cannot release the escrow because Milestone 3 still has not satisfied its approval requirement.

Once every milestone is approved, the final settlement can execute.


When should approval and release be combined?

Combining both permissions can simplify workflows where the same participant legitimately controls both decisions.

Examples might include:

  • simple marketplace payments

  • automated settlement policies

  • internal operational workflows

  • agent-controlled execution with predefined authority

But it changes the trust model.

Separating:

from:

creates an additional authorization boundary.

Whether those roles should be separate is an application design decision.

Review the Approval Phase


The Receiver can also be a Release Signer

In some workflows, the Receiver may also intentionally be assigned as a Release Signer.

That can produce a claim-like experience:

In other workflows, settlement may be executed by:

  • a platform

  • an operations wallet

  • a finance team

  • an automated service

  • another authorized signer

The contract does not infer release authority from who will receive the funds.

The address must explicitly hold the Release Signer role.


What happens on-chain?

When an authorized Release Signer executes a valid release:

  1. The contract verifies the signer.

  2. Approval requirements are checked.

  3. Dispute state is checked.

  4. Previous release state is checked.

  5. The settlement is marked as released.

  6. Trustless Work and Platform fees are calculated.

  7. Fees are transferred to their configured addresses.

  8. The net settlement amount is transferred to the Receiver.

  9. A release event is emitted.

For Multi Release, this process applies to every milestone included in the release operation.


Release events

Successful settlement emits an on-chain release event containing the economic result of the operation.

For Multi Release, the event includes payout information for the milestones released in that transaction.

This provides an auditable record of:

  • settlement amounts

  • Receivers

  • Trustless Work fees

  • Platform fees

  • net payouts

Applications can use these events to update their own settlement history and reporting.


Example: Single Release

Consider a 10,000 USDC development agreement.

Release calculates:

The entire escrow is then marked released.


Example: Multi Release

Consider this milestone:

The milestone is eligible for settlement.

After release:

The other milestones remain unchanged and continue through their own lifecycle.


Output of the Release Phase

After a successful release:

  • the relevant economic obligation has been settled

  • the release state prevents duplicate settlement

  • Trustless Work fees have been distributed

  • Platform fees have been distributed

  • the Receiver has received the net payout

  • the settlement is recorded on-chain

  • the release event can be indexed by applications

For a happy-path transaction, this is the final economic phase of the escrow.

If settlement is contested before release, the lifecycle moves through the dispute path instead.

Continue to Dispute Resolution


Escrow Lifecycle

Approval Phase

Escrow Types

Roles and Permissions

Escrow Properties

Last updated