Post
Topic
Board Announcements (Altcoins)
Re: [ANN][ICO][BOUNTY]⚡ZoomRaffle.io - INSTANT ETHEREUM-BASED RAFFLES⚡
by
sjyi
on 19/05/2018, 03:07:15 UTC
Some observations based on my taking a chance on your raffle.

Prior to me entering the raffle, all winning chances were either 50% or higher.

0x61Ec39942476D93C475f91ACA2fAE062d64B250c placed a bet for 0.01 eth 4 days ago on May-10-2018 10:57:44 AM +UTC

I placed a bet for 0.012 eth on May-14-2018 06:01:01 PM +UTC

The raffle drawing took place on 3:07PM. (counting down of 5:00 minutes to 0:00).

There was a dialog box that said "raffle drawing in process. please wait" (something similar to that. I didn't write it down).

After waiting for about 10 minutes of waiting with nothing happening, I walked away.

I came back a few hours later. I saw "You won 0.022 ETH" dialog on left bottom of my screen.  When I clicked on it, it disappeared.  When I checked my address I saw that no deposit came in.

what happened?

We’ve also refunded  your bet to your Ethereum address due to the mistake in our web interface.

https://etherscan.io/tx/0x59e002a4e38c74ac9f648ac60c3ce93ba428f27d16bfcde7d7763b416f119b60

Thanks for the refund.  Just wondering why you process Odd games differently from Even games.  The code segments seem to be identical from Odd and Even game index.

Hello, the reason for that is that we don't want to overpay Oraclize. Here is the deal basically: at the end of the raffle we would clean up all the bets, jackpot and other variables. In EVM (Ethereum Virtual Machine) every time you use delete opcode (which is equivalent to setting a storage to 0) you get refunded 10,000 gas. Because Oraclize callback was doing the cleanup we were losing a lot of refunded gas to Oraclize.

Now we have a different system: we clean up the previous game on the beginning of the next game (first bet of the next game), in order to differentiate between "next" and "previous" game we just decided to separate them into odd and even. So at the start of the odd game the first bet also cleans up the previous even game and vice versa. The result is that our players get a nice gas refund which reduces the transaction price for placing a bet by roughly 50%.

Thanks and hope that this architectural decision on our side makes sense to you.

Your explanation seems to make a lot of sense regarding the refund of gas.  But please do refer to "When paying onchain there is no reliable backward-compatible way for Oraclize to give back the gas "change". This is due to how Ethereum works: it is not possible to determine the exact amount of gas that will be used before the transaction gets confirmed, because it depends on the current state. Sending back the unspent gas afterwards would potentially create side effects."

from https://docs.oraclize.it/#pricing-advanced-datasources-call-fee

Are they talking about the samething?

Yes, in a sense. Basically what they are saying is that all the extra gas will not be refuned to us, so in order to minimize costs we need to approximate the gas costs as accurately as possible.

I'm not clear with your explanation vs. what Oraclize is talking about.  Oraclize is talking about returning the unused "change" which can't be returned.  So setting the correct gas amount would be the best way to "save" on the fee.  But you are talking about actual "refund" with a hard number of 10,000 gas.  Yet, I could not find any mentions of refund.  Would you point out where the refund is discussed?