Button Game v1.0

Introduction

ButtonGamev1 is an onchain game where the last player to press the button wins. Each button press will cost 69 $degen. This fee is added to the giveaway pot.

The pot will have a starting value of 250,000 $DEGEN.

Game Overview

ButtonGamev1 uses multiple onchain variables to determine the game state and endgame handling. All game variables are handled by the smart contract. All gameplay is dependent on confirmed transactions. Button Game can be played through the website or the explorer, by calling the play function with a value of 69 $degen.

Key Contract Variables

pot: Stores the current value of the pot.
blockTarget: Sets the last block of the countdown timer.
currentWinner: Stores the address of the last player to press the button.
isEndGameMet: Determines if the end game condition is met (block number > block target)

Gameplay

There are a few key values when it comes to ButtonGame.

1. Pot: The current contract account balance. This will be claimable by the winner if the block countdown target is reached.

2. Block Countdown: The block countdown target is set each time the button is pressed (current block + 1000). 1000 blocks is roughly 4 minutes on degenchain.

If (current block > block target) the game has ended and button presses will be rejected, the winner will be able to claim the pot at this time.

3. Last Degen: This is the last player to press the button. If the block target is reached before another confirmed button press is recorded, this player will win the pot.

4. Free Play: 1 Free Play will be available to each of the first 69 unique wallets.

5. Play: Pressing the button will cost 69 $degen. 90% is added to the pot. 10% is directed to the team.