Virtual accounts

Learn what virtual account are and how they can help you solve typical issues that you and your customers may face on the blockchain

Virtual accounts are a parallel layer to supported blockchains in Tatum and enable many useful features otherwise unavailable at the blockchain level.

What are typical blockchain issues?

  • Blockchains charge you for transactions. All transactions that you make cost you some amount of the cryptocurrency.

    • To transfer an amount of the cryptocurrency to another blockchain address, you have to hold this amount plus the amount to cover the transaction fee.

    • The transaction fees (even for the transactions when you are transferring tokens) have to be paid in the native cryptocurrency of the blockchain.

  • You need to check the status of a transaction: whether it is valid and when it was processed and recorded into a block.

    • Transactions are not 100% reliable and may get rejected or reverted.

    • Processing a transaction may take too long.

Imagine that you run a custodial application. You have three customers with their custodial accounts: A, B, and C, and the following scenario takes place:

  1. Customer A received 1 ETH.

  2. Customer A transfers this 1 ETH to Customer B.

  3. Customer B receives 1 ETH and transfers it to Customer C.

  4. Customer C receives 1 ETH and uses it to pay for something (in other words, transfers it to a blockchain address that is outside of your custodial application).

As a result, you have to cover fees for the three blockchain transactions (made at Steps 2, 3, and 4) in your application.

How virtual accounts help you avoid the blockchain issues

Let's look at the scenario that is described in the previous section, but introduce virtual accounts to the framework. Now, each of your customers A, B, and C has a virtual account connected to the customer’s blockchain address. The following scenario takes place:

  1. Customer A received 1 ETH.

  2. Customer A transfers this 1 ETH to Customer B.

  3. Customer B receives 1 ETH and transfers it to Customer C.

  4. Customer C receives 1 ETH and uses it to pay for something (in other words, transfers it to a blockchain address that is outside of your custodial application).

With virtual accounts, you now have to cover fees for only one blockchain transaction - the one made at Step 4, because this transaction involves a real blockchain address.

The transactions made at Steps 2 and 3 happen on the virtual accounts (off-chain) within the Tatum infrastructure and therefore are free of charge.

What else you can do with virtual accounts

  • Set up webhook notifications. Use subscriptions to virtual accounts to enable webhook notifications for various blockchain events.

  • Block/unblock amounts in accounts. For many fintech or exchange apps, blocking and unblocking amounts opens up a wide range of possibilities.

  • Freeze/unfreeze accounts. React instantly to reports of suspicious behavior and unfreeze accounts just as quickly once the situation has been remedied.

  • Activate/deactivate customers. With multiple virtual accounts tied to a single customer, you can easily activate or deactivate all of them with one API call.

  • Implement limit and futures trades. Open, close, cancel, get, and list trades and chart data with built-in API calls to create exchanges quickly and easily.

Tutorials

Refer to Tutorials - Virtual accounts to find out how virtual accounts work, to set up virtual accounts on different types of blockchains, and how fully leverage their advanced capabilities in your application's backend.

Last updated