And using Balance Set event in sum is confirmed is wrong
4:13
BalanceSet is a total set of balance, it will change the start point of balances.
4:16
Endowed is not needed for calculating balances history. It will be duplicated.
4:18
ReserveRepatriated also have a from and to, just like Transfer.
4:18
so in the end, your formula of balance (free+reserve):
4:19
Sum(Deposits) - Sum(Transfer from) + Sum(Transfer to) - Sum(Withdraw) - Sum(DustLost) - Sum(Slashed) + Sum(ReserveRepatriated to) - Sum(ReserveRepatriated from)
The Parachain Bond Reverse historical balances are incorrect
https://www.notion.so/web3go/Moonbeam-bug-09-08-2022-bea3bbad92d8430fa6257a4140800707#51976cd056ea408a9067a163cbb204d4
And using Balance Set event in sum is confirmed is wrong