How Strobe works
How Strobe works
From a deposit to a settlement batch on Solana, and the escape hatch.
Strobe runs in two parts. The engine holds the order books, matches orders, marks positions and charges funding. The Solana program holds the USDC, records each account's settled equity and pays withdrawals.
Deposit
A trader deposits USDC into the program's vault with one wallet signature. The engine credits the deposit to the account once the transaction confirms.
Authorize a session key
The browser makes a key pair, and the wallet signs one message naming the public key and an expiry 7 days out. From then on the session key signs each order, and the wallet is not asked again until the key expires or is revoked. Session keys has what the key can and cannot sign.
Match
Signed orders go to the engine over one WebSocket. The engine checks the account's margin, matches against its book for that market in price-time priority and answers with an ack carrying the fills and the measured time from receiving the order to the ack. The engine covers the books, the risk check and how that time is measured.
Settle
Every 2 seconds while there is trading, the engine posts a batch to the program: the settled equity of each account the batch touched and a hash of the engine's whole state. The program accepts batches only from the engine's key and only in order. Settlement describes a batch and how to check one.
Withdraw
A withdrawal is signed by the trader's wallet and co-signed by the engine after it checks the account's free margin. The program then pays out of the vault.
Escape
If no batch lands for 1,500 slots, the program lets each trader withdraw the equity settled in the last batch, with no engine signature. Escape has the details.
In Season Zero
Season Zero runs the same engine with the chain off. Test USDC comes from a faucet, batches are computed and listed on /batches without a Solana transaction, and withdrawals are off.