What the Contract Checks at Each Step
One contract holds the vault, the books and the staking. Every rule below is enforced on-chain, in this order.
The Commitment
keccak256 of your address, the batch, the market, the side, the size, the limit and a 32-byte salt. Binding you and the batch into it means nobody can replay it as theirs or carry it into a later batch.
The Reveal Checks
Right phase, right batch, preimage matches, market enabled, book under 96 orders, and your free balance covers the size. Any failed check reverts and the commitment stays sealed.
Void or Cross
A batch is voided if its book is empty, it is more than 26 blocks late, it has fewer than two price samples, or the midpoint left the guard. A void returns everything and charges nothing.
The Price Guard
The midpoint is sampled at every reveal and poke, at most once per L1 block. At settlement it must sit within the market's bound of the average, or nobody trades at the moved price.
Rounding
What a trader gives is rounded up, what a trader receives is rounded down. Every settlement asserts it paid out no more than it took in, and credits the dust to the treasury.
Fees and Staking
0.10 % per side on the value that crossed. 80 % of it, and of collected forfeits, goes to $BLACKSITE stakers in USDG, or to the treasury if none is staked.
&& baseOut <= baseIn);
Built to Hide One Thing: Your Order
The price is public, the pool is public, the rules are public. What stays out of sight is what you are about to do.
Seal an order without saying what it is
The app builds the commitment in your browser with the same encoding the contract checks at reveal. Only the hash and a 1 USDG bond go on-chain.
- Trader and batch bound into the hash
- Salt from the browser's cryptographic random source
- Preimage kept locally and downloadable as a file
Open it with everyone else, in five blocks
Batches run on the L1 block clock Robinhood Chain exposes. Sixteen blocks to commit, five to reveal, then anyone can settle while the next batch fills.
- A batch every 21 L1 blocks, about four minutes
- Reveal window of five blocks, about a minute
- Anyone can settle; the keeper settles batches with orders
Cross at one price, split fairly
Settlement reads the pool midpoint once and fills every crossed order at it. The lighter side fills in full; the heavier side fills pro rata.
- No price impact between crossed orders
- No fill beyond either side's limit
- Unfilled size back in your vault, same call
Numbers Nobody Can Change
Immutable in the bytecode. Not the owner, not a vote, not us.
Sixteen to commit, five to reveal, about four minutes end to end.
The same for every order, buy or sell, returned the moment you reveal.
Per market per batch, so one settlement always fits in a block.
The staker share of every fee is fixed. No proxy, no upgrade path.
Mechanism Questions
The details traders ask about most. Every answer is in the contract reference too.
On Robinhood Chain, block.number inside a contract returns the Ethereum L1 block, about every 12 seconds. A 16-block window is about three minutes whatever the rollup does.
It can be copied, but not used. Your address is inside the hash, so only you can reveal it, and the batch is too, so it cannot be moved to a later one.
The protocol keeper settles every batch that has orders, and anyone else can too. If nobody does within 26 blocks, the next call voids it and every order comes back in full. Funds are never stuck.
amount × 10000 / (10000 + feeBps), with feeBps = 10 today. The rest is the fee budget, charged only on what fills. Everything unused goes back to your vault.
No. Each order carries the fee in force when it was revealed, and any change waits 48 hours before anyone can apply it.
