I had some small amount of ether remaining in one of my accounts so I decided to send everything to the DAO. But the contract execution failed with an exception - out of gas. I was trying to investigate why this happened only to find out strange gas cost on the last instruction in this vm trace:


Can anyone please help me understand what happened?

  • Please consider voting the answer up, if it solved the question. Keep the community active.
    – niksmac
    May 24, 2016 at 5:46

1 Answer 1


An easier to interpret trace can be seen here at ether.camp.

What happened is that the contract tried to call another contract, specifying a gas quantity of self.gas - 34050. Since your execution had less than that much gas remaining at the time it was called, the result was a negative number, which translates into a very large positive number in unsigned arithmetic. It then attempted to make a call with that, and the EVM threw an exception because it was attempting to spend more gas than was available.

EVM exceptions result in all gas being consumed, and the transaction being rolled back.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.