⚠️ NOTICE: Deployment Testing in Progress We have recently deployed a major platform update and are currently performing post-deployment testing and validation. Please do not use this website or submit any transactions until testing is complete. Some features may be unavailable or behave unexpectedly. Thank you for your patience as we work to ensure everything is functioning correctly.
Milestone-based approval
The client approves each milestone by signing an approval with their wallet. Both parties are told as each one is approved; the contract is fulfilled when all are, or breached at the deadline.
milestone-approval v1Who enforces what
- Condition
m1Approval givenCryptographically verifiable - Condition
m2Approval givenCryptographically verifiable - Condition
m3Approval givenCryptographically verifiable - Action
m1ApprovedSend a notificationApplication-enforcedpreview - Action
m2ApprovedSend a notificationApplication-enforcedpreview - Action
allApprovedRecord the outcomeApplication-enforced
- Consensus-enforced
- Every DigiByte node enforces it. Nobody can override it, including Contracts.
- DigiAsset-indexer-enforced
- DigiAsset indexers apply it after a transaction confirms. It is not DigiByte consensus: a valid DigiByte transaction can still be treated as burning assets.
- Application-enforced
- Contracts decides it in its own application, from data you can check. You trust Contracts' nodes, records and evaluation.
- Cryptographically verifiable
- Anyone can check it from public data and mathematics alone (wallet signatures, drand). Contracts records it; you need not trust Contracts to verify it.
Before it can be signed, fill in
- a DigiByte address for every party
- the milestones (in the terms and the approval labels)
Simulation
The standard scenarios, run through the same rule engine the live service uses, with example values in every blank (addresses nobody holds keys for, and a format-valid example asset).
| Scenario | Outcome | Actions |
|---|---|---|
Nothing happens Everyone signs, then nobody does anything until expiry. | breached | none |
Milestone 1 approved happens The least that makes rule “Milestone 1 approved” true happens at block 24500005. | breached | m1Approved: send notification (preview) |
Milestone 2 approved happens The least that makes rule “Milestone 2 approved” true happens at block 24500005. | breached | m2Approved: send notification (preview) |
Every milestone approved happens The least that makes rule “Every milestone approved” true happens at block 24500005. | fulfilled | m1Approved: send notification (preview) m2Approved: send notification (preview) allApproved: update contract state (execute) |
Data unavailable The rule conditions are met, but every outside data source is unreachable. Nothing irreversible may happen. | fulfilled | m1Approved: send notification (preview) m2Approved: send notification (preview) allApproved: update contract state (execute) |
Rules
1. Milestone 1 approved
When “m1”
- → Notify the client and contractor (status changed).Application-enforcedPreview
2. Milestone 2 approved
When “m2”
- → Notify the client and contractor (status changed).Application-enforcedPreview
3. Every milestone approved
When “m1” AND “m2” AND “m3”
- → Record the outcome: fulfilled. The contract ends.Application-enforcedIrreversible
Expiry
At DigiByte block 24,540,320 (20 confirmations), if no outcome has been recorded, the contract ends as breached. Nothing that happens at or after expiry counts.
Conditions
m1Approval givenCryptographically verifiableThe client approves “Milestone 1” by signing an approval with their DigiByte wallet.
A DigiByte message signature by the party, naming this contract version and the subject. Anyone can verify it; Contracts records it and counts it from the next block.
- An approval cannot be withdrawn once recorded.
- An approval submitted after the expiry does not count.
m2Approval givenCryptographically verifiableThe client approves “Milestone 2” by signing an approval with their DigiByte wallet.
A DigiByte message signature by the party, naming this contract version and the subject. Anyone can verify it; Contracts records it and counts it from the next block.
- An approval cannot be withdrawn once recorded.
- An approval submitted after the expiry does not count.
m3Approval givenCryptographically verifiableThe client approves “Milestone 3” by signing an approval with their DigiByte wallet.
A DigiByte message signature by the party, naming this contract version and the subject. Anyone can verify it; Contracts records it and counts it from the next block.
- An approval cannot be withdrawn once recorded.
- An approval submitted after the expiry does not count.
What you are trusting
DigiByte itself does not enforce these rules. Contracts evaluates them from public data and records the outcome; the parties’ signatures and any anchors can be checked by anyone.
- Contracts' evaluation and records
- Contracts to record an approval when the party submits it
Irreversible once done
- Every milestone approved: Record the outcome: fulfilled. The contract ends.
These run only when every condition they depend on is known. Missing or unconfirmed data never triggers them.
Some parts are in preview: they are part of the agreement, but Contracts will monitor or perform them only once that feature launches.
Use it from code
The same template is available from the API (GET /api/contracts/v1/templates/milestone-approval) and the TypeScript SDK:
const { draft } = await client.templates.get("milestone-approval");
// fill in addresses and amounts, then:
const { id } = await client.contracts.create(draft, { idempotencyKey: crypto.randomUUID() });