Baike.dev
Log in
> 返回资讯列表
news_article.exe
📰

A 30-Day Atomic Swap Is a Free 688 bps Option. That Is the Honest Price of Forward Settlement.

2026年9月4日2 次浏览来源:Dev.to 阅读原文

Forward Settlement is one of the five primitives we have been designing toward: two agents agree a price today for an exchange that completes later, with no clearinghouse, no novation and no margin call in between. The mechanism is not exotic. It is a hash-time-lock with a deliberately long timelock. The timelock is the term of the forward. We have written about why an agent would want this. This post is about what it costs, because we did the arithmetic properly this week and the number is much larger than our entire fee. The mechanism, briefly In a hash-time-locked exchange, one side generates a secret, publishes its hash, and both sides lock their leg against that hash. Revealing the secret claims one leg and simultaneously exposes the secret that claims the other. Either both legs...

Forward Settlement is one of the five primitives we have been designing toward: two agents agree a price today for an exchange that completes later, with no clearinghouse, no novation and no margin call in between. The mechanism is not exotic. It is a hash-time-lock with a deliberately long timelock. The timelock is the term of the forward. We have written about why an agent would want this. This post is about what it costs, because we did the arithmetic properly this week and the number is much larger than our entire fee. The mechanism, briefly In a hash-time-locked exchange, one side generates a secret, publishes its hash, and both sides lock their leg against that hash. Revealing the secret claims one leg and simultaneously exposes the secret that claims the other. Either both legs move or, at expiry, both refund. Stretch the timelock from ten minutes to thirty days and you have a dated forward. Agent A commits now to deliver asset X at T. Agent B commits now to deliver asset Y at T. Neither posts margin to a third party, because there is no third party. That is genuinely useful for an agent that knows it will receive an asset at T and wants to lock a price at t0. The problem nobody prices Here is the part that a diagram hides. The party that generated the secret decides whether to reveal it. Nobody can force that reveal. If the relative price of the two legs moves against them before expiry, they simply do not reveal, both sides refund at T, and they trade at the better price elsewhere. That is not a bug in anyone's implementation. It is the structure. The secret holder owns an American-style option to abandon the trade, struck at the agreed rate, maturing at the timelock. The counterparty wrote that option and received nothing for it. This is the long-standing optionality critique of atomic swaps, and it does not go away because the settlement is trust-minimized. It is orthogonal to trust. It is about time. What the option is actually worth You can get a usable estimate without a pricing library. The Brenner-Subrahmanyam approximation for an at-the-money option under zero drift is: where is notional, is annualized volatility and is time to expiry in years. The relevant is the volatility of the exchange rate between the two legs, not of either asset alone. A stablecoin-against-ETH swap carries roughly ETH volatility. An ETH-against-BTC swap carries the cross, which is materially lower. At , which is an unremarkable number for a major crypto pair: Timelock Option value In bps of notional 10 minutes 0.105% 10.5 1 hour 0.256% 25.6 6 hours 0.628% 62.8 24 hours 1.256% 126 7 days 3.324% 332 30 days 6.881% 688 Two things fall out of that table immediately. First, the square root is the whole story. Going from ten minutes to thirty days is a 4,320-fold increase in term and only a 66-fold increase in cost. Time is expensive, but it is expensive sub-linearly. That is the good news, and it is the entire reason short-dated atomic settlement works at all. Second, our fee is not the number that matters. We describe settlement economics in the range of 1 to 2 bps against 8 to 10 bps for the alternatives, and we have used that comparison in public more than once. At a one-hour timelock the free option is already worth something like 26 bps, roughly thirteen to twenty-six times our own fee. At thirty days it is 688 bps, which is between three hundred and seven hundred times it. Writing a post about saving eight basis points while quietly handing away six hundred and eighty-eight would be dishonest, so here is the post about the six hundred and eighty-eight. And there is a second cost stacked on top: the writer's capital is locked for the full term. They pay the option and the carry. What this does and does not invalidate It does not invalidate atomic settlement. At the timelock durations that actually matter for spot settlement, seconds to low minutes, the option is worth single-digit basis points and is comfortably inside a normal spread. The reason atomicity is a good trade for spot is precisely that is tiny. It does invalidate the naive version of Forward Settlement, the one where you take the same contract, set the timelock to thirty days, and call it a product. That version is a 688 bps giveaway wearing a settlement diagram. So the primitive needs pricing, and there are exactly three honest levers. 1. Term discipline. Use the shortest timelock that satisfies the settlement need, and treat every extra hour as a purchase rather than a default. Because the cost scales with , most of the damage is done in the first stretch from minutes to days; the marginal hour after that is comparatively cheap. This is a design rule, not a feature. 2. Price the option into the quote. This is where the sealed-bid RFQ half of our architecture earns its place. A quote is not a spot price, it is a price for a specific term. If the term is a parameter of the request, the responder can price into the bid instead of eating it as an externality. Sealed-bid matters here for a specific reason: if bidders can see each other, the term premium collapses toward whoever is worst at estimating volatility. 3. Collateralize the abandonment. The writer requires a bond that pays out to them if the lock expires unexercised. This converts a free option into a paid one and puts a floor under the cost of walking away. This is where Forward Settlement meets BTC Collateral Vaults, and it is also where you have to be careful, because a poorly designed bond quietly reintroduces the custodian that the whole design exists to remove. Lever 2 is the one that follows directly from the architecture we already have. Lever 3 is a design problem we have not solved. The uncomfortable part We have been describing Forward Settlement as a primitive for months. It is specified and designed. It is not shipped, and until this week our public description of it did not carry a price for the abandonment option. That is a gap in our own writing and we would rather close it ourselves than have a counterparty close it for us during a live trade. The other honest limit: the table above is an approximation with a flat volatility assumption and no drift. Real quoting needs the realized cross-volatility of the specific pair over the specific term. We do not have a term curve of our own to calibrate against, because our public DefiLlama volume is zero over 24 hours, 7 days and 30 days. Rails ready, trains coming. We can do the arithmetic; we cannot yet do the calibration. Where things actually stand Hashlock is live end-to-end on Ethereum mainnet today. Sui contracts are deployed and CLI-tested, not live. Bitcoin is signet-validated with mainnet pending. Base, Arbitrum, Solana and TON are roadmap, not built. The MCP server is (scoped), v0.6.0, six tools, so an agent quotes, locks, settles and refunds through the same interface it uses for everything else. Agent frameworks with their own treasuries, of the kind @VirtualsProtocol has been building toward, are exactly the population for whom a dated commitment is worth more than a spot fill, which is why getting the term price right matters before anyone ships it. The question If you are building agent-side execution: what is the longest timelock you would accept on a two-asset swap before you demanded a bond, and how would you price the term premium in a market with no observable forward curve? We think the answer is shorter than most forward-settlement pitches assume. We would like to be argued out of that. Architecture and status: https://hashlock.markets/about?utm_source=devto&utm_medium=article&utm_campaign=2026-09-04-free-option MCP server, six tools, open source: https://github.com/Hashlock-Tech/hashlock-mcp Formal write-up: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=6712722

> 分享:
Baike.dev

baike.dev helps you discover great languages, frameworks, databases, DevOps and cloud-native tools.

Quick links

About

Contribute

Found a great developer tool? Share it with the community.

Submit a tool
© 2026 baike.dev Developer EncyclopediaUpdated daily · Discover great developer tools