ICP Dashboard - Negative Account Balance Displayed Bugfix

On January 4, 2024, it was discovered that there was an account with a negative balance
on the ICP dashboard. Note, this issue only affected the dashboard. The ICP ledger always
contained the correct balance. The dashboard syncs transactions from the ICP ledger
canister and stores the values into a relational database off-chain. In the database, balances are calculated and stored as well.

Upon further investigation, we found a total of three accounts with balances with unexpected balances.

The following accounts that were affected:

  • 0207623f5d62220bd015cd0ca2f68580fffe401a67a46c60a74776eb560d283b
  • 77076e20e94d0cd56e579597508d7e50fb625b1f91be0513766ac05ad037d96f
  • df170fdf57347655bf885c2a6312dacd2951b90d17dde2db77648da125a5e877

Looking into these accounts they each had transactions at 13:31 UTC on June 16th, 2022.

During this time the ICP dashboard team was performing a migration on the ledger API database to better handle account information. While the migration was working, transactions that were just synced to the database were not fully written. This caused the balances to be miscalculated at that point in time.
These miscalculated balances were carried over through time until now.

In order to correct the issue, we forced a recalculation of the incorrect balances.

5 Likes