Deposit
Flow
stake pulls USDG into the bankroll and credits your position. If public staking is disabled on the deployment, stake reverts StakingDisabled (deposits are operator-only); exits below still work for everyone.
Withdraw — two steps
1
Request
Call
requestUnstake(assets) for a fixed amount, or requestUnstakeAll() to exit the whole position (including rewards that compound in while you wait). Requested assets immediately stop underwriting new bets, but stay staked and loss-exposed until withdrawal. Repeat requests add to the total and restart the timer.2
Wait for unlock
The request unlocks on the earlier of two paths:
- Settled watermark — every bet your capital could have underwritten is settled or refunded (
settledThroughCommitIdreaches your request’s epoch). Anyone can accelerate this by draining leftover bets withsettleBets. - Cooldown timer —
unstakeDelayelapses (default 1 hour) and every pre-request pending bet is refund-only, so nothing can socialize a new loss onto you.
3
Withdraw
Call
unstake(assets). The pool accrues your position first — losses socialized during the wait are applied before payout — and the withdrawal is capped by availableBankroll(). cancelUnstakeRequest() aborts at any point before this.