HTLC timelocks encode binding forward trades without a custodian
Baris Sozen explains how the HTLC primitive — typically used for spot atomic swaps — can be repurposed to bind forward trades between anonymous software agents without any clearing house, margin, or custodian.
Score breakdown
The construction removes the need for clearing houses and custodians in agent-to-agent forward trades by replacing institutional intermediaries with two HTLC contracts and one shared secret, making binding forward settlement possible between fully anonymous software counterparties.
- 01The post is authored by Baris Sozen and published on Dev.to.
- 02Standard atomic swap explanations cover only the spot case; the post extends HTLCs to forward trades settling at T+24h or T+48h.
- 03In a forward HTLC, both agents fund their legs at t=0 but the claim window opens only at the future settlement date T.
Baris Sozen's post addresses a gap in standard atomic swap explanations: they assume settlement happens immediately, but many real-world agent interactions are forwards — two agents agree on terms today and settle at a future point such as T+24h or T+48h. Examples include procurement agents pre-committing to a delivery, treasury agents locking a future FX-equivalent rate, or market-making agents quoting a forward to offload inventory risk. In traditional markets, the gap between agreement and settlement is bridged by clearing houses, posted margin, and credit desks. Strip those away — as is necessary in a market of anonymous software agents — and a naive forward collapses, because either side can simply not show up when the price has moved against them.
The post's core argument is that the HTLC primitive can be repurposed to solve this.
The post's core argument is that the HTLC primitive can be repurposed to solve this. In the standard spot case, the timelock is merely a safety hatch to prevent funds from being trapped forever. For a forward, the timelock becomes the instrument itself: funds are committed at agreement time (t=0), but the claim window is set to open only at the future settlement date T. During the entire term, neither agent can withdraw — the only available transitions are "clear" inside the settlement window or "refund" after the deadline. When the window opens, whichever party holds the preimage claims their leg, publishing the secret on-chain, which simultaneously unlocks the other leg. If the window closes with no claim, both legs refund to their original owners with no loss beyond a locked-capital window.
Sozen identifies three properties this construction delivers without intermediaries: binding obligation (once funded, neither party can unilaterally walk away), no custody (the contract itself is the escrow, never a counterparty or platform), and no margin or credit check (settlement is collateralized by the locked legs themselves, so default is a refund event rather than a loss event). The post also notes that traditional clearing houses depend on identity and legal recourse — assumptions that break down entirely for anonymous agents transacting across chains.
Key facts
- 01The post is authored by Baris Sozen and published on Dev.to.
- 02Standard atomic swap explanations cover only the spot case; the post extends HTLCs to forward trades settling at T+24h or T+48h.
- 03In a forward HTLC, both agents fund their legs at t=0 but the claim window opens only at the future settlement date T.
- 04The only two exits from the contract are 'clear' (atomic settlement via shared preimage) or 'refund' (timelock expiry returns funds to original owners).
- 05No clearing house, posted variation margin, counterparty credit assessment, wrapped IOU, or bridge multisig is required.
- 06Default is not a loss event — it is a refund; the worst case is a wasted locked-capital window.
- 07Traditional clearing houses rely on identity and legal recourse, assumptions that break down for anonymous agents transacting across chains.
Topics
Summary and scoring are generated automatically from the original article. We always link back to the publisher and never republish images or paywalled content. Last processed Jun 15, 2026 · 11:57 UTC. How this works →