DEV Community

Baris Sozen
Baris Sozen

Posted on

Atomic settlement guarantees your agent won't be robbed. It says nothing about who trades well with it.

Trustless settlement has a clean promise. When two agents settle through a hash-time-locked contract, either both legs of the trade complete or both refund. There is no path where one side walks away with the other's funds. Counterparty risk — the risk that the entity on the other side of your trade fails to deliver — is removed by construction, not by reputation.

That is real, and it matters. But it is worth being precise about what it does and does not cover, because the gap is where most of the work in an agent market actually lives.

Two kinds of failure

Settlement atomicity solves exactly one failure: the hard failure. Your counterparty takes your money and disappears. In an atomic settlement, that outcome is unreachable — the preimage either resolves both legs or neither.

A market has a second kind of failure, and atomicity does nothing about it. Call it the soft failure. Your counterparty does not rob you — they just trade badly with you. They quote you a price eight basis points wide when the rest of the field is at two. They respond to your RFQ and then leave the HTLC untouched until it times out, so you get your funds back, but only after your capital sat locked and idle for the full timeout window. They accept one leg of a multi-step trade and then stall on the leg you needed to clear fast.

Nothing here is theft. Every one of these degrades the market anyway, and an agent transacting thousands of times has no human noticing the pattern.

A human trader handles soft failures with memory. You remember the desk that always quotes wide. You stop calling the counterparty that ghosted you last quarter. That memory is a reputation system running quietly in a person's head. An autonomous agent has no such thing — unless the protocol gives it one.

Atomicity is necessary, not sufficient

This is the part the "trustless" framing tends to skip. Removing counterparty risk is necessary for an agent market — without it, agents cannot transact with strangers at all. But it is not sufficient for a good agent market. A market where you cannot be robbed, but every counterparty quotes wide and half of them ghost, is technically trustless and practically unusable.

So a settlement layer built for agents has to answer a second question, separate from "how do we make settlement safe": how does the market reward the counterparties that execute well, and steer flow away from the ones that do not — without a central operator deciding who is good?

We think the answer has two parts, and they are designed to work together.

Part one: price execution quality directly

The first part is what we call execution rewards. The idea is to measure execution quality from the settlement record itself — which is objective, on-chain, and unforgeable — and let that measurement feed back into the terms a counterparty gets.

The settlement layer already sees everything needed. It sees whether a responder's quote was competitive against the rest of the sealed-bid field. It sees whether a committed leg settled on the fast path or was left to time out. It sees whether a counterparty completes the legs of a multi-step trade in the order and window they agreed to. None of this needs a survey or a star rating — it is all already in the record of what the agent actually did.

Execution rewards turn that record into a price. A counterparty with a clean settlement history — tight quotes, fast-path completions, no abandoned legs — earns better standing: priority in RFQ matching, lower protocol fees on the next trade, access to larger size. A counterparty that consistently quotes wide or lets locks expire earns the opposite. The reward is not a token airdrop or a loyalty scheme. It is the market repricing access based on what an agent has verifiably done.

The important property: this is not a trust input. It is a behavior output. Nobody vouches for a counterparty. The settlement history vouches, or it does not.

Part two: make identity a dial, not a gate

The second part is harder, and it is where most settlement systems pick a bad extreme.

One extreme is KYC everyone. Every agent verifies a legal identity before it can trade at all. This is the custodial-exchange model, and it quietly kills the thing that makes an agent economy interesting: an agent spun up this morning, with no paperwork and no human in the loop, can do nothing. The permissionless property is gone.

The other extreme is KYC no one. Pure pseudonymity. This is clean, but it means an agent has no way to ever reach the parts of a market that genuinely require a known counterparty — larger sizes, regulated venues, institutional flow — and no counterparty has any recourse beyond the collateral in front of it.

Tiered KYC is the deliberate middle. Identity is not a gate you pass once. It is a dial. An agent can trade fully pseudonymously — and when it does, the protocol asks for more: more collateral posted against each obligation, smaller maximum size, shorter timeout windows. The pseudonymous agent is not excluded; it is priced. As an agent verifies more — a persistent on-chain identity, a staked bond, a legal entity behind it — the dial moves: collateral requirements fall, size limits rise, and a wider set of counterparties become reachable.

The reframe that makes this work: identity becomes a form of collateral. A pseudonymous agent backs its trades with capital. A verified agent backs some of that with identity instead. Neither is forced; each agent picks the point on the dial that fits what it is trying to do. A high-frequency micro-trade agent may rationally stay fully anonymous and over-collateralize. An agent moving institutional size will verify, because the better terms are worth it.

Why the two parts need each other

Execution rewards without tiered identity have a Sybil problem: a counterparty that earns a bad settlement history just discards the identity and spins up a fresh one. Tiered KYC is what gives execution history something to attach to — a bad history has a cost only if starting over also has a cost.

Tiered KYC without execution rewards is just a credential check: it tells you an agent verified something, not that it trades well. A verified agent can still quote wide and ghost.

Together they form one system. Execution rewards measure behavior; tiered identity makes that measurement stick and graduates how much the market is willing to expose to a given counterparty. Atomic settlement sits underneath both, guaranteeing that whatever terms two agents agree to, the settlement itself cannot be the thing that fails.

The honest status

This is design, and it deserves a straight status report rather than a confident one. Atomic HTLC settlement is live end-to-end on Ethereum mainnet today. The Bitcoin hash-time-lock construction is validated on signet, with mainnet pending; the Sui contracts are deployed and CLI-tested, with gateway wiring in progress. Execution rewards and tiered KYC are part of the protocol design we are building toward — the settlement primitive they sit on top of is the part that is live. We would rather state that plainly than blur the line between what runs today and what is designed.

For an agent, none of this should be hand-managed. Reading a counterparty's settlement standing, choosing where to sit on the identity dial, deciding whether better terms justify verifying — that belongs behind a tool call. Our MCP server (hashlock-tech/mcp, scoped — six tools) is the surface where an agent reasons about those decisions rather than the mechanics underneath them. MCP is the open protocol Anthropic introduced for connecting models to external systems.

The question

The trustless framing answers "can my agent be robbed." It is the wrong question to stop on. The question a builder should actually be asking is the second one: in the market your agent trades in, what happens to the counterparty that executes badly but never technically defaults — and if the answer is "nothing," how is your agent supposed to tell a good counterparty from a bad one?


Hashlock Markets — atomic settlement for the agent economy. Sealed-bid RFQ + HTLC settlement, fused into one operation. No bridges, no custodians.

Top comments (0)