I've recently been reading up on the dynamics of gas price and gas limit and how they can be used to influence mining time, particularly in the context of ICOs. I just recently skimmed through the transaction history for the mined blocks of the BAT ICO to get a sense of gas price / limits used, and had the following question:

If one is too late for an ICO, is the MAXIMUM transaction fee taken from the sender's account?

I understand that if your max gas limit is 400000, and (as was the case for BAT), the transaction only required ~50000 gas, then you are refunded the rest if your transaction is confirmed. This checks out with what I saw on etherscan.

However, if you scroll a couple of blocks further after the BAT cap had been reached, it appears that people were charged the MAX tx fee of specified gas price x gas limit, as opposed to specified gas price x the 50000 gas quanity utilized for those transactions that were confirmed.

I know that if you're too late for an ICO you are refunded the ETH you wanted to convert, but lose the transaction fee. I guess I am just surprised that you would be charged the max potential tx fee instead of the fee you would have paid had you been confirmed, especially when those who are confirmed get excess gas refunded.


Given the condition that taking part in an ICO means

  1. Transfering Ether directly into a smart contract and
  2. there is a limited amount of tokens,

then the smart contract's code would have a condition like:

if (yourOrder > tokensLeft) throw;

a throwconsumes all the gas, whereas taking measures where only a return would happen would have been more elegant, meaning the unspent gas would be returned even if no tokensale was possible anymore. It does not neccessarily have to be planned for the "throws to throw", but as I said, the design of the smart contracts might have lead to this circumstance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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