---
library: "bootstrap"
slug: "HeldRelease"
name: "HeldRelease"
ref: "HeldRelease#ce65"
hash: "sema:HeldRelease#mh:SHA-256:ce65cfd49c0f96fa291163b563d1a0ad78e09059fdd4889f571cba8d101b721f"
type: "Protocols"
layer: "Society"
version: "0.11.0"
root: "a6a3d1ff0f982ee30430c5b42f3784c8ec901fd68482cfc1bc30899c1e5e48c5"
license: null
url: "https://semahash.org/vocabularies/bootstrap/patterns/HeldRelease"
---

# HeldRelease

Escrow primitive: value held until condition preimage revealed or timeout

Society · Protocols

## Mechanism

[Value](https://semahash.org/vocabularies/bootstrap/patterns/Value.md) ([UniqueHandle](https://semahash.org/vocabularies/bootstrap/patterns/UniqueHandle.md)) held until condition met, released or returned on timeout. DEPOSIT: Party A sends value + condition_hash + timeout to escrow address. CLAIM: Party B submits condition_preimage; if hash(preimage) matches condition_hash, value releases to B. TIMEOUT: If timeout expires without valid claim, value returns to A. [State](https://semahash.org/vocabularies/bootstrap/patterns/State.md) transitions: EMPTY --deposit--> HELD --claim(valid)--> RELEASED_TO_B | --timeout--> RETURNED_TO_A. Primitives: hash [CommitmentDevice](https://semahash.org/vocabularies/bootstrap/patterns/CommitmentDevice.md) (SHA256 pre-commitment locks the claim surface before the preimage exists), timelock (block height), 2-of-2 multisig or smart contract.

## Invariants

- Exactly one of Empty, Held, Released or Returned; no partial [State](https://semahash.org/vocabularies/bootstrap/patterns/State.md).
- Releases only on a preimage whose hash matches the committed [Condition](https://semahash.org/vocabularies/bootstrap/patterns/Condition.md).
- Returns to the sender if the condition is unmet by `hold_duration`.

## Parameters

- hold_duration: type=Duration, range=[1s, 24h], description=Longest the value stays held before it returns to the sender.

## Failure modes

- Preimage loss: If Party B loses the preimage, value returns to A on timeout (safe but B loses).
- [Condition](https://semahash.org/vocabularies/bootstrap/patterns/Condition.md) ambiguity: Hash commits to bytes, not semantics - parties must agree on preimage meaning off-chain.
- Timeout racing: Near timeout, both CLAIM and TIMEOUT may be in flight - needs atomic resolution.
- Oracle dependency: If condition requires external verification, oracle becomes trust point.

## Where this came from

—

## Builds on

- [CommitmentDevice](https://semahash.org/vocabularies/bootstrap/patterns/CommitmentDevice.md) (references)
- [State](https://semahash.org/vocabularies/bootstrap/patterns/State.md) (references)
- [Value](https://semahash.org/vocabularies/bootstrap/patterns/Value.md) (references)
- [Condition](https://semahash.org/vocabularies/bootstrap/patterns/Condition.md) (references)
- [UniqueHandle](https://semahash.org/vocabularies/bootstrap/patterns/UniqueHandle.md) (accepts)

## Used by

- [Award](https://semahash.org/vocabularies/bootstrap/patterns/Award.md) (composes_with)
- [Oracle](https://semahash.org/vocabularies/bootstrap/patterns/Oracle.md) (references)

## Identity

- Library: bootstrap 0.11.0 (root a6a3d1ff0f98)
- Ref: HeldRelease#ce65
- Hash: sema:HeldRelease#mh:SHA-256:ce65cfd49c0f96fa291163b563d1a0ad78e09059fdd4889f571cba8d101b721f

## Links

- Page: https://semahash.org/vocabularies/bootstrap/patterns/HeldRelease
- JSON: https://semahash.org/vocabularies/bootstrap/patterns/HeldRelease.json
- Library: https://semahash.org/vocabularies/bootstrap
- Library index: https://semahash.org/vocabularies/bootstrap/index.json
