VA - Withdrawal registered in ledger but failed in the blockchain

Sometimes, a withdrawal from a Virtual Account to the blockchain can be stored in the ledger, decreasing the amount of available off-chain assets in the VA, but is ultimately rejected or dropped in the blockchain.

When this happens, additional transaction attempts with the affected senderAccountId may return an error looking as follows or similar:

{
    "statusCode": 403,
    "errorCode": "balance.insufficient",
    "message": "Insufficient balance for account ######### and payment amount 9. Sender balance is 0.2."
}

Steps to fix a VA balance desync with a failed withdrawal to the blockchain

  1. An off-chain asset withdrawal is registered in the VA ledger.
    1. Find the VA withdrawal log - the steps are available in the following article.
  2. The blockchain rejects or fails the transaction related to the VA withdrawal
  3. Usually, Tatum VA infrastructure automatically changes the status of the withdrawal from "inProgress" to "Cancelled"
  4. Due to a desync, the withdrawal may remain stuck in the status "inProgress" and very rarely change to the status "Done"
  5. It is necessary to "Cancel" the withdrawal to fix the affected VA off-chacin balance desync.
  6. Follow the steps outlined in the following article.

Disclaimer

On-chain balance has prevalence over the VA ledger balance. Balance desync on a VA ledger can be "fixed". On-chain operations are permanent and non-reversible.

We strongly encourage developers to implement redundant on-chain balance checks in their environment:

  1. After each deposit.
  2. Before executing any withdrawal from a VA ledger to the blockchain.

🚧

It is the responsability of the user to ensure on-chain balance liquidity.