DEEPSTATEDOCS
Market Making

Claiming Rewards

Rewarder V3 claimant registration, order exits, batched claims, and removal-safe liability.

Rewards are keyed by book, sold token, and order nonce. Registration and distribution are permissionless, but the claimant is always taken from the Router's order ownership record.

Claimant registration

Router cancellation deletes the order-owner record after returning collateral and proceeds. registerClaimant(bookId, order) caches the verified owner while that record still exists. Registration does not give the caller any right to the reward.

registerClaimants(bookIds, orders) registers multiple live orders, requiring them to resolve to the same claimant.

Distribution

distributeRewards(bookId, order, soldToken):

  1. resolves the cached claimant or registers a still-live order;
  2. identifies the appropriate side from soldToken;
  3. checkpoints the live top order when applicable;
  4. clears the order's stored reward before token transfer; and
  5. transfers prefunded 2DEEP to the verified claimant.

distributeRewardsBatch processes a list of reward claims for one claimant and aggregates the payout.

Closing an order

Preserve ownership before cancellation:

rewarder.registerClaimant(bookId, order)
router.cancel(token0, token1, epoch, order)
rewarder.distributeRewards(bookId, order, soldToken)

These calls may be submitted atomically. If a wallet cannot batch them, register first, wait for confirmation, then cancel. Distribution can occur later. Cancelling before the claimant has been cached can destroy the proof required to pay that order.

Fixed custody

The active rewarder was prefunded with 100 million 2DEEP and has no mint role. Claiming transfers that existing balance; it does not mint.

If the Factory permanently removes the market, it first freezes accrual and then burns only the unrewarded balance. Accrued but unpaid rewards remain in the rewarder and can still be claimed. No new accrual is possible after the freeze.

On this page