Skip to content
View spireproto's full-sized avatar

Block or report spireproto

Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
spireproto/README.md


There will be many venues. There are one or two clearing houses.

Every market that grew up put one counterparty between the two sides of a trade. Not because the trades were bad, but because a market where everyone has to form a view on everyone else spends its capital on that question instead of on liquidity.

Tokenised equities skipped the step. Counterparty risk was solved by removing the interval: everything is prefunded, so nothing is ever owed. It works, and nobody has failed to deliver. The bill arrives somewhere else, as capital that has to sit still.


What that costs

One member, one asset, one window: buy 400, sell 250, buy 350.

Prefunded Cleared
Turnover 1,000 1,000
Capital in place 1,000 20
Reaches the chain 1,000 250
Mechanism
Novation the trade is discharged
Netting per member, per asset, across venues
Collateral margin on the net, 8% at tier 1
Waterfall fixed before anyone defaults
window N      [ intake 300s ][ finalise 30s ][ settle 120s ]
window N+1                   [ intake 300s ][ finalise 30s ][ settle 120s ]

Not 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.


The number we got wrong

The chain runs at 0.101 seconds a block. Our parameter table said 2 seconds for three months.

It came from a note in the first week and was repeated in three files without anybody measuring it. The check that killed it is in this account, it runs on a schedule, and the note that introduced the assumption is still there unedited.

Windows are wall clock, so netting and margin are unaffected. What changed is the block count inside a window: about 2,959, not 150.

git clone https://github.com/spireproto/spire-checks
cd spire-checks && node checks/chain.mjs

Open

spire The protocol: twenty pages on novation, netting, collateral, defaults, the API surface and what is not built.
spire-core Windows, novation, netting, margin, collateral, waterfall. BigInt, zero dependencies, 55 tests.
spire-sdk Client and EIP-712 signing. Keccak and secp256k1 written out, not pulled in.
spire-contracts The on-chain surface as interfaces, published ahead of deployment.
spire-checks Every number we publish, as a script you can run against us.
netting-replay 33 modelled days through the netting rules, each reproducible from its date.
awesome-tokenized-equities The landscape this sits in.

Where this stands

Stage Status
Specification ✅ complete, 20 pages, same source as the site
Clearing arithmetic, tested ✅ 55 tests, zero dependencies
Signing and client surface ✅ works offline today
Interfaces, published ✅ ahead of deployment
Checks against our own claims ✅ and one of them has already fired
Deployed contracts ❌ nothing, on either network
Live API ❌ does not answer
Audits ❌ none

Nothing here holds an asset and no contract address is claimed. A clearing layer asking to be trusted with margin should be legible before it is live, and being blunt about what does not exist is the cheapest part of that.


spire-core

55 tests · 0 dependencies
spire-sdk

27 tests · offline suite
spire-checks

5 checks · 0 dependencies

spireproto.xyz · @spire_proto · notes

Popular repositories Loading

  1. awesome-tokenized-equities awesome-tokenized-equities Public

    Curated list of tokenized equity issuers, standards, venues, clearing and research, with a maturity tag on every entry.

  2. spire-core spire-core Public

    Clearing primitives for tokenised assets: settlement windows, novation, netting in time, margin, collateral limits and the default waterfall. BigInt throughout, zero dependencies.

    JavaScript

  3. spire-contracts spire-contracts Public

    The on-chain surface of the clearing layer as interfaces: clearing house, collateral vault, settlement engine, default fund, solvency registry, governor. Nothing deployed.

    Solidity

  4. spire-sdk spire-sdk Public

    Client for the Spire Protocol clearing layer: novate fills, read nets and collateral, sign EIP-712 offline. Keccak and secp256k1 written out, zero dependencies.

    JavaScript

  5. spire-checks spire-checks Public

    Read-only checks against Robinhood Chain and the published Spire parameters: measured block time, window boundaries, deployment, netting on your own fills. Zero dependencies, no API key.

    JavaScript

  6. spire spire Public

    Clearing for tokenised assets on Robinhood Chain: novation, netting in time, collateral instead of prefunding, and a default waterfall fixed before anyone defaults. Specification and docs.