Conditional Execution
Status: conceptual, last checked 2026-11-02. No general condition engine exists. The Cardano prototype’s Complete path has no release condition beyond an id, so it doesn’t provide this yet.
A client funds a project with three milestones. Each payment is released when an agreed reviewer signs off.
The pattern
- The parties sign the terms: milestones, amounts, the reviewer and a deadline for each step.
- The SPAWN commitment includes those conditions, so the rules can’t change after funding without a new version.
- The client funds the destination. Funded doesn’t mean released.
- Evidence arrives, here a reviewer’s signed statement that a milestone is complete.
- Execution checks that the evidence matches the committed rule, then releases that amount once.
- Timeouts apply. If the deadline passes with no sign-off, the committed fallback runs, such as a refund or dispute.
Who do you trust for the condition?
A contract can verify a signature. It can’t tell whether the design work was good. Every condition depends on some source:
| Evidence source | What you trust |
|---|---|
| A named reviewer’s signature | That person |
| Threshold of reviewers | A majority not colluding |
| On-chain state | The network and the contract read |
| An oracle or API | Its operator and data source |
State this source in the terms. “Trustless” is rarely accurate for real-world conditions.
Also decide
Say what happens with a partial delivery, a disputed sign-off or a reviewer who disappears. Decide this before funding, because the contract can only do what was committed.
Explore invoicing: Programmable Invoicing
Last updated on