Something that I have been interested in for a long time is blockchain technologies. Right now investing in cryptocurrencies and blockchain companies is the cool and hip thing to do. I feel like the market is saturated with a lot of garbage and there are many investors that don’t understand any of the underlying technology that run the tokens they are purchasing. It’s the wild west of uninformed actors and I wanted to separate myself from them and really work with the code that shows so much promise for the future of money. CryptoWheel is my first step into the world of blockchain programming and Distributed Applications (DApps).
Cryptowheel is a very simple DApp that is built on top of the Ethereum Blockchain. I chose Ethereum to build my DApp on because it has lots of community support and is the biggest project that supports what are called “Smart Contracts.” These contracts are what allows a blockchain to be used to execute any type of code instead of just sending “money” back and fourth from address to address.
CryptoWheel is a simple game where you have a 1 in 8 chance of winning. You will bet at the current game price (at the time of writing this it is ~$10 USD). It is basically a guess what number the wheel is going to land on. You submit your bet using Ethereum’s cryptocurrency called Ether. This “bet” is actually sent as a transaction to the CryptoWheel Smart Contract that is on the Ethereum Blockchain. Once you send this transaction, the code on the chain runs a random algorithm and decides if the number you guessed is equal to the random number between 1 and 8. This transaction causes the wheel to spin and if you guessed correctly, you win the full contents of the pot and the Ether is automatically deposited into your account. If you lose, your bet is added to the pot minus ~1$ as a fee to make sure there is always an incentive to spin the wheel after the pot has been drained.
The reason why this is implemented on a blockchain as opposed to a regular app is that this method can be proved to be unbiased and true because anyone can look at the code on the blockchain and read exactly how it works. This is different because in a regular app situation, you would have to trust that the creators of the app are not doing any “funny business” with your money. Also, working with cryptocurrencies means that transactions are peer to peer meaning that no credit card company or middleman takes their cut of your profits as well as your payment is instant and verifiable.
There is more info about how the app works as well as the full code to the Smart Contract available at https://wingfelder.ca/cryptowheel
Since there are quite a few technical barriers to using this DApp, I have included a video outlining the user experience when using it.