Skip to content

Exchange Deposits

This usecase explains how to implement private exchange onramping and offramping.

In this usecase, we explain a triparty system handling private transfers for exchange deposits and withdrawals.

The exchange is a centralized, offchain entity facilitating trading. It maintains accounts for users, although onchain they do not have a wallet-per-user model, but instead cold and hot wallets.

For this usecase we ensure the following requirements hold:

  1. Exchanges know where deposits comes from.
  2. Users cannot see total flows into the exchange.
  3. Users cannot see individual exchange deposits.
  4. Users cannot see individual exchange withdrawals.
  5. Users can see their own deposits and withdrawals.
  6. Users still deposit into an exchange provided address using a regular wallet.

This ensures that outsiders cannot actively trade on big money movements, as well as preserving privacy for individual users, making wallet trackers obsolete.

We’ll use Union Private Payments to implement the following protocol.

  1. The Exchange generates deposit addresses for users.
  2. The User performs a regular ERC-20 transfer to the deposit address.
  3. The Payment SaaS requests the Sender to sign the unsigned transaction.
  4. The Payment SaaS submits the transaction on behalf of the Sender.
  5. The Payment SaaS monitors progress.
  6. (optionally) The Payment SaaS can send a notification to the recipient/update their dashboard.
  7. The Payment SaaS submits the redemption transaction.
  8. The Recipient has access to the funds.

With this workflow, we ensure compliance and that the Sender always has a full overview of transactional data. The Payment SaaS can choose to KYC recipients depending on their regulatory need.