TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: The last person to use this button gets $200+ USD, via Smart Contracts

27 pointsby masterspy7over 7 years ago

14 comments

grapehutover 7 years ago
Looks like the winner gets precisely 0:<p><pre><code> &#x2F;&#x2F; The winner is responsible for withdrawing the funds &#x2F;&#x2F; after the button expires function Win() public { require(msg.sender == winner); require(now &gt; deadline); reward = 0; winner.transfer(reward); }</code></pre>
评论 #16233787 未加载
评论 #16233847 未加载
评论 #16234207 未加载
评论 #16233806 未加载
BoiledCabbageover 7 years ago
There is zero chance I&#x27;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&#x27;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&#x27;s nice that you provided the source code foe the button (and I&#x27;m assuming hash so I can in theory validate the code against a hash), but how do I know the page I&#x27;m loading is even comnected to the code or the button? Or that the plugin isn&#x27;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.
评论 #16233758 未加载
Feebleover 7 years ago
This is a simple Penny Auction - <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Bidding_fee_auction" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;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.
fixermarkover 7 years ago
Costs $1 to click, one person wins?<p>So it&#x27;s basically a penny (well, dollar technically) auction of cash instead of a good?
评论 #16233745 未加载
Matheus28over 7 years ago
<p><pre><code> function withdrawTips() public { &#x2F;&#x2F; The owner can only withdraw the tips tips = 0; owner.transfer(tips); } </code></pre> I don&#x27;t use Etherium, but that looks incorrect. Is the value of the variable only updated at the end of the run?
评论 #16233871 未加载
cribblesover 7 years ago
It occurred to me &#x27;why not set the timer to reset automatically within rand() of 5 minutes if no one&#x27;s pressed it, collecting whatever loot gets deposited&#x27;.<p>Two reasons: 1) auditable code 2) transparent deposits and withdrawals<p>I&#x27;m generally skeptical of smart contracts&#x27; real-world use but this is a rare case in which an immutable, trustless public ledger is essential.
评论 #16233885 未加载
tomc1985over 7 years ago
&quot;ERROR: PLEASE INSTALL METAMASK TO USE THE BUTTON.&quot;<p>WTF? Screw you dude.<p>Don&#x27;t draw the button if I can&#x27;t click it! Don&#x27;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&#x27;t paid for in the exact same way as the game&#x27;s regular content. It&#x27;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.
评论 #16233714 未加载
Tepixover 7 years ago
The author takes a 20% cut:<p><pre><code> reward += msg.value * 8 &#x2F; 10; &#x2F;&#x2F; Take 20% tip for server costs. tips += msg.value * 2 &#x2F; 10; </code></pre> That must be a very expensive server indeed. Isn&#x27;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?
supermdguyover 7 years ago
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...)
bsparkerover 7 years ago
brillant growth-hacking from the metamask team :)
评论 #16233705 未加载
评论 #16233742 未加载
Matheus28over 7 years ago
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.
sovaover 7 years ago
Interesting experiment, but the likelihood of a 30 minute timer expiring by adding more participants... :D
评论 #16233422 未加载
danny_tacoover 7 years ago
I was going to click it then realized you need to pay $1. Interesting experiment nonetheless.
airbreatherover 7 years ago
It is broken, I was able to reset the button without logging into Metamask.