Contract reference
Solidity 0.8.28, no proxy, no external dependencies beyond a 512-bit mulDiv. Source in contracts/src/Blackpool.sol.
Traders
| Function | Phase | Notes |
|---|---|---|
deposit(token, amount) |
any | USDG or a listed stock |
withdraw(token, amount) |
any | free balance only |
commit(hash) → (batch, index) |
commit | takes the 1 USDG bond |
reveal(index, market, side, amount, limitPx, salt) |
reveal | locks the size, returns the bond |
stake(amount), unstake(amount) |
any | once the stake token is set |
claimRewards() |
any | credits USDG to your vault balance |
Anyone
| Function | When |
|---|---|
settle(batch, market) |
after the batch's reveal window |
poke(market) |
any time, once per L1 block per market |
collectForfeits(batch) |
after the reveal window, once per batch |
applyFee() |
48 hours after queueFee |
Views
| Function | Returns |
|---|---|
currentBatch() |
batch id and phase (0 commit, 1 reveal) |
windows(id) |
commit start, reveal start, reveal end |
commitmentOf(...) |
the hash to commit |
midPrice(market) |
USDG raw per 1e18 share raw |
markets(id), marketsLength() |
market config |
orders(batch, market) |
the revealed book |
tape(batch, market) |
samples, status, settlement price, matched USDG |
balanceOf(trader, token) |
free vault balance |
pendingReward(who) |
unclaimed USDG |
Events
Committed, Revealed, Sampled, Settled, Voided, Fill, Deposit, Withdraw, FeesDistributed, plus the admin events.