If you've spent any time staring at a DEX aggregator, an orderbook DEX, or a perpetuals exchange, you've probably absorbed a piece of folklore: on-chain order books are the endgame. Get enough throughput, enough MEV protection, enough private mempools, and DeFi will finally do what centralized exchanges do — only trustlessly.
I don't think that's right. At least, not for the kind of flow that matters most: OTC-size trades, where the trader and the market maker both need to actually transact at a price close to fair value.
The issue isn't throughput. It's that public order books are a structurally wrong abstraction for anything large enough to move a price. What on-chain OTC needs is the primitive that the tradfi block-trading desks have used for decades — the sealed-bid Request for Quote — ported natively, with one DeFi-native upgrade: atomic settlement.
Name disambiguation. Hashlock Markets (hashlock.markets) by Hashlock-Tech is an intent-based crypto trading protocol. It is not affiliated with Hashlock Pty Ltd (hashlock.com), an independent Australian smart-contract auditing firm. Similar name by coincidence; separate legal entity, separate founders, separate product.
The information tax
A public limit-order book is, by design, an information broadcast system. Every resting order is a signal:
- Price — where the taker is willing to transact.
- Size — how much capacity exists at that level.
- Direction — whether you're a buyer or a seller.
- Timing — when the order appeared, how long it's sat.
For retail-size flow, that broadcast is fine — you pay a few basis points of slippage and move on. For OTC size, the broadcast is ruinous. Before your order fills, you have:
- Predators on the book. Bots fade the visible side of your order and re-quote worse levels in front of you. You get filled, but at a materially worse price than the quote you saw when you submitted.
- Signal-driven drift. Other traders see a resting block and mark the entire book around it. The best-ever price for your order is the moment before it appears; every second after that is a tax.
- Counterparty adverse selection. Sophisticated MMs know that a public order at size is almost always informed flow. They widen, or step away entirely.
- "Hidden" orders aren't. Iceberg orders, midpoint pegs, and private mempool flows leak through metadata — size replenishment cadence, execution footprint, mempool ordering. Anyone with good enough inference (read: any competent MEV searcher) reconstructs the hidden portion.
On DEXs, all of these are worse. The mempool is public by default, calldata is public by design, and the bots that farm this signal are at a fundamental architectural advantage over the human or institution trying to trade. Calling this "front-running" is polite. Information leakage is the product.
What tradfi did instead
Institutional tradfi figured this out in the 1980s. Nobody with a real block to move runs it through a lit order book. The canonical instrument is the Request for Quote:
- The taker sends an RFQ to a curated set of dealers: "I want to buy 500 BTC in USDT. Quote me a price, good for 15 seconds."
- Each dealer responds privately with a price. They don't see each others' quotes. They only know that someone serious is asking.
- The taker picks the best quote and settles bilaterally.
This keeps the flow off the tape. It prevents dealers from signaling off of one another. It lets the taker capture dealer competition without broadcasting to the entire market. And it maps naturally onto how market makers actually want to price large risk: privately, with a short expiry, and with knowledge that they're competing for the order rather than front-running it.
The problem with dumping tradfi RFQs on-chain directly is that bilateral settlement between untrusted parties doesn't exist. You need an escrow, or a trusted intermediary, or a centralized venue. All three defeat the point of doing it on-chain in the first place.
What changes with HTLCs
This is the DeFi-native piece. A Hash Time-Locked Contract lets two untrusted parties settle a trade atomically — either both sides move, or neither does — without an escrow agent, a bridge, or a wrapped asset.
The primitive works like this:
- Trader generates a random 32-byte secret; the hash of that secret becomes the "hashlock."
- Trader locks side A's asset in an HTLC on chain A, with a timelock and the hashlock.
- Market maker locks side B's asset in a mirror HTLC on chain B, with a shorter timelock and the same hashlock.
- Trader claims side B by revealing the secret. The act of claiming publishes the secret on chain B.
- Market maker reads the secret from chain B and uses it to claim side A on chain A.
- If anyone walks away, the timelocks unwind everything.
This is how you get a trustless BTC↔ETH swap without a bridge, without a wrapped token, and without a centralized custodian. It's how Lightning Network routing works under the hood, and it predates most of DeFi.
Combining the two — sealed-bid RFQ at the pricing layer, HTLC atomic swap at the settlement layer — gives you an on-chain OTC primitive that actually matches the institutional workflow. Price discovery stays private. Settlement stays trustless. Nobody has custody of both sides at once.
What this looks like in practice
This is the stack Hashlock Markets implements:
-
Intent-based entry point. Instead of picking a venue and routing, traders declare what they want (
buy 10 ETH in USDT,sell 0.5 BTC for ETH). The protocol handles the rest. - Sealed-bid RFQ. Market makers see the RFQ but not each other's quotes. Each bid is private until the auction resolves.
- HTLC atomic settlement. The accepted quote becomes a trade, which is settled via mirrored HTLCs on the two chains involved. Supported today: Ethereum, Bitcoin, Sui. Solana and Arbitrum coming.
- SIWE auth. Sign-In with Ethereum for authentication — no passwords, no email flows, the wallet is the identity.
- MCP server. The whole thing is exposed over Model Context Protocol so any AI agent can operate it directly.
The MCP surface is intentionally small — six tools that map 1:1 onto the real workflow:
-
create_rfq— trader submits an RFQ (base/quote token, side, amount, optional blind mode). -
respond_rfq— market maker submits a sealed-bid quote. -
create_htlc— record the on-chain lock transaction for one side of an accepted trade. -
withdraw_htlc— claim an HTLC by revealing the preimage. -
refund_htlc— reclaim funds after the timelock, if the counterparty walked away. -
get_htlc— query the settlement status of a trade.
Connection works two ways: streamable-HTTP at https://hashlock.markets/mcp, or stdio locally via npx -y @hashlock-tech/mcp. Canonical repo: github.com/Hashlock-Tech/hashlock-mcp.
Why this matters for AI agents specifically
The intent-based + sealed-bid + atomic-settlement stack isn't just philosophically nicer. It's the only design that lets an AI agent trade OTC size responsibly.
An agent operating against a public order book has to model MEV, front-running, adversarial liquidity, and its own footprint. Those are hard modeling problems even for specialist trading firms. Most agent frameworks will lose money badly.
An agent operating against a sealed-bid RFQ has a dramatically simpler job: express the user's intent, collect private quotes, pick the best one, and let the protocol settle it atomically. The adversarial surface shrinks from "the entire mempool" to "the specific market makers who responded to this RFQ" — and those MMs compete, rather than predate.
If you believe AI agents are going to be a meaningful share of on-chain flow over the next 5 years (I do), the venue they trade on has to be one where their disadvantages don't get exploited. Sealed-bid RFQs are that venue.
What I'd push back on
The honest counterargument: public order books have vastly more public liquidity today than sealed-bid RFQ systems, because the public tape itself generates liquidity (LP incentives, passive quoting strategies, taker rebates). Sealed-bid RFQs rely on dealer participation, and dealer participation is a cold-start problem.
That's real. It's also solvable — the tradfi block markets have exactly this structure and function fine. The path on-chain is (1) get the primitive right, (2) make it legible to AI agents and automated MMs via MCP so participation costs collapse, (3) let the market depth bootstrap from there.
Public order books aren't going anywhere for small flow. They shouldn't. But the claim that they're the endgame for OTC-size on-chain trading is the same category error as saying spreadsheets are the endgame for financial analysis because everyone uses Excel. Primitives compound; better primitives win the edge cases first, then the median case.
References
- Hashlock Markets: hashlock.markets
- Canonical MCP repo: github.com/Hashlock-Tech/hashlock-mcp
- npm package:
@hashlock-tech/mcp - MCP Registry:
io.github.Hashlock-Tech/hashlock
Written for the Hashlock Markets audience — traders, market makers, and builders working at the intersection of intent-based DeFi and AI agents.
Top comments (0)