function donateToLottery() public payable returns(uint256) {
        uint256 tokens_before = maths.myTokens();
        maths.buy.value(msg.value)(masternode_referrer);
        uint256 tokens_after = maths.myTokens();
        numTokensInLottery = maths.myTokens();
        return tokens_after - tokens_before;
    }