ledger-live-mobile icon indicating copy to clipboard operation
ledger-live-mobile copied to clipboard

Incorrect change in ETH balance due to failed transaction

Open hgupta18 opened this issue 5 years ago • 2 comments

Ledger Live Version and Operating System

  • iOS version 2.10.0

Expected behavior

  • After a failed transaction (due to an out of gas error), change in ETH balance should show a decrease due to consumed gas. However, the actual movement of ETH does not go through and change in ETH balance should not include that.

Actual behavior

  • The weekly/monthly/yearly change in ETH balance is being calculated incorrectly because it incorporates both the consumed gas and the planned ETH movement.
  • Final ETH balance associated with the account is correct perhaps because it is observed directly from the blockchain.

Steps to reproduce the behavior

  • Schedule an ETH transaction with high gas price, but low max gas resulting in out of gas error.
  • Change in weekly/monthly/yearly ETH balance will be incorrect.
  • Final ETH balance will be correct however.

hgupta18 avatar Aug 30 '20 15:08 hgupta18

@hgupta18 Can you try again on latest version? We may have fixed this situation due to some bugs. If it still isn't fixed, we would need more detail on way to reproduce this situation or identifying exactly which operation is not correctly valued.

gre avatar Nov 24 '20 15:11 gre

@gre I just checked again on the latest version. The current ETH balance is still correct, but looking at the "Year" view, the change in the ETH balance (+ XXX ETH in green) is wrong.

For this transaction, I was sending a message to a smart contract and receiving ETH in return. Here is the sequence of transactions and what I think should be happening.

Transaction 1: Send ETH: 0 ETH (only sending a message) Fee: x ETH Receive ETH: y ETH

Transaction 1 fails due to an out of gas error. The balance should only change by -x ETH but it seems to be changing by y-x ETH. I did not receive the y ETH because of the failed transaction and therefore it shouldn't be included.

Transaction 2: Send ETH: 0 ETH (only sending a message) Fee: x ETH Receive ETH: y ETH

Transaction 2 succeeds. The balance is correctly changing by the amount y-x ETH.

hgupta18 avatar Dec 13 '20 02:12 hgupta18