- A TPoS contract is created when the transaction is synchronized.
- A TPoS contract is deleted when the transaction is rolled back.
- A TPoS contract is closed when the collateral output is spent.
- A TPoS contract is enabled when the collateral output gets unspent.
In order to speed up the available coins retrieval,
the aggregated_amounts table is created, here we store
the total available coins which can be retrieved fast.