Last night, UniHexa published the second article in its series of long-form posts. The title says it all: With so many fills, how many settlements are needed?

The first article explained that one limit order can be partially filled by different buyers, with the remainder staying on the order book. This article follows up with a question: As fills add up, how can settlement costs be kept under control? The official answer: compress before settlement.

Here are the key points:
▪️Bitcoin fees are based on the space taken up by the “coins” being moved (inputs and outputs), not the amount. Whether you move 1 $BTC or 1,000, the number of coins is the same, so the fee is the same
▪️Matching is recorded off-chain on unihexa; what goes on-chain is the subsequent settlement. Ten fills can be combined into one settlement
▪️Multiple fills involving the same address, same direction, and same trading pair can be combined into a single output. Ten fills mean nine fewer outputs, at 43 vB each, saving a total of 387 vB. Buys and sells at the same address are still kept separate
▪️Multiple addresses can also be bundled into a single transaction, with everyone sharing the public part that only needs to be written once
▪️Each batch first selects up to 64 fills, then merges them by address, and then checks whether they fit
▪️The real bottleneck is Runestone—the rune allocation instructions written in OP_RETURN. Under the current batching rules, this script must be no longer than 80 bytes. How many fills fit depends on how many distinct recipient addresses remain after merging. If the limit is exceeded, batching stops at the first fill that doesn't fit; it doesn't skip or reorder anything, and the rest go into the next batch
▪️brc-20 is mapped to Rune in unihexa and is subject to the same 80-byte limit
▪️Ideal estimate: if all 64 fills are between the same pair of addresses, one transaction is 546 vB, or about 8.5 vB per fill. The official post makes clear this is an ideal estimate, not the average size of an actual bill

The document has already explained how the public part is split: each side covers its own inputs and outputs, and the remainder is shared by the taker side in proportion to trade value. This article doesn't elaborate further.

Combined with the partial fills described in the first article, quotes can stay open continuously. The treasury in the semi-automated listing protocol can automatically provide liquidity thanks to this technology, but don't take that to mean listings are already open. The remaining limitations are: buys and sells are still settled separately, multisig inputs are larger than single-sig ones, and the 80-byte limit still constrains each batch. The third article, about the remaining potential, hasn't been published yet.

#FB #UniSat $FB