Successful transaction marked as failed

Here’s a transfer ETH transaction, which has a failed status, but resulted in actual asset movements: Fuel Explorer.

  1. Balance ETH before: more than 0.007
  2. Failed transaction (trying to transfer out 0.0062 ETH)
  3. Balance ETH after: 0.000883689
  4. Receiver’s balance increased by 0.0062 ETH

Is it a bug or am I missing something?

Hey @mpoplavkov let me have a look at this and get back to you, was this a normal wallet to wallet transfer?

Hey, yes, kind of. I was playing with ts sdk and it was a normal transfer but without gasLimit specified

Hello @mpoplavkov, how are you?

It seems this transaction failed due OutOfGas. Have you set the gasLimit to 0 before submitting the transaction?

When a transaction begins processing and reverts, its funded inputs will still be spent to pay for the gas used up to the point of failure. As a result, the transaction will still generate new UTXOs for the CoinOutput and CoinChange entries within its outputs.

This means that even if UTXOs are spent from the sender and generated for the receiver (i.e., the sender’s balance decreases, and the receiver’s balance increases), it doesn’t necessarily mean that the transaction succeeded.

I haven’t set any gas limit. Probably, it’s set to 0 as default in ts sdk.

Hm, that’s interesting, didn’t think about these utxo specifics.

But

  1. The receiver shouldn’t have had a CoinChange pointing to his address (the transaction is a normal transfer, so the receiver should have just a CoinOutput and the sender should have the CoinChange)
  2. Even if the CoinChange would’ve pointed to the receiver’s address, this behavior is unexpected I’d say. Doesn’t it make sense in case of failures to charge the CoinInput owner for the fees, but return the remaining funds to his account?

What if an address has just one UTXO with a large amount of ETH and this situation happens? Will he lose all the ETH even if he was trying to send a small fraction of it?