How Strobe works
Settlement
What each batch posts to the program and how to check it.
The engine moves money between accounts with every fill, fee and funding payment, and the program learns about it through settlement batches. Every 2 seconds while there is trading, the engine posts one.
What a batch carries
- A batch number, one higher than the last. The program refuses a batch whose number isn't next.
- The settled equity of every account whose equity has changed since it was last posted. Settled equity is the account's equity at the batch instant (collateral plus unrealized PnL at the mark), floored at zero, so accounts with open positions are posted again as the mark moves. Accounts that don't fit in one batch go in the next.
- For each of those accounts, how much of its on-chain deposits and withdrawals the engine had credited, so the program can count a deposit or withdrawal that lands between batches exactly once.
- The state hash: a SHA-256 of the engine's whole state after the batch.
- The cumulative protocol fees the engine has charged, which stay in the vault until they are swept.
Only the engine's key can post a batch (post_batch). When the program accepts one, it writes each touched account's settled equity and the batch number into that trader's account. From then on, the settled equity in the program equals the engine's figure for that account at that batch.
Checking a batch
/batches lists every batch with its number, the Solana slot it landed in, how many accounts it touched, its state hash, its transaction and its time in UTC. The transaction link opens the batch's transaction on a Solana explorer.
In Season Zero
With the chain off, the engine still cuts a batch every 2 seconds of trading and computes its state hash, and /batches lists it with no slot and no transaction. Nothing is posted to Solana while the collateral is test USDC.
Settled equity and escape
Your settled equity in the program is what escape pays out if the engine stops.