Participating in the TzButton with Beacon and Thanos
The second round of TzButton is live now! This game is one of the few out there which is controlled by a smart contract deployed on the Tezos blockchain. Let us explain how the game works, step by step.
This game is one of the few out there which is controlled by a smart contract deployed on the Tezos blockchain. Let us explain how the game works, step by step.
Setting up Thanos
We recently have published TzButton with a guide for Beacon and Beacon Extension made by AirGap. As there are many wallets out there we also made a guide for Thanos, which in our opinion, has a great and easy user interface!
For this guide, you will need to have Thanos installed as a Chrome extension on your Browser. You can get it here.
Before we start with the guide you must enable the dApp permission in Thanos. You can do so by heading to Settings→ DApps→ Enable Dapp interaction (See pictures below)
How to participate in the TzButton game!
- Now let the fun begin! In order to participate, you need to be able to send at least 0.2 tez to the TzButton. Hence make sure you own a little bit more than 0.2 tez on your Thanos wallet.
- Now you don’t have to worry about having to input information manually. It will all happen in the background! Head to TzButton.io and press on the blue TzButton.
- Once pressed you will be redirected to the Confirm Connection page. Once you are on this page click on the Connect button
4. You will now you be prompted to confirm the operation. Insert your Thanos account password and subsequently hit confirm.
5. Magic! You now have participated in the Pot and may become the next lucky winner! You can now check the transaction the Blockexplorer or wait for a few minutes to see that you are the Pot leader!
What is the TzButton?
- When clicking the button, you will add 0.2 tez to the Smart contract’s balance
- The countdown is reset and you will become the leader, which is displayed below the button.(See image)
3. If you are the last person who has paid into the smart contract (Tzbutton) when the countdown expires, you can withdraw the whole balance of the smart contract.
4. Every time funds are added to TzButton, the timer gets shortened. The higher the balance is, the less the timer reduces. The countdown can reduce by as little as a split seconds, hence more 0.2 tez transactions are needed to decrease the timer by a full second.
A small example
5. Alice presses the button, 0.2 tez is now on the smart contract, the countdown is reset and the total time is reduced by 1 hour and 30 minutes, which means it’s now counting down from 22 hours and 30 minutes.
6. 1 hour and 25 minutes before the countdown expires, Bob presses the button. 0.2 tez are now in the smart contract, the countdown is reset and the total time is reduced by 45 minutes, which means it’s now counting down from 21 hours and 45 minutes.
7. Many people participate, the balance of the smart contract increases and the time each countdown lasts decreases, but the countdown never hits 0. Each transaction adds another 0.2 tez, the balance grows to 2419.8 tez and the countdown resets to 9 hours and 1 minute.
8. 5 hours and 32 minutes before the countdown expires, Charlie presses the button, 2420 tez is now on the smart contract, the countdown is reset and the total time is reduced by only around half a second, which means it’s still counting down from 9 hours and 1 minute. The countdown now changes so little that it requires multiple transactions for the countdown to decrease another second.
9. No one presses the button for more than 9 hours and 1 minute. This means Charlie is the winner.
10. Charlie can now withdraw 2420 tez, because he was the leader when the countdown ended.
Download
AirGap Wallet
💻 macOS
💻 Windows
💻 Linux
📱 iOS — App Store
📱 Android — Google Play (GitHub APK)
AirGap Vault
📱 iOS — App Store
📱 Android — Google Play (GitHub APK)
Beacon Extension
TzButton