Files
dex/pkg
zeekayandHanzo Dev a388e5fb08 dchain: a proposer could strand any swap for free
The drive emitted the import and the submit as a PAIR in one block, to close the
window where value sits on D with no order against it. That was one block faster
and one hole deeper: a proposer that included the import and omitted the submit
produced a perfectly valid block whose escrow was stuck `open` forever. The
import drive skips already-imported intents, so no later block would ever emit
that submit; the export drive gates on `submitted`, so nothing would ever settle
it. The taker's value sat in a keyless seam account while C's deadline reclaim
refunded them — C's books balance, but the D-side entry is stranded permanently,
and any proposer could do it to any swap, for free, undetectably.

The drive is now ONE RULE: for each intent, emit whatever leg its COMMITTED
STATUS says comes next.

    no escrow + a pending object -> TxImport
    escrow `open`                -> TxIntentSubmit
    escrow `submitted`           -> TxExport

An `open` escrow is unfinished work the next proposer picks up, exactly as a
not-yet-imported intent is. A swap takes three blocks instead of two; in
exchange no block can strand one. Self-healing beats a block of latency, and it
is the simpler rule — the pair was an optimization braided into it.

124 tests pass, 0 fail.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-07 08:36:54 -07:00
..