VA - Withdrawing From a Deposit Address

There are two withdrawal methods from a Virtual Account:

  • From each Virtual Account deposit address
  • From a Master Exchange Address

Workflow Example 1

  1. User_A: VirtualAccount_A balance is 0 MATIC.
  2. User_A: DepositAddress_A connected to VirtualAccount_A receives 3 MATIC (on-chain).
    1. VirtualAccount_A balance is now 3 MATIC.
  3. User_A: Transfers 3 MATIC from VirtualAccount_A to VirtualAccount_B owned by User_B (off-chain).
    1. v3 REST API Endpoint: Send payment
    2. VirtualAccount_A balance is now 0 MATIC.
    3. VirtualAccount_B balance is now 3 MATIC.
    4. User_A: DepositAddress_A connected to VirtualAccount_A still holds 3 MATIC (on-chain).
  4. User_B: Would like to withdraw 3 MATIC from VirtualAccount_B to an external blockchain address.
    1. User_B: DepositAddress_B connected to VirtualAccount_B has no assets! (on-chain).
    2. You must execute a withdrawal from DepositAddress_A - Check the following guide.

Workflow Example 2

  1. User_A: VirtualAccount_A balance is 0 MATIC.
  2. User_A: DepositAddress_A connected to VirtualAccount_A receives 3 MATIC (on-chain).
    1. VirtualAccount_A balance is now 3 MATIC.
  3. User_A: would like to withdraw 2.8 MATIC from VirtualAccount_A to an external blockchain address.
    1. You may execute a direct automated withdrawal from DepositAddress_A - v3 REST API endpoint.

Good to know

Withdrawals from Deposit addresses are the most cost-effective because the only blockchain transactions you are paying gas fees for are for when users withdraw funds to their deposit addresses from their virtual accounts.

However, you, as the Exchange owner, must keep track of which private key is associated with which assets at all times to allow your users to withdraw assets to their deposit addresses. This can be a lot of work to keep track of everything, which is why consolidating assets within a Master Exchange Address is recommended.