Inspired by Reddit's famous social experiment, The Button harnesses ink! smart contracts and Aleph Zero's lightning-fast finality to create an immersive gaming experience. Let's delve into the intricacies of this enthralling game and explore its core components that breathe life into the Aleph Zero blockchain.
The Button's Gameplay Mechanics
At the heart of The Button lies a countdown timer linked to finalized blocks on the Aleph Zero blockchain. Every player who clicks on The Button resets the timer, extending its lifespan to 90,000 blocks (around 25 hours). The game boasts three unique modes, each governed by its distinct rules, challenging players to strategically engage for optimal rewards.
How The Button Operates
Players employ PSP22 standard ticket tokens to access game modes and earn reward tokens, unlocking The Button's Marketplace for Dutch auction-based ticket sales. The game also introduces SimpleDex, a Decentralized Exchange facilitating seamless token swaps between reward tokens and the wAZERO token, Aleph Zero's PSP22-wrapped native coin.
The Core Components
The Button Contract: Governed Gameplay and Reward Mechanisms
At the heart of The Button resides a pivotal smart contract known as The Button contract. This intricate codebase governs the game's rules, records player interactions, and regulates the distribution of rewards. As participants enter the game, their interaction with The Button contract initiates by granting permission to spend one ticket token, serving as the entry fee for accessing the game's thrilling mechanics.
Upon receiving the ticket, The Button contract meticulously records the player's score and triggers the distribution of rewards based on the game's specific ruleset. The rewards, distinct from the entry ticket tokens, are PSP22 tokens minted directly into the players' accounts by The Button contract itself.
A crucial role assumed by The Button contract involves compiling and tracking all rewards disbursed during the game's duration. These rewards collectively form the coveted pool for The Pressiah – the fortunate individual making the final click before The Button's end. As the game progresses, The Button contract meticulously logs the rewards paid out, setting the stage for the grand finale as the countdown timer approaches its end.
Upon The Button's conclusion, the designated Pressiah receives 50% of the total rewards minted during the round as recognition for their achievement. A game reset follows, transferring all tickets held by The Button contract to the Marketplace and laying the groundwork for a new round of captivating gameplay.
The Marketplace Contract: Enabling Ticket Sales and Dynamic Pricing
Operating as a vital cog in The Button's ecosystem, the Marketplace contract facilitates ticket sales through a Dutch auction mechanism. Its primary function is to ensure a fair and dynamic pricing model for ticket acquisition. The Marketplace contract orchestrates the sale of tickets to eager players through a Dutch auction approach, where the pricing linearly decreases with each finalized block on the blockchain.
This downward trajectory persists until reaching a minimum threshold, thereafter maintaining tickets available for purchase at the fixed rate. Additionally, the contract monitors the average price of all tickets sold, setting subsequent auction starting prices based on this average. This innovative model ensures that ticket pricing remains responsive to market demand and player participation, enabling equitable engagement for all participants.
The SimpleDex Contract: Empowering Decentralized Token Swaps
Embedded within The Button's ecosystem, the SimpleDex contract introduces a decentralized exchange functionality, enabling players to seamlessly swap between reward tokens.
Leveraging a simplified version of Uniswap V1's pricing mechanism, SimpleDex operates a single multi-token pool hosting reward tokens and the wrapped native Aleph Zero coin (wAZERO) at a 1:1 exchange ratio.
While anonymous blockchain infrastructure allows anyone to write and deploy additional contracts for trustless exchanges, SimpleDex specifically enables one-way swaps from tokens to wAZERO, ensuring liquidity and flexibility within the game environment.
In Conclusion
The Button's allure lies in its seamless integration of blockchain technology with captivating gameplay. We've explored the functions of The Button contract, overseeing the game's mechanics and rewards, the Marketplace contract, aiding ticket sales, and the SimpleDex contract, enabling decentralized token exchanges. With the Aleph Zero team continuously enhancing this experience, we're eagerly anticipating what remarkable features they'll introduce next.
References:
Comments