Skip to main content
Deposits and withdrawals reconcile across three surfaces:
  1. Chain event from the deposit contract.
  2. OMS account-activity event.
  3. Inventory delta from GET /inventory/user/{user_id}.

Deposit join keys

Listen for both Deposited and DepositedWithConfig on the deposit contract. OMS account activity emits:
Stable join key: (user, chain_id, deposit_nonce). Divide the event amount by 10¹⁸ to get the deposit credit in whole-token units. Use the registry decimals to convert onchain token base units to internal units. Raw reconciliation:

Withdrawal join keys

A withdrawal starts with POST /withdrawal/init, locks Funding tokens, exposes awaiting_signature or approved through GET /withdrawal/status/{user_id}, receives quorum approvals, then the user submits withdraw(...) on the deposit contract. Completion emits:
Stable join key: (user, chain_id, withdrawal_nonce). The deposit contract call carries token address, amount, nonce, target, validUntil, epochHash, and approval signatures; get exact fields from the live OMS reference and deposit contract.

tpluspy

If a submission times out, do not assume failure. Read withdrawal status, account events, and your Funding account’s token balance before retrying with a new nonce.