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

Deposit join keys

Vault deposit events include user, nonce, token address, and amount. OMS account activity emits:
Stable join key: (user, chain_id, deposit_nonce). Compare the account event amount against the inventory delta in 18-decimal internal 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, enters GET /withdrawal/queue/{user_id}, receives quorum approvals, then the user submits withdraw(...) on the vault. Completion emits:
Stable join key: (user, chain_id, withdrawal_nonce). The vault call carries token address, amount, nonce, target, validUntil, epochHash, and approval signatures; get exact fields from the live OMS reference and Deposit Vault.

tpluspy

If a submission times out, do not assume failure. Read the queue, account events, and inventory before retrying with a new nonce.