RE: The EOS Crowdsale contract explained

You are viewing a single comment's thread from:

The EOS Crowdsale contract explained

in eos •  7 years ago 

You should note that in buyWithLimit, the dailyTotals will be calculated at the moment of contract execution. So if you're contributing to a future period where only 100 ETH have been contributed so far, your transaction specifying a limit of 101 ETH would process normally and you would still buy EOS tokens, even if the day ends up collecting 20000 ETH.

I'm talking about this code in particular:

    userBuys[day][msg.sender] += msg.value;
    dailyTotals[day] += msg.value;

    if (limit != 0) {
        assert(dailyTotals[day] <= limit);
    }

    LogBuy(day, msg.sender, msg.value);
Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

This was the info that I came for. Thanks for pointing that out as it's not explicitly obvious when the limit is determined.