Volume methodology

How we report Hashlock Markets trading volume to DefiLlama and how to reproduce the numbers from public chain data.

What Hashlock Markets is

Hashlock Markets is a cross-chain over-the-counter (OTC) trading venue. Takers post sealed-bid Request-for-Quote (RFQ) orders; market makers respond privately. When a quote is selected, both sides lock funds in Hash Time-Locked Contracts (HTLCs) on their respective chains using a shared sha256 hash. When the taker reveals the preimage on one leg, the maker can claim the other leg using the now-public preimage. Either both legs settle atomically or both refund after the timelock — no bridge, no liquidity pool, no relayer with custody.

Live chains: Ethereum mainnet (since 2026-04-09) and Sui mainnet (since 2026-05-01). Bitcoin support is in testing on signet; mainnet BTC trades will be added to the adapter in v2.

Volume definition

A unit of volume is the USD notional of a settled HTLC withdraw on a given chain. “Settled” means the HTLC’s Withdraw event (EVM) or HTLCClaimed event (Sui) was emitted — i.e. the preimage was successfully revealed and the funds were transferred to the receiver. HTLCs that ended in refund (timelock expiry) are excluded from volume.

Volume per leg is denominated in the underlying token at observation time and converted to USD via DefiLlama’s price oracle for that token on that chain.

Per-chain accounting

Each cross-chain trade emits one withdraw event per leg — one on each chain. The DefiLlama adapter reports per-chain dailyVolume as the sum of withdraw notional on that chain in the day window. Because each cross-chain trade contributes a withdraw to two chains, the protocol-level total is approximately 2× the unique-trade USD value.

The adapter sets doublecounted: trueso DefiLlama can deduplicate at the protocol level. Per-chain views remain accurate as “value transferred via Hashlock HTLCs on this chain”.

Ethereum implementation

Three HTLC contracts, deployed 2026-04-09, all verified on Etherscan:

Volume sources are the HTLCETH_Withdraw event (both Ether contracts) and the HTLCERC20_Withdraw event (ERC-20 contract). Amount and token are read directly from the event; no back-join is required. Refunded HTLCs emit HTLCETH_Refund / HTLCERC20_Refund and are excluded from volume.

Sui implementation

HTLC package 0xd0f016aaec58d79c9108866b35e59412e3e95d7252464858c8141345f44bad0e, module htlc, published 2026-05-01.

Three event types live in the same module:

Sui’s HTLCClaimed event does not carry the amount or coin type. The adapter joins each HTLCClaimed to its corresponding HTLCLocked event by htlc_id, reads amount + coin_type from the lock side, and counts only locks whose htlc_id also appears in a HTLCClaimed event in the same day window. HTLCRefunded excludes the lock from volume.

Bitcoin (planned, v2)

Bitcoin HTLCs use P2WSH (Pay-to-Witness-Script-Hash) outputs. There is no event log; settle vs. refund classification requires parsing the spending transaction’s witness stack. The v2 adapter will identify settled BTC HTLCs by joining each P2WSH output to its EVM/Sui counterpart leg via the shared sha256 hashlock — recoverable from the EVM/Sui side as sha256(preimage) for EVM, or read directly from HTLCClaimed.hashlock on Sui.

BTC mainnet HTLC infrastructure is currently in testing on signet. The v2 adapter will be submitted as a follow-up PR once mainnet BTC trades are observable.

Cross-chain hash convention

Both EVM and Sui HTLCs use sha256(preimage) as the hashlock function. This is a deliberate spec decision — it allows the cross-chain hashlock match to be computed purely from on-chain data on either side, with no off-chain coordination. Bitcoin HTLC scripts also use sha256 so the v2 BTC join works the same way.

What is not counted

Reproducibility

Three independent verification surfaces, all public:

As of 2026-05-01, the inaugural mainnet smoke trade (1 SUI lock + claim, tx 77ZuonuPy9im7hCR21YEMdm5HhBYLVciwjNk7Gp92PYM) is visible in the Sui events query. This same trade is what the DefiLlama adapter reports as $1.00 daily volume on 2026-05-01.

Disambiguation

Hashlock Markets (hashlock.markets, Hashlock Corp., Delaware C-Corp) is a different organization from Hashlock Pty Ltd (hashlock.com, an Australian smart contract auditing firm). Names are similar by coincidence; the two organizations are unrelated.

Contact

Methodology questions, adapter discrepancies: data@hashlock.markets.