Spire ProtocolSPIRE PROTOCOLDOCS

Netting inside the settlement window

Obligations do not settle one by one. They accumulate inside a settlement window and collapse against each other before anything reaches the chain.

Worked example

A participant trades the same asset three times inside one window:

#DirectionSize
1buy400
2sell250
3buy350

Gross flow across those obligations is 400 + 250 + 350 = 1000.

The sell offsets part of the buys, so the position that has to be delivered is 400 - 250 + 350 = 500, and once the same collapse is applied on the funding side of the book the amount that actually moves at the close of the window comes to 250.

Same turnover. A quarter of the capital actually moved.

Gross flow against what actually settles Gross flow inside the window 1,000 buy 400 sell 250 buy 350 Settles on chain 250 250 Never becomes a transaction

Netting across venues

The example above is one member on one venue. The interesting case is the same member trading the same asset in two places inside one window.

VenueDirectionSize
Abuy600
Bsell450

Bilaterally this is two open positions on two venues, each requiring its own margin and its own settlement. After novation both obligations face the same counterparty in the same asset, so they are the same instrument and they net.

The member delivers 150. Neither venue learns that the other exists, and neither can see the other side of the member's book.

What margin is charged against

Margin follows the net, not the gross. This is where netting in time stops being an efficiency and starts being the product.

GrossNet
Notional in the window1,000250
Initial margin at tier 1, 8%8020

The member carries 20 of margin against a thousand of turnover. Under prefunding the same turnover requires a thousand of assets sitting still.

Why this is not just a saving on gas

Every unit of gross flow that reaches the chain is a unit of capital that has to exist, at that moment, in the right place. Netting reduces the capital the market must hold to support a given turnover. Gas is a rounding error next to that.

Rules

The window, in numbers

PhaseLengthWhat is possible
Open300sFills accepted, obligations accumulate
Finalising30sNothing accepted, nets computed
Settling120sNets must be delivered
One settlement window, phase by phase Open Final Settling 300s 30s 120s Fills accepted Nets computed Net delivered A fill arriving here lands in the next window

A fill that arrives during finalisation is not rejected. It is assigned to the next window, and the SDK retries it for you. The error code is SPIRE-4001, described in Errors.

The trade-off in window length

Shorter windows settle more often and net less. Longer windows net more and hold exposure for longer before it is extinguished.

Five minutes is the launch value. It nets a busy member down by roughly the ratio in the example above while keeping unsettled exposure inside the range that the margin rates in Parameters are sized for.

Last updated 31 August 2026 Docs source on GitHub