Smartz Guide: Bet Me

in #ethereum6 years ago

Although smart contracts have been around for quite a while, their concept still remains somewhat of a mindbender for the average user. This series of articles aims to shed some light on the purpose and working principles of the selected smart contracts supported by Smartz platform thus providing you with a simple explanation in relation to each of them. Today’s article is dedicated to Bet Me, a smart contract for wagering that allows to eliminate many issues inсidental to the betting transactions, such as bad faith conduct of either party and welshing.

andy-hall-518489-unsplash.jpg

Say two people who don’t trust each other want to make a bet. The most obvious (and most common) way to make sure that the losing party will hold up to its end of a bargain is to enter a wagering contract that specifies all essential conditions, such as subject matter, the amount of bet, payment terms, etc. However, such contracts have many drawbacks: the first is obviously the money spent on the lawyers who will draft the agreement itself, and the second is — who’d have thought — the money spent on the lawyers who will represent the winning party in the court of law to enforce the contract in case the losing party contests its validity or simply refuses to pay.

Moreover, if the losing party is declared bankrupt or drags out the trial, the litigation can last for years, which is always bad news for the winner, not to mention that the court might held the contract void or even take the side of the losing party.

All these scenarios can be avoided if parties agree on using a smart contract instead of a written agreement. This allows to reduce a wager to a set of simple predefined rules that will be executed automatically, which eliminates most of the risks related to the human aspect of the deal — basically, this is exactly what Bet Me is designed for. In the case with Bet Me, there are three parties to the contract: the owner (the one who sets up a wager by creating a smart contract), the opponent (the one who takes the bet), and the arbitrator agreed on by both owner and opponent. In simple terms, the whole process is divided into several stages and can be described as follows:

Stage A: the negotiation between the owner and the opponent that comes before the deployment of a smart contract. The parties define the subject matter of the wager as well as other essential conditions (the amount of bet, a time limit for the dispute resolution, etc.) and agree on the arbitrator, who can charge a fee for the provided assistance; as a form of guarantee, the arbitrator can be also asked to make a bail that will be divided between other two parties in case he refuses to settle the bet (or simply does not settle before the deadline.

Stage B: the deployment. The owner creates the smart contract and specifies the conditions decided upon during the negotiation as well as the addresses of arbitrator and opponent, makes a statement (X is true) and then places his bet by transmitting a certain amount of ETH. The opponent agrees to take the bet by making an opposite statement (X is false) and transmitting the equal amount of ETH; the money is then locked on the smart contract address, waiting for the arbitrator to settle the bet.

Stage C: the settlement. The arbitrator either decides on the winner (who then gets his honestly earned ETH) or rules that the wager can not be settled (for example, the score of a football game is the subject matter, but the game is cancelled due to bad weather conditions or something). In this case, each party receives its ETH back; the arbitrator gets his fee and the bailment sum either way, provided that he delivers his judgement before the deadline — if he doesn’t, the money is transmitted back to each party (the bailment sum is then split between them). After the wager is settled and the money is transferred to the winner, the contract can be abolished by the owner.

As said above, Bet Me is designed for trustless bets: if something goes wrong, each party gets its money back. The only problem that can arise is related to the arbitrator’s decisionmaking: although his candidature is agreed on by both owner and opponent, there is no guarantee that he will be fully impartial. If this is the case, a collective arbitration carried out through a separate smart contract (think no further then Multisig) could be a solution; if the outcome of a bet depends on objective facts, turning to oracles might also be helpful; as for more futuristic concepts, there is another possible option — a public list of rated arbitrators (the so-called token-curated registries) similar to the lists that exist in alternative dispute resolution system.

The deployment of Bet Me on the Smartz platform is actually not that big of a deal even for a non-tech savvy person: if it is the first smart-contract you’re working with, you can use a simple step-by-step guide on how to deploy relatively similar smart contracts, watch the video below or visit this page to learn more about its specific functions and the details of its deployment in general. The whole process can be best described as intuitive, since both mentioned guides are self-explanatory.

Also we prepared a simple video about deploying Merkle Airdrop on Smartz platform. More info on the supported smart contracts will follow.

Subscribe to our blog @smartz to keep abreast of news about smart contracts and our platform.

Sort:  

Hi! I am a robot. I just upvoted you! I found similar content that readers might be interested in:
https://medium.com/smartz-blog/smartz-guide-bet-me-8c3b7456b57a

You write well, @smartz!