SettleMint
User guidesSystem addonsXvP settlementHTLC settlements

Overview

HTLC settlements coordinate asset exchanges across EVM networks using hash time-locked contracts. Learn when to use HTLC and what each DALP settlement controls locally.

HTLC (Hash Time-Locked Contract) settlements coordinate asset exchanges when tokens sit on different EVM networks. Each DALP settlement executes only its local flows. A shared hashlock links the matching settlements so the same secret can unlock each chain's local execution before its cutoff date.

This overview is for operators, integrating developers, and reviewers who need the section boundary before they configure or audit an HTLC settlement. The platform controls local approvals, escrowed local flows, secret reveal, execution, cancellation, expiry, and withdrawal on the chain where that settlement exists. The parties that create the matching settlements own the cross-chain coordination: choosing the shared hashlock, staggering timelocks, revealing the secret on the intended chain, and reusing that revealed secret before the other settlement expires.

HTLC settlement docs do not cover bridge transfers, non-EVM networks, off-chain asset movement, or execution of another chain's settlement from the local contract. For single-chain exchanges, use local settlements instead. For the protocol mechanics, read HTLC explained next. For an end-to-end setup example, read the HTLC walkthrough.

When to use HTLC settlements

Use HTLC settlements when:

  • Assets being exchanged exist on different EVM networks
  • Each chain needs its own local settlement, but both settlements must share one hashlock
  • Participants need the revealed secret to unlock the matching settlement on another chain before expiry

How HTLC settlements work

HTLC settlements use two linked components:

  1. Hashlock - A cryptographic hash that links settlements across chains
  2. Timelock - A deadline after which the settlement expires

One party generates a secret and shares only the hash (hashlock) with the other participants. The matching settlement on each chain uses the same hashlock.

After all local senders approve, any caller with the correct secret can reveal it. If auto-execute is enabled, DALP executes that settlement's local flows after the reveal.

The "Armed" state

HTLC settlements have a unique state called "Armed" that occurs after all local senders approve but before the secret is revealed:

Rendering diagram...
StateDescription
PendingSettlement created, waiting for sender approvals
ArmedAll senders approved, waiting for secret to be revealed
ExecutedSecret revealed, all flows completed
CancelledSettlement cancelled before armed
ExpiredCutoff date passed before secret was revealed

External flows

HTLC settlements include two types of flows:

  • Local flows - Execute on the current chain when the settlement completes
  • External flows - Informational references to assets on other chains

External flows do not execute locally. They describe the assets and counterparties expected on the other chain.

Each party still operates its own chain's settlement: create, approve, reveal, execute, cancel, or withdraw there.

External flow purpose

External flows help all parties read the complete transaction structure. They do not transfer assets from the local settlement contract.

Auto-execute behavior

When auto-execute is enabled (the default), a settlement executes after both conditions are true:

  1. Every local sender has approved the settlement.
  2. The correct secret has been revealed.

If auto-execute is disabled, anyone can call execution after those conditions are true.

Timelock coordination

For cross-chain safety, timelocks must be staggered:

  • The settlement where the secret is revealed first should have the later cutoff.
  • The matching settlement should leave enough time for the other party to reuse the revealed secret before expiry.

For a detailed explanation of how hashlocks ensure security, see HTLC explained.

Cancellation rules

SituationCancellation possible?
Before all local senders approveYes. A local participant can cancel while the settlement is still pending.
Armed, before secret revealYes, after every local participant has proposed cancellation.
After secret revealNo. Cancellation is no longer allowed.

Unanimous cancellation required

Once an HTLC settlement is armed, every local participant must send a cancellation vote before the secret is revealed. When the last required vote lands, the settlement is cancelled and escrowed assets are refunded. See how to cancel a settlement.

Example scenario

Cross-chain bond purchase:

  • Investor has 100,000 USDC on Polygon.
  • Bank has 1,000 BOND tokens on Ethereum.
  • They want linked settlements without moving either asset away from its own network.

The bank creates the Ethereum settlement with a hashlock. The investor creates a matching Polygon settlement with the same hashlock. After both settlements are armed, the bank reveals the secret on Polygon to unlock the USDC settlement. The investor then reuses the revealed secret on Ethereum to unlock the bond settlement.

For a complete multi-party example with balance tracking, see the HTLC walkthrough. For a focused operator check before approval or secret reveal, see verify external flows.

Further reading

On this page