Gambling with no edge, no fees, and no leaks. Just truly sustainable entertainment.
Welcome to the consensus revolution, where programs always behave as expected and with no human intervention.
The upsweep relies on a commit and reveal scheme to distribute value fairly and randomly across players. All you need to start playing is the MetaMask extension and some ether.
Upsweep is a "pick a number" game with a thrilling twist.
40 players will buy a ticket to choose a number between 0 and 19, but because they will do it privately, no one knows how the distribution of chosen numbers will look like.
A timer (in blocks, not seconds) will start and stop when the first and last tickets of the game are sold.
When all "commits" are received, the game contract will let each of the 40 players reveal their respective number, but they must do so within the time frame set in the commit stage.
The last player to reveal will automatically fire the upsweep and make final results available for everyone. However, If time is over; a volunteer can call the contract and fire the upsweep.
Imagine the upsweep as a ring network with 20 nodes labeled from 0 to 19.
When a player reveals a number, the value of the ticket is allocated at that specific node.
When the upsweep is fired, each node of the network will transfer its accumulated value to the next node (clockwise). However, the chain of transfers is broken if the next node has no value (number was not picked by any player). If the chain is broken, the node preceding the given empty node is rewarded with the ether accumulated up to that point.
As soon as the upsweep is triggered and results are calculated, lucky players are allowed to withdraw their gains. They can do it instantly, or they can do it hours, days, weeks, months, or even years later. Rest assured that funds are going nowhere and only winners can unlock them.
Holders of a ticket can get their ether back and abandon the game if they wish to do so, but only within the commit stage. If the game advances to reveal stage, players are not allowed to step back.
The upsweep does not force players to reveal. However, the contract is designed to incentivize them to do so. If a player fails to reveal, the value of his ticket is forfeited and split among those who revealed.
When players commit to a number, they do not explicitly send it to the blockchain. Instead, they send a hash that is calculated as follows:
hash = keccak256(detected account + number + passphrase)
On reveal, the contract receives the same decrypted information and computes a new hash, if hashes match, the player has successfully revealed.
The upsweep contract is simple and easy to digest. Security and low gas fees are prioritized over fancy and complex features.
If we really want to build a sustainable future, we must give up the "for-profit" label. Therefore, ALL ether collected is distributed among players and without any leaks to the founder or third-parties.
Entities that seize value through the use of mathematical adventages in games that exploit human behavior are not sustainable and only benefit a selected group.
If you find my work meaningful, please consider a donation and help me build a sustainable future.