Looks like the winner gets precisely 0:<p><pre><code> // The winner is responsible for withdrawing the funds
// after the button expires
function Win() public {
require(msg.sender == winner);
require(now > deadline);
reward = 0;
winner.transfer(reward);
}</code></pre>
There is zero chance I'll click the button, but an interesting idea of the goal is to pay to get the plugin on users machines and get people to discuss WTH.<p>That said the page is unclear in a few ways. What's the $1? Is that just to validate I have an account (meaning I get to keep it)? Is that the cost to enable the button, meaning once I transfer it I get unlimited future button clicks? Is that the cost per click of the button? Is that some inherent Etherium contract cost? Is there an inherent cost to clicking the button? If so, who set it, you or the blockchain processors?<p>It then brings up the next big problem. It's nice that you provided the source code foe the button (and I'm assuming hash so I can in theory validate the code against a hash), but how do I know the page I'm loading is even comnected to the code or the button? Or that the plugin isn't hard wired to empty my account?<p>It seems like you need a fully trusted chain for a user to have faith in the contract.
This is a simple Penny Auction - <a href="https://en.wikipedia.org/wiki/Bidding_fee_auction" rel="nofollow">https://en.wikipedia.org/wiki/Bidding_fee_auction</a>. Not a scam per se but a bit of a racket as the operator typically brings home a lot of money as people are putting much more money in to the pot then is actually paid out.
<p><pre><code> function withdrawTips() public {
// The owner can only withdraw the tips
tips = 0;
owner.transfer(tips);
}
</code></pre>
I don't use Etherium, but that looks incorrect. Is the value of the variable only updated at the end of the run?
It occurred to me 'why not set the timer to reset automatically within rand() of 5 minutes if no one's pressed it, collecting whatever loot gets deposited'.<p>Two reasons:
1) auditable code
2) transparent deposits and withdrawals<p>I'm generally skeptical of smart contracts' real-world use but this is a rare case in which an immutable, trustless public ledger is essential.
"ERROR: PLEASE INSTALL METAMASK TO USE THE BUTTON."<p>WTF? Screw you dude.<p>Don't draw the button if I can't click it! Don't say I can do one thing then force me to do another. That is bait-and-switch.<p>This is along the same lines as videogames showing DLC content you haven't paid for in the exact same way as the game's regular content. It's an obnoxious ploy to get you to buy the DLC, and they get to remind you of that fact every time you click it.
The author takes a 20% cut:<p><pre><code> reward += msg.value * 8 / 10;
// Take 20% tip for server costs.
tips += msg.value * 2 / 10;
</code></pre>
That must be a very expensive server indeed. Isn't it a static page with some web3js? You could host it for free on github.<p>Anyone want to do a a version of this with a 0.1% fee instead?
Summary of how this works from reading the smart contract:<p>1. User deposits ether to contract (at least 0.001 ether)<p>2. Creator of this takes 20% for server costs<p>3. The other 80% goes into the prize pool<p>4. When the timer reaches 0, the last person to click the button gets the prize pool (well, actually 0, but...)
I have a fun proposal for a contract: to click the button you need to send 1% more than the last person.<p>It would get very entertaining very quickly.