Staking & Unstaking
Staking locks DOHM for sDOHM shares. Rewards arrive by the index rising — your share count never changes; each share is simply worth more DOHM after every rebase.
The index
The index is a stored, monotonically increasing accumulator. It starts at 1e8 (so at genesis, 1 sDOHM = 1 DOHM) and moves only when a rebase delivers a reward:
index′ = ⌊ index × (staked + reward) / staked ⌋
staked′ = staked + reward
Nothing else — no stake, no unstake, no transfer — ever moves the index.
Stake
shares = ⌊ deposit × 1e8 / index ⌋
Before pricing your deposit, the contract pokes a due rebase, so you always enter at the current (post-reward) index — you cannot capture rewards accrued before you staked. There is no staking fee.
Unstake — a two-step exit
Step 1 — Request. Your shares burn and the payout is fixed immediately:
payout = ⌊ shares × index / 1e8 ⌋
A due rebase is distributed first, so you exit at the post-reward index. You receive an unstake ticket with:
unlock_height = current_height + cooldown_blocks
From this moment your position stops earning — the payout is frozen; the cooldown pays no rewards. There is no unstake fee; the cooldown is the only exit constraint.
Step 2 — Claim. At or after unlock_height, send the ticket in a second transaction:
claimable = payout if height ≥ unlock_height and not yet claimed
= 0 otherwise
The full payout is released (all-or-nothing cliff) and the ticket is burned. Claiming works even while the protocol is paused.
Things to know
- Each unstake request creates its own ticket. Multiple requests → multiple tickets → multiple claim transactions and miner fees.
- The ticket is a bearer asset: whoever holds it claims the DOHM. A lost ticket is a lost payout.
- Unstaking never lowers the index. Even a full drain of the staking pool freezes the index where it was — the next staker enters at the same price.
- Rounding: both directions floor. Staking then immediately unstaking can lose up to 1 base unit (10⁻⁸ DOHM) to rounding.