Derive total deposit and withdrawals