Ethbet - decentralized, peer-to-peer, and provably-fair Ethereum-based dicing game without a house edge.

Ethbet is a decentralized, peer-to-peer, and provably-fair Ethereum-based dicing game without amandatory house edge. Ethbet is able to offer bets without a house edge because players bet directlyagainst other players instead of against a centralized house. The disadvantage of this is that in order toplace a bet, there must be another party willing to place the same bet. For this reason it is possible thata player must wait for their desired bet to take place, especially if it is very large. To combat this, anadditional feature of an optional player-defined house edge is added, allowing players to offer and take(‘call’) bets with any house edge that they desire. Thus, a player that prioritizes speed over theirexpected return can agree to a bet that gives him a slight disadvantage (i.e., a bet that gives hisopponent a small house edge). Similarly, a player that is patient and prioritizes their expected return canoffer bets that the formerly mentioned player may choose to call. This results in a model where playersare effectively able to become their own casinos, allowing market forces to provide players with bets asquickly as possible at the best possible rates. The Ethbet protocol features an efficient off-chainmatchmaking relay in order to allow players to quickly and cheaply communicate their intent. Theprotocol can also be extended to support betting using any Ethereum-based (ERC20) token and for usewith other games.

Gambling Without a House Edge

A house edge is a statistical bias in favor of the house, so that the house has a slight advantage in everybet. House edges of various games found in physical casinos often range from 2% to 15%, with somegames having a low house edge (such as craps) and other games having a higher house edge (such asslot machines). With the advent of online gambling using cryptocurrencies, various websites offerplayers relatively lower house edges, such as 1%. Although 1% sounds like a low house edge, one mustkeep in mind that this house edge is applied to every individual bet. Thus, if a player only places onebet, they are expected to lose 1% of it, on average. But it’s likely that most players will want to betmore than just once. If a player places 100 bets, they are expected to lose 1% of each of those 100 bets,making it increasingly difficult for the player to turn a profit, inevitably leading to gambler’s ruin (theplayer running out of funds). This is how dice sites are able to consistently generate steady streams ofprofit for their owners and investors – they slowly but surely make sure that the more people play, themore likely they are to lose all of their money to the house.

Betting without a house edge saves players much more than a trivial amount. Because a player’sexpected loss can be zero for every bet they make, they can now make hundreds or thousands of betswithout statistically being likely to lose more and more of their money over time. With a house edge of

0%, a player’s probability of gaining capital is equal to their probability of losing it – they are no longer

making an inherently irrational decision with a negative expected gain.

Provable FairnessMost modern cryptocurrency dicing sites offer provably-fair betting. This is done by having a clientseed and a server seed. The client seed is picked by the client, often generated randomly by default. Theserver seed is picked by the server. The server then hashes its server seed using a secure cryptographichash function (such as a sha2 or sha3 function) and provides the hash to the client before their roll.Then the client submits their client seed and bet information to the server, and the server combines bothseeds, using a public algorithm to generate a random number. After the roll has been made, the client isable to view the server seed that was used, and can confirm that the server did not modify the clientseed or the server seed, and therefore also the result of the roll. This results in a roll that ismathematically impossible to bias or otherwise predict by either party, given basic assumptionsincluding that the client does not use a predictable seed, and that the hash function used is secure.Although this model of provable fairness is suitable for a client-server model, it cannot be performed ina smart contract, as the blockchain is public information and no fully-unbiased source of entropy exists.Most solutions put fourth to securely generate a random number on the Ethereum blockchain posesignificant downsides, as there are too many actors that are able to influence the blockchain whenmoney is at stake. For example, if the hash of the next Ethereum block was used as a source ofrandomness, then a miner can choose to modify a block before they publish it, or can decide againstpublishing a block altogether, depending on if it is favorable to them. Given that there have alreadybeen notable instances of miners acting selfishly in a way that hurts other users, this is not anacceptable solution.RANDAO1 attempts to solve the problem of untrustable miners by effectively crowd-sourcing entropy.Anyone who wants to participate in RANDAO may contribute to its pool of entropy, and isincentivized to do so as they are paid a small reward, which RANDAO in turn collects from those thatcall its contract. It would take every participant to collude with one another in order to manipulate theresult2. Unfortunately it takes a wait time of several blocks for RANDAO to be statistically confidentthat a miner has not manipulated its pool of entropy. RANDAO is also limited in the amount of entropythat it can provide per unit of time, and potentially per unit of ether.A similar algorithm called the Signidice3 algorithm is being used by early versions of DAO.Casino4, ablockchain protocol designed for provably-fair gambling. Although sound from a statistical and gametheoreticpoint of view, this algorithm is computationally expensive, relatively complex, and has been

used less frequently in production settings. This RNG method is best implemented in a separate smartcontract that has a large amount of participants that are unable to collude among each other. Due to thecomplexity and amount of risks involved with this algorithm, we have chosen not to adopt it.One solution which is used by Etheroll5 and others is to use Oraclize6 and random.org7 to generate arandom number. Oraclize is a service that fetches external (outside of the blockchain) data for use onthe blockchain. Oraclize makes a call to random.org, returning the integer roll from random.org, the idassociated with it, and a TLSNotary proof8, showing that Oraclize did not modify the result. As the idassociated with the bet (returned from random.org) is supplied as well, it can be shown that Oraclizeonly made one call to random.org for every call it was requested to make. This solution has twodownsides, the first being that it introduces a liability of depending on Oraclize, which is not desired.The second is that random.org must be trusted to provide a secure random number. This solution iscurrently implemented in at least one decentralized dicing game due to the lack of appealing andefficient alternatives. Performing statistical analysis on the results that have been returned fromOraclize via random.org, it appears that this solution has thus far succeeded (with high probability) inits goal of providing a source of entropy that is unbiased. Although the previously mentioned issue of aminer choosing not to publish a block if it would result in a RNG output that is detrimental to them reoccursin this scenario (with Oraclize instead of the miner, however), a single instance of this occurringcould be detected as there would be a gap in the integer IDs returned from random.org. If,hypothetically, Oraclize attempted to game this system, it could only be done once before it ceases towork (as they would no longer be trusted afterwards).An additional solution is currently being tested by Oraclize9. This solution involves a hardware randomdata source that is integrated with the Ethereum network. The random bytes generated by the datasource are periodically published onto the Ethereum network along with a proof that they have not beenmodified. Although fully functional, it is currently only available on the testnet. When available on themainnet, this will likely become the best option to use for Ethbet’s source of randomness. Until thatperiod, the aforementioned solution that has an additional liability of random.org is scheduled to beused for Ethbet.

The Optional Player-Defined House EdgePlacing bets with a house edge of 0% does not come without a disadvantage, i.e., a bet can only takeplace if there are two parties that wish to make it. As bets are significantly more advantageous forplayers when made with a 0% (or otherwise negligible) house edge, network effects may cause themajority of players to use Ethbet, as it will be more profitable than other betting alternatives. Even withthis, however, it may be possible that players are not content with the amount of time they have to wait

between bets, especially for larger bets, which fewer players are willing to call. To solve this problem,an optional feature is added: allow players to offer and call bets with a player-defined house edge.With the ability for players to offer and call bets with an arbitrary player-defined house edge, theproblem of large wait times for bets can now be solved with negligible downsides. Players areeffectively able to become their own casinos within Ethbet, setting their own house edge. As everyplayer that offers bets is competing against other players to have their bets taken, they are incentivizedto set their house edge as low as possible.For example, if a player wants to make a very large bet, they may be incentivized to offer a house edgeto whoever calls the bet, so that they do not have to wait too long for someone to bet against them. Thisplayer decides to prioritize speed over their proportional expected gain.Similarly, if a player has a large amount of ETH and wishes to make a profit over time with it (withhigh or variable probability), they can offer bets with a small house edge in their favor, making it easierfor others to play the game while giving them a small profit over time for their service. This player isproviding ‘bet liquidity’ to Ethbet by acting as their own casino, and in return is rewarded with a houseedge in their favor.

Profit ModelThe profit model of Ethbet has several aspects which cause Ethbet tokens to appreciate in value:The Ethbet smart contract will take a small portion of the house edge that is offered by players. Thisonly occurs for bets with a nonzero house edge. As an example, suppose that a player offers a bet of 1ETH with a house edge of 1% in their favor. This player’s expected gain would normally be 0.01 ETH.If the Ethbet smart contract were to take a 10% cut of their expected gain, this would change theirexpected gain to 0.009 ETH. Thus the player would win a total of 1.009 ETH instead of 1.01 ETH,decreasing their profit by slightly less than 0.1%, or less than 1/1000th. The portion of the house edgethat Ethbet takes is decided by token holders. This house edge can then be converted to EBET by smartcontract so that the value of EBET tokens increases. This could be done via an external protocol suchas 0x, or by an Ethbet smart contract.In addition to this, it’s possible for Ethbet to charge a small fee on top of bets. Because Ethbet is not thehouse and is instead a matchmaking platform, this fee does not need to be high like in other dicingplatforms. No matter how low this fee is, it is raw profit for Ethbet, as Ethbet has no funds at riskduring play. This value will be able to be decided by token holders. Profit from this is also convertedinto EBET tokens, increasing their demand as a consequence.Although token holders can vote on these values, they are incentivized not to set these values to beunreasonable, or less users would use Ethbet, and the value of their tokens would decrease. Forexample, token holders would never vote to charge a fee higher than alternative dicing platforms offer,or the platform would be unable to compete with them. Thus we are able to leverage wisdom of thecrowds in order to effectively optimize the profitability and competitiveness of the Ethbet platform.

Ethbet Tokens (EBET)

For the purposes of decentralization, enforcing beneficial market incentives, decentralized governance,further developmental funding, and future endeavors of Ethbet, an Ethbet token (EBET) will be createdon top of the Ethereum network. This will be a standard ERC20 token, and thus will be secure, easy tostore, use, and trade, as wallets and exchanges already have the needed technical infrastructure tointerface with tokens that implement the ERC20 interface. For the technical details of the ERC20specification, see the EIP on Github16.The Ethbet token will be used as currency for the Ethbet platform and protocol. In order to provideincentives to run Ethbet relays as described later in this paper, a small fee is charged for the service ofmatchmaking. This fee is dynamic and fluctuates based off of the bet liquidity of the platform. Forexample, if few users are offering bets, the fee can be low or even negative, compared to a higher feewhen many users are offering bets. The profit that Ethbet smart contracts generate that is not in EBETcan be converted to EBET by having the smart contract purchase it, either via a third party smartcontract such as 0x or via an Ethbet smart contract. This buy-back feature allows the price of EBET toappreciate as the platform becomes more widely used. In addition to this, it is possible for tokenholders to vote on a burn rate that can be used by Ethbet. A burn rate would cause the smart contract todestroy a small portion of EBET that are used, causing the currency to become deflationary.In addition to this functionality, token holders are eligible to vote on Ethbet Improvement Proposals(Ethbet IPs). An Ethbet IP is a proposed change to Ethbet, such as modifying the fees that Ethbetcharges. Rather than having a single entity decide on this proposal, the proposal will be voted on bythose who hold Ethbet tokens, with their voting weight being linearly proportional to the amount oftokens that they hold. This way the holders of EBET are able to optimize Ethbet in the direction thatthey see most desirable.

Crowdsale

Those wishing to invest in Ethbet via purchasing Ethbet tokens will have the opportunity to do so viathe Ethbet crowdsale. The funds received from the crowdsale go to fund the further development ofEthbet, including third-party contract security audits and further web/application development. Thecrowdsale will last for 4 weeks and is set to begin on September 17th, 2017, 8:00 PM UTC. Allinformation relevant to the crowdsale is available in the below table.

The intended funding allocation from the proceeds of the crowdsale will depend largely on the amountof tokens purchased. With a low amount of funding, the project will be able to fully fund necessaryoperations such as smart contract development, user experience development (interfaces to interactwith the smart contracts, written primarily in JS and HTML), and security audits of all criticalinfrastructure including smart contracts.With larger amounts of funding, more ambitious goals can be set. These goals include funding largeadvertisement campaigns to promote Ethbet, decreasing the barrier to entry for Ethbet by promotingadditional efforts towards user experience and ease of use, overcoming legal barriers to morewidespread adoption, and additional projects involving other types of gambling and games on theblockchain. As we cannot anticipate how many tokens will be sold or account for future unknownvalues, we cannot yet provide information showing exactly what proportion of funds will be allocatedto which of these goals.The maximum possible tokens supply is 10,000,000 EBET. Of those, up to 75% (7,500,000) can bepurchased during the crowdsale. If all of these were purchased on the first day of the crowdsale (+50%tokens), that would make the theoretical maximum possible funding 7,500,000 / 1,500 = 5,000 ETH,ensuring that there is no possibility the project is significantly over-funded. For more information aboutthe crowdsale or to participate in it, visit https://crowdsale.ethbet.io/

How to take part in the Ethbet Crowdsale

1. Wait until September 17th, 8PM UTC. This will occur in 6 days and 8 hours.

2. Use a wallet that supports tokens, such as MyEtherWallet, Metamask, Parity, orMist.

3. Move Ethereum into your wallet. Ethereum is the only currency that isaccepted in the Ethbet crowdsale. If you do not have Ethereum, you can buy itfrom websites such as Coinbase, or use aservice such as Shapeshift to exchange othercryptocurrencies for Ethereum. Be sure to securely store and back up yourprivate key.

4. Send the desired amount of ETH to the crowdsale wallet address below (not yetshown). Set your 'gas' to 200,000 fora smooth transaction. You will receive 1,000 EBET plus an early investor bonusper ETH that you send. The current investor bonus will be displayed.

More detailed information will be posted prior to the date of the crowdsale. If you haveany questions about the crowdsale, don't hesitate to send us an email.

Do not send ETH from an exchange wallet such as Coinbase, Poloniex, andmany others. Thesewallets do not support ERC20 tokens, including Ethbet. Your tokens willbe lost if you use a wallet that does not support tokens.

Do not participate in the crowdsale if you have not read or do notunderstand the risks involved withplatforms such as Ethereum and Ethbet.

Do not attempt to participate in the crowdsale if you are a resident ofthe United States. Although our token is likely no longer considered a security federallyand by all or most states, there are still many other potential legal complications involved with sellingto US residents.

The Ethbet Protocol

The Ethbet protocol is a description of what information users need to relay to each other in order tosignal their intent to bet assets. This protocol is open, meaning that it can be implemented and executedby any actor. There is no need to use a specific website, browser, or even medium of communication, as

the information can be exchanged via any method including email, a forum post, or a physical message.In addition to this, the protocol is extendable in that it can be modified for use with not just Ether, butalso with any ERC20 token on the Ethereum blockchain. This would allow users not only to bet witheach other using Ether, but also any other Ethereum-based token. The original version and deploymentof the Ethbet protocol will focus on Ether, leaving the option of arbitrary ERC20 token support for alater period.The Ethbet protocol closely mirrors the protocol outlined in the 0x whitepaper20, as the Ethbet protocolhas almost the same goal’s as 0x’s: 0x intends to allow users to exchange tokens with each other, whileEthbet intends to allow users to bet tokens with each other. The following example demonstrates ascenario of two users using the Ethbet protocol to make a bet with each other. In this example ‘Maker’is the user that offers a bet and ‘Caller’ is the user that accepts that offer:1. Maker approves the Ethbet contract to access their balance that they intend to wager2. Maker creates an offer to bet their balance, specifying their desired amount, edge and bet expirationtime, then signs this offer with their private key, proving both their their ownership and intent3. Maker broadcasts their bet via any medium. Theoretically the best place to broadcast a bet will be anEthbet relay, but there is no reason why it cannot be posted on a forum or sent via an email, as it is onlya string (text)4. Caller reads the bet offer from Maker and decides they would like to call it5. Caller approves the Ethbet contract to access their balance as well6. Caller submits the Maker’s signed order to the contract7. The Ethbet contract authenticates Maker’s signature, verifies that the bet has not expired and that thebet has not already been called8. The Ethbet contract executes the bet and transfers the bet amount between the two parties based offof the outcome.The primary method of communication with the Ethbet protocol is intended to be via relays, as outlinedin the previous section. The full protocol description of Ethbet is not yet finalized, but the informationand format of it will be relatively standard, containing the parameters of a bet (amount, edge,expiration, and later on, asset type), as well as the necessary information to secure it, including acryptographic hash function like SHA3 and an ECDSA signature from the private key of theparticipants.

Development Timeline

At the time of the crowdsale, the Ethbet token and Ethbet crowdsale contracts will be deployed on themainnet and fully functional, as necessary for the crowdsale to occur. The code in these smart contractsis a relatively standard and lightweight implementation of the ERC20 standard, and the possibility forcritical bugs is small in comparison to that of more complex and novel contracts, such as the primaryEthbet game contract. If a significant problem occurs that is recoverable, the necessary steps will be

taken to remedy the situation. For example, if there was somehow a critical flaw in the Token contract,allowing someone to steal all Ethbet Tokens, we could fix the problem, deploy the new token contract(with the problem fixed), and restore the balances of all users, migrating the entire platform to thenewer version of the token, similar to what happened with Ethereum and the DAO. An issue like this isis very unlikely to occur unless it is caused by a problem within Ethereum itself, as the Ethbet Token isnearly isomorphic to most Ethereum (ERC20) tokens, so a critical problem with one could indicate thesame problem with many others.After the crowdsale is complete, Ethbet tokens will become unfrozen and can then be sent to otherusers. At this time the development of the primary game contract will proceed. This is a relativelylengthy process despite the simplicity of the game architecture. The general timeline is as follows:1. Develop primary contract functionality and tests2. Extensively test and audit the contract for potential flaws3. Deploy the contract onto the testnet4. Allow users to interact with the contract during a beta period5. Continue to improve the contract as needed6. Perform final third-party security audit(s)7. Deploy the contract onto the mainnet8. Continue to improve non-contract code, such as improving accessibility and user interfaces,only updating the contract to fix critical issues or to later implement new features.

In addition to this, there’s other developmental overhead, such as the off-blockchain relay and varioususer-interfaces required to interact with Ethbet in a user-friendly fashion. In order to make interactionwith the smart contract user-friendly and simple, users will be able to interact with it via the Mistbrowser, giving them an experience similar to traditional websites, but while still interfacing only withsmart contracts for their betting.

TimelineQ1 2017 Market research, feasibility assessment, other planning– completedQ2 2017 Website and Whitepaper – completedQ3 2017 Crowdsale, live demo, development, and community building – in progressQ4 2017 Continuation of development and other improvements, alpha/beta launchesQ1 2018 Full launch, playerbase building, community growth, further improvements as neededQ2 2018+ Additional features, projects, games, advertising, and community building