06 / Method
How it works,
and what it does not claim.
One pair (WHYPE/USDC) on Elysium, one contract, two fill routes, and a proof in every fill transaction. This page lists every power each role has and every field that becomes public.
The flow
- Sheet. Your browser splits the target into tranches (size + limit), places them at random positions among 8 to 64 slots, fills the rest with padding (size 0, which can never fill) and gives every slot a random 32-byte salt.
- Root. Each slot is hashed to a leaf (keccak of keccak of index, size, limit, salt) and the leaves to one Merkle root. Only the root goes on chain.
- Open. open(side, root, escrow, expiry, matcher) moves the escrow into SheliumSealBook: USDC for a buy, WHYPE for a sell. The escrow can be rounded up; the surplus returns on cancel.
- Fill. A fill presents one slot and its Merkle path. The contract checks the path against the root, that the slot is real and unfilled, that the order is open and not expired, and who is calling. Pool route: it swaps on a hookless Uniswap v4 pool of the pair and refuses if the pool takes more (buy) or gives less (sell) than the slot's limit, checked on the pool's own balance delta. Matcher route: the matcher sends the other side straight to you, at a price inside the limit.
- Proof. The fill transaction carries the slot and path; the Filled event repeats the slot and the amounts. Verify rebuilds the root from them in your browser.
Every power, by role
| Role | Can | Cannot |
|---|---|---|
| Trader | Open an order (root, escrow, expiry, matcher). Fill own slots on the pool. Cancel at any time and get back every unit of unfilled escrow. Change or remove the matcher. | Change a slot after opening (the root is fixed). |
| Matcher | Fill an open slot of an order that names it, on the pool or by delivering from its own wallet, at or inside that slot's limit. | Cancel, take escrow beyond a slot's own amount, raise a limit, fill padding, fill after expiry. |
| Anyone | Read every order and fill. After expiry, call reclaim(), which can only pay the escrow back to the trader. | Fill, cancel or redirect anything. |
| Shelium (us) | Nothing on chain. The book has no owner, no admin key, no fee, no pause and no upgrade. | Touch escrow, see sheets kept in your browser, or stop an order. |
What one fill makes public
What opening an order makes public is shown on the Seal page, read back from your own transaction. A fill adds:
| Field | Value | Who sees it |
|---|---|---|
| Slot openedIn the fill transaction and the Filled event. | index, size, limit, salt | PublicMatcherYou |
| Merkle proofIn the fill calldata: anyone can rebuild the root. | up to 6 hashes | PublicMatcherYou |
| Executed amountsEvent fields; equal to the token transfers in the same transaction. | HYPE moved, USDC paid or received | PublicMatcherYou |
| Route and fillerEvent fields. | pool or matcher, and its address | PublicMatcherYou |
| Escrow leftEvent field. Still not the remaining size: it includes rounding and slack. | after this fill | PublicMatcherYou |
| Other slotsNothing about them changes on chain. | unchanged | MatcherYou |
Limits and trade-offs (read these)
- The escrow amount is public. It is an upper bound on what the order can spend or sell, not the target; rounding helps but does not hide the order of magnitude.
- Every filled slot is public: its size, its limit and the price paid. Over many fills, observers learn more. Uneven sizes and padding make the pattern less obvious; they do not make it invisible.
- The proof length shows the sheet's slot count (a power of two) at the first fill, not how many slots are real.
- Your matcher reads the whole sheet: the target, every limit and the remaining size. Name only a matcher you are willing to show that to. Anyone holding the sheet link can read it too; only the matcher address can use it.
- A pool fill is an ordinary swap once it is broadcast. Someone who sees it pending could move the pool price up to your slot's limit before it lands; the limit is the most you can lose to that. Set limits you accept.
- Native HYPE is not held: the book uses WHYPE and wraps or unwraps inside a pool fill. USDC on Elysium is controlled by its issuer, who can freeze addresses; a frozen trader cannot receive refunds in USDC.
- One pair only (WHYPE/USDC). Smart contracts can fail in ways tests miss: use amounts you can afford to lose.
Addresses
- SheliumSealBook
- not deployed yet
- WHYPE (base)
- 0xbA876237B0F021A6c6D852d6c26E107997cC5E81
- USDC (quote)
- 0xb47c4C8F73F009CC0C0d3f92B388d13E293F0B65
- v4 PoolManager
- 0xE2e105d3F7209A9DA11f83cCf3E7398a753823F1
- Default pool (HYPE/USDC 0.30 %, no hooks)
- 0xb3032695ffb0a66e6342876dd2386835471466cb2bb70f341947d98a69e265cc