⏳ HTLC TIMELOCKS: THE CLOCK THAT PROTECTS A CROSS-CHAIN SWAP

Omniston uses linked HTLCs: a bid HTLC on the source chain and an ask HTLC on the destination chain. Both use one hashlock.

🔐 ONE SECRET, TWO LOCKS

The user’s assets are locked on the source side while a resolver commits its own assets on the destination side. When the user claims the destination asset, the secret becomes public and the resolver can use it to claim the source funds.

The flow is:

- User locks assets on the source chain.
- Resolver locks assets on the destination chain.
- User claims and reveals the secret.
-Resolver uses it to claim the source funds.

⏱ THE TIMELOCK IS NOT A SWAP TIMER

A timelock is not the normal time a swap should take. STONfi describes most cross-chain swaps as completing in roughly 15–40 seconds. The timelock is a longer safety deadline used when something gets stuck.

Before expiration, the secret can unlock the HTLC. After expiration, the original owner can refund it. This creates a defined failure path.

🌐 WHY TWO CLOCKS MUST DIFFER

The deadlines cannot simply be identical. The resolver acts second, so the source-side bid HTLC needs to remain valid after the destination-side ask HTLC.

Consider the failure case:

- User claims near the destination deadline.
- The secret becomes visible on-chain.
- Congestion delays the resolver’s source-side claim.
- If the source deadline expires first, the user could refund the original funds.

The gap gives the resolver reaction time. Its size depends on finality and network delays. That gap is the safeguard.

Omniston also supports partial fills as independent sub-swaps. Each slice has its own HTLC pair, limiting the impact of a failed portion.

Timelocks are not there to make successful swaps slow. They define a controlled exit when settlement fails.

Not investment advice - research on your own! 🚀

$GRAM