At the moment the total balance returned by the service is a sum of confirmed + unconfirmed + locked but this is not correct because whenever a tx spending some utxo with some change gets accepted in mempool, both the utxos spent as input and those unconfirmed as outputs are taken into account in the total balance.
At the moment the total balance returned by the service is a sum of confirmed + unconfirmed + locked but this is not correct because whenever a tx spending some utxo with some change gets accepted in mempool, both the utxos spent as input and those unconfirmed as outputs are taken into account in the total balance.
Example: https://github.com/tdex-network/tdex-daemon/issues/700
The correct total balance is the sum of confirmed and unconfirmed without taking into account the locked one.