News for hackers. Stuff that matters.
Re:Did I just lose half a million dollars? by jazzyjackson on Sunday January 30, 2022 @05:35AM (#30135665)
from the reddit comments, similar question, apparently every instruction adds gas fees to running the contract, so if you're going to use the contract a lot, you leave out any kind of validation.

>> Wow why didn't the contract creators think this through and block requests to the contract

> Because adding that check would increase the cost of every user transaction. All AMM swaps would be done with WETH so it’s the right call to not have it in there

Re:Did I just lose half a million dollars? by dTal on Sunday January 30, 2022 @06:20AM (#30135992)
There are, of course, other industries with financial incentives against safety features. We usually regulate them.

We can point and laugh at this one person, but according to the reddit thread they're the 265th person to make this mistake, and more than half of the money in the inaccessible account is not theirs.

Re:Did I just lose half a million dollars? by GaylordTuring on Sunday January 30, 2022 @11:28AM (#30138518)
And that's just for this particular token. You can go to just about any token contract and see how numerous people have sent their tokens to the contract address itself.
Re:Did I just lose half a million dollars? by noduerme on Monday January 31, 2022 @01:41AM (#30145246)
I hadn't even thought about this. With BTC early on, the only party to really benefit from lost coins would be "Satoshi", but his coins weren't worth anything until the currency took off anyway, so it was more important and long-term profitable to build a system that didn't lead to user anger than one that would lose coins to deflate what was already a deflationary currency. It really does show how slimy the whole cryptocurrency world has become.
Re:Did I just lose half a million dollars? by XorNot on Sunday January 30, 2022 @05:54AM (#30135777)
I really can't think of an expression other then "lol" to sum up my response here for just how incredibly stupid this is, as a "platform of the future".

A design which actively discourages robust programming and error handling in financial software. Wow.

Re:Did I just lose half a million dollars? by ljm on Sunday January 30, 2022 @08:55AM (#30137208)
It's like a libertarian utopia. Literally everything is an individual responsibility with no wider recourse.

Want validation? Other people don't want to pay for stuff they're not validating... so it's on you to be careful.

Accidentally fuck up? Not our problem, that's on you for not calling the right API.

Want your money back? We're not paying money to cover for other people's mistakes. You're on your own bud.

Re:Did I just lose half a million dollars? by BuyMyBitcoins on Sunday January 30, 2022 @09:50AM (#30137648)
You forgot to add “If you don’t like it, you’re free to create your own blockchain”.
Re:Did I just lose half a million dollars? by skinnymuch on Sunday January 30, 2022 @11:49AM (#30138687)
What about the Eth DAO forks? How was that individual responsibility?
Re:Did I just lose half a million dollars? by optimalsolver on Sunday January 30, 2022 @05:33PM (#30141920)
All smart contracts are immutable, but some are more mutable than others.
Re:Did I just lose half a million dollars? by ericmay on Sunday January 30, 2022 @09:16AM (#30137368)
Ok… but then if you’re going to throw out these cases you should also address how markets can fix these issues, such as great customer service: “when I fucked up they helped me out, they’ll get more of my business”, or maybe insurance, or just better products that don’t have these issues.

Idk why people conflate libertarianism with this hyper-individualist stuff. It really isn’t the case.

Re:Did I just lose half a million dollars? by ljm on Sunday January 30, 2022 @09:26AM (#30137451)
Do ethereum and smart contracts currently have excellent customer service, such that the guy in TFA can get his 500k back?
Re:Did I just lose half a million dollars? by spookthesunset on Sunday January 30, 2022 @03:25PM (#30140759)
Why should this person get anything back? Code is law. And if code is law all bugs are also law.

The half million was a fair and just transfer. Whoever is the recipient is fully deserving both morally and ethically of their new-found wealth.

If I was on the receiving end of this transaction, I’d thank the sender for the money and move on with my life. Of course I’d never be in the position to receive the funds because I’m not stupid enough to play this game—odds are very good I would be the one who sent half a million dollars by mistake!

I mean, I think I’m joking but not really. If you want to practice “code is law” and really mean it, this is the kinds of stuff that will happen.

Re:Did I just lose half a million dollars? by optimalsolver on Sunday January 30, 2022 @05:34PM (#30141933)
Code wasn't law when Ethereum foundation insiders stood to lose a fortune in the DAO hack.
Re:Did I just lose half a million dollars? by capableweb on Sunday January 30, 2022 @11:13AM (#30138402)
The one who has the private keys to that account could give them the ETH back, yeah. But if no one has the private keys, they can not get it back, that would defeat the entire point of cryptocurrencies in the first place.
Re:Did I just lose half a million dollars? by tetsujinnn on Sunday January 30, 2022 @01:36PM (#30139761)
There are two types of accounts in Ethereum, externally owned accounts (EOA) and contracts. EOA are controlled by private keys where contracts are not. Since the user sent ETH to a contract, he cannot get his ETH back if the contract does not have a method to transfer ETH back. Whereas if he sent ETH to an EOA then the user of that account can send him back ETH.
Re:Did I just lose half a million dollars? by beefield on Sunday January 30, 2022 @11:32AM (#30138541)
But of course they can - if they are the right persons, that is. (See DAO hack. Of course, that did defeat the whole purpose of smart contracts but nobody was willing to notice.)
Re:Did I just lose half a million dollars? by Sebb767 on Sunday January 30, 2022 @01:15PM (#30139552)
> See DAO hack. Of course, that did defeat the whole purpose of smart contracts but nobody was willing to notice

Of course a lot of people noticed. The problem is that cryptocurrencies are currently primarily functioning as investment object rather than an actual secure financial ledger, which is why the interest of investors will trump purity.

Re:Did I just lose half a million dollars? by jlokier on Sunday January 30, 2022 @09:48AM (#30137629)
Low-cost insurance is an interesting idea that might actually work to smooth over some of the hard edges of "code is law".

It ought to be possible to craft an insurance policy that would pay out the $500k (or equivalent WETH/ETH) in cases like the one in this article, where the transparency of the ledger clearly shows that the tokens are unrecoverable.

As insurance companies are notorious for declining to pay out, the clear evidence trail would be helpful to allow the insuree to take the claim to a regular court for a human decision on its validity.

Re:Did I just lose half a million dollars? by jethro_tell on Sunday January 30, 2022 @11:46AM (#30138653)
Lol, so like the FDIC but you have to sue to get your money.
Re:Did I just lose half a million dollars? by jlokier on Monday January 31, 2022 @12:26AM (#30144850)
Not really. Having the option of a lawsuit is just a backup; the possibility is what makes sure the insurer chooses to pay without one.

An insurer that knows when it doesn't have a case and will be forced to pay (plus costs) when there's clear evidence of coverage and loss will almost always pay without a fight.

However if there are high-value decisions which are not so clear cut, then having the option to go to court or some other mediation system to settle is quite useful. One of the critisms of "code is law" is the lack of mechanism for nuanced, human intervention when something unexpected happens due to a bug, design flaw or unexpected consequence that turns out to be unreasonable.

Re:Did I just lose half a million dollars? by mlac on Sunday January 30, 2022 @11:24AM (#30138487)
Code can screw up at scale. And at this point if you’re capable enough to understand the edge cases and offer insurance against them, the insurance went really cover that much.
Re:Did I just lose half a million dollars? by dmitriid on Sunday January 30, 2022 @10:24AM (#30137926)
> but then if you’re going to throw out these cases you should also address how markets can fix these issues, such as great customer service

Ahahahahahha. Ahahahahahahahahahha. Ahahahahahhahahahahahahahah.

--- several minutes of laughter later ---

Markets don't care and they will not fix these issues, because suckers losing money is a much better market proposition than losing money on customer support.

Fo go ahead and learn some history, will you? Almost every single regulation we have in place is precisely because markets never ever fix things.

Re:Did I just lose half a million dollars? by tirpen on Sunday January 30, 2022 @12:40PM (#30139212)
And yet, disputing charges via your bank and issuing chargebacks via VISA/Mastercard are things that definitely exist and work perfectly fine. And as long as there is no equivalent function in crypto, it won't be suitable as a currency for general use.

And no amount of mocking faux laughter will change that.

Re:Did I just lose half a million dollars? by EVa5I7bHFq9mnYK on Sunday January 30, 2022 @08:16PM (#30143278)
Crypto works like cash. If you lose cash, there is no one to dispute charges and issue chargeback.

BTW I never had success trying to chargeback VISA for services that were not delivered. Scammers do it without problem though.

Re:Did I just lose half a million dollars? by tirpen on Monday January 31, 2022 @04:00AM (#30145989)
Cash transactions are done locally when you can typically inspect the object of the transaction before paying. That's why there is not the same need for these kinds of protection.

Crypto combines the worst properties of cash and wire payment into a package that has no customer protection and is almost tailor made for scammers.

Re:Did I just lose half a million dollars? by EVa5I7bHFq9mnYK on Monday January 31, 2022 @04:25PM (#30154638)
There are customer protections in the form of 1) escrow 2) seller reputation 3) seller depositing some risk capital at a selling platform. That said, customer protections have never really worked for me in fiat world.
Re:Did I just lose half a million dollars? by dralley on Sunday January 30, 2022 @11:32AM (#30138539)
That is not entirely true. Stock exchanges will reverse some clearly erroneous trades, even when they are not required to by law, because people trade more when they feel protected against mistakes.
Re:Did I just lose half a million dollars? by ddingus on Sunday January 30, 2022 @06:43AM (#30136173)
Good grief, this is like machine language for money
Re:Did I just lose half a million dollars? by mox1 on Sunday January 30, 2022 @09:21AM (#30137414)
exactly, with no-do overs. Everyone hand codes their assembly correctly on the first try right!?!!
Re:Did I just lose half a million dollars? by capableweb on Sunday January 30, 2022 @11:11AM (#30138389)
There are plenty of do-overs, it's called the "development phase" and involves testing things on your local computer with the team.

No one gets everything right the first time, but with a lot of testing, you can actually write software that does exactly what you think it will do, and you can achieve pretty cool stuff. Remember that humans wrote the software that took humanity to the moon!

Re:Did I just lose half a million dollars? by UncleMeat on Sunday January 30, 2022 @12:37PM (#30139169)
As we know, no software has had bugs caught once launched to prod. The existence of some software that worked under this model is not evidence that it is a good model. "Just test prior to release" is not a complete solution.
Re:Did I just lose half a million dollars? by ddingus on Sunday January 30, 2022 @11:13AM (#30138405)
In this case, not really. User was calling a "ROM"

What you describe are dry runs.

Re:Did I just lose half a million dollars? by capableweb on Sunday January 30, 2022 @11:20AM (#30138457)
Are you talking about the user from https://www.reddit.com/r/ethereum/comments/sfz4kw/did_i_just... ? And do you mean "read-only memory"? I'm not sure how that's relevant. The contract they made the transfer to is read-only yes, like any contract on Ethereum. But they could have tested the contract call with a smaller sum before actually performing the bigger one.

Just like the people writing the computer that took us to the moon, I'm pretty sure they tried it before in small-scale simulations before hooking it up to the rocket and letting it go to the moon.

Re:Did I just lose half a million dollars? by zepto on Sunday January 30, 2022 @12:00PM (#30138796)
The idea that people need to treat financial transactions in crypto as if they were writing software for a moon mission shows how impractical the entire space is.
Re:Did I just lose half a million dollars? by capableweb on Sunday January 30, 2022 @12:09PM (#30138879)
If that was the case, I'd agree with you. But as outlined in the comments of this submission time and time again, it was not what happened here.

The user was not doing a normal transfer (at least, they didn't want to, but they ended up doing). They didn't know what they were doing at all, a simply Google search would have showed them the way. Using UIs instead of interacting with the contract directly would have prevented them from making the mistake they did. Doing a small test transfer before doing the big one would have revealed what was wrong as well.

It's not that I'm comparing writing software for moon missions with making cryptocurrency transactions. I was directly replying to mox1 implying that writing 100% correct code is impossible and shouldn't be attempted.

Re:Did I just lose half a million dollars? by ddingus on Sunday January 30, 2022 @12:24PM (#30139028)
"simply Google search would have showed them the way"

That is how high toxicity systems get made.

Re:Did I just lose half a million dollars? by ddingus on Sunday January 30, 2022 @11:35AM (#30138569)
There is a difference!

The incentive was robust code that would work well, get it done, go to the moon.

Here, machine time is expensive, puts emphasis on code that works, but just barely...

Let's just say NASA would check for the "yup, you are gonna burn some money" case, and reject it.

Re:Did I just lose half a million dollars? by FDSGSG on Sunday January 30, 2022 @11:43AM (#30138630)
Well, there's about $3B worth of WETH issued and only about $1.1M worth of those have been lost due to mistakes like the OPs.

I think that people are so unlikely to fuck this up that such a check would be rather pointless.

Re:Did I just lose half a million dollars? by ddingus on Sunday January 30, 2022 @12:21PM (#30138992)
Again NASA would disagree.

Money matters a lot. Should this mess endure, people will forever be saying a little bit of gas would have been worth it.

And we've people with six figure arguments as to why such a check makes sense.

The idea of minimal code, focused on speed coupled with financials leads me FAR away from all this.

I will watch with great interest and entertainment.

Re:Did I just lose half a million dollars? by shadowgovt on Sunday January 30, 2022 @12:37PM (#30139173)
Should this mess endure, people will just keep using dollars and other fiat currencies.
Re:Did I just lose half a million dollars? by FDSGSG on Sunday January 30, 2022 @12:35PM (#30139141)
>Again NASA would disagree.

Yeah, because NASA has been utterly fucked by the congress. Because of politics it's better for NASA to spend 5x the money on 1 reliable spacecraft than to build 5 slightly less reliable spacecraft out of which only 1 fails.

Even if the economics of it don't make sense, NASA can't afford to be seen failing because because politicians will not want to fund them.

I guess my point is that NASA is an exceptionally badly managed entity, not something you'd want to aspire to. (Of course the people working at NASA are not the ones to blame for this.)

>Money matters a lot. Should this mess endure, people will forever be saying a little bit of gas would have been worth it.

That gas would probably add up to more money than has been lost here.

>And we've people with six figure arguments as to why such a check makes sense.

The gas fees of such a check would probably be higher than the losses averted, especially in the long run. And any "losses" are essentially distributed among all ETH holders anyway.

Re:Did I just lose half a million dollars? by ddingus on Sunday January 30, 2022 @12:40PM (#30139211)
"The gas fees of such a check would probably be higher than the losses averted, especially in the long run. And any "losses" are essentially distributed among all ETH holders anyway. "

This is also how high toxicity systems get made.

Re:Did I just lose half a million dollars? by FDSGSG on Sunday January 30, 2022 @12:45PM (#30139256)
The real solution is better client software. Doing these checks on the client-side is free, that's where they should live.

It would be stupid to put these checks in the contract, they would be very expensive and only help people using unsuitable client software.

Re:Did I just lose half a million dollars? by ddingus on Sunday January 30, 2022 @12:52PM (#30139327)
"It would be stupid to put these checks in the contract, they would be very expensive and only help people using unsuitable client software. "

You feel all client software will be suitable?

I don't. There is NO WAY. Lots of people will do ANYTHING for a bit of margin, hoping for volume.

Re:Did I just lose half a million dollars? by FDSGSG on Monday January 31, 2022 @04:56AM (#30146337)
>You feel all client software will be suitable?

Of course not. There will be more advanced software for expert users that allows them to manually create potentially riskier transactions. That's perfectly fine.

Client software targeting end-users should have such checks.

Re:Did I just lose half a million dollars? by ddingus on Monday January 31, 2022 @08:59PM (#30157688)
But it just won't. You read it here first.
Re:Did I just lose half a million dollars? by FDSGSG on Wednesday February 02, 2022 @05:13AM (#30175755)
This really doesn't line up with the reality of how most people are congregating around user friendly wallet software and steering away from the more advanced options.

You only one need one wallet software to be the official WETH-approved client, sucks for anyone else risking their money with unsupported software.

Re:Did I just lose half a million dollars? by ddingus on Thursday February 03, 2022 @01:23PM (#30196401)
I am quite happy to be proven wrong.

We shall see. And for me, safely and at a distance.

Frankly, the small cost of robustness in contracts should have been factored in from the beginning. It just does not need to be so damn lean and rickety.

The incentives are wrong here.

My prediction is the current state of affairs all gets ripped up and replaced after a time. And until that happens, we are likely to see activity largely limited to people who have a healthy appetite for risk.

Perhaps it all is as it should be too. Had the reverse been done, emphasis on slightly more expensive contracts that are robust and able to deny the costly errors, I would imagine others clamoring for people to adopt the rock bottom lean stacks...

What it won't all be is dull, will it?

Re:Did I just lose half a million dollars? by FDSGSG on Monday February 07, 2022 @05:42AM (#30242944)
There's a ton of money in providing good wallet software. Many people are making a killing by offering good UX, as offering good wallet software puts them in a prime position to offer profit-generating value added services like currency swaps.

>Frankly, the small cost of robustness in contracts should have been factored in from the beginning. It just does not need to be so damn lean and rickety.

It really doesn't seem necessary, more complicated contracts require custom frontends to interact with anyway.

Re:Did I just lose half a million dollars? by ddingus on Sunday January 30, 2022 @03:04PM (#30140579)
Sidebar:

How come such a check is so damn expensive?

It should not be.

Re:Did I just lose half a million dollars? by FDSGSG on Monday January 31, 2022 @04:58AM (#30146358)
I agree with you big time. This is hopefully something we'll see addressed by smart contract platforms in the coming years or decades.

Clearly Ethereum is far from a ready product, but I think we can expect to see massive improvements when proof of stake goes live this year.

Re:Did I just lose half a million dollars? by ddingus on Monday January 31, 2022 @09:01PM (#30157705)
Yes! It is all very interesting, but way too rough, IMHO.
Re:Did I just lose half a million dollars? by ddingus on Sunday January 30, 2022 @11:24AM (#30138484)
TL;DR: They could have got it right. Didn't.
Re:Did I just lose half a million dollars? by mox1 on Tuesday February 01, 2022 @09:38AM (#30162985)
Yes, and that code had bugs.

https://www.forbes.com/sites/lanceeliot/2019/07/16/apollo-11...

There are 0 do-overs on smart contracts in production. No stopping the network for a minute to triage, no rolling back a minute, no circuit breakers. No "Error 1202, do you want to continue?" pop-up messages.

Re:Did I just lose half a million dollars? by kwertyoowiyop on Sunday January 30, 2022 @06:12AM (#30135923)
“Premature optimization is the root of all evil.” And now in a whole new way!
Re:Did I just lose half a million dollars? by noduerme on Sunday January 30, 2022 @06:07AM (#30135878)
Back in the day or at least when I ran my own bitcoin node, any call against the blockchain was free. This sounds like someone charging for hitting the API on a rented node, as opposed to an actual cost imposed by the currency to consult the blockchain (?) But maybe the contract-generators aren't even running their own node, just piggybacking on someone else's API. Sure. Cheaper.
Re:Did I just lose half a million dollars? by riffraff on Sunday January 30, 2022 @06:23AM (#30136017)
AFAIU, smart contracts on the ethereum VM can be arbitrarily complex, so you pay the network to execute them, or a random user with an infinite loop would bring down the network.

You are indeed renting a machine to run some code, and if you want many people to use your code you want to make it cheap. There's a trade off.

You can fuck up things on the BTC blockchain too, "burning" crypto by sending it to a dead address has been a thing for a long time.

It always seemed stupid to me that it was possible, compared to sending money to an invalid IBAN, but I'm not a crypto enthusiast so I may be biased.

Re:Did I just lose half a million dollars? by noduerme on Sunday January 30, 2022 @07:23AM (#30136533)
On BTC, you could send things to the wrong address, yes. But you can't send the wrong type of currency or send it to a nonexistent address. In this case it seems like the contract has created the black hole (not the Ethereum blockchain itself), but that's even more absurd since someone ultimately should have control over everything that was put into the contract, regardless of the source.
Re:Did I just lose half a million dollars? by axiosgunnar on Sunday January 30, 2022 @08:38AM (#30137059)
> But you can't send the wrong type of currency or send it to a nonexistent address

Of course you can do both things, which is why catastrophic financial ruin is a daily fear when dealing with cryptocurrencies.

https://www.quora.com/How-can-I-find-my-Bitcoin-cash-that-I-...

Re:Did I just lose half a million dollars? by tim333 on Sunday January 30, 2022 @11:29AM (#30138528)
That's impressive, the number of scammers on that thread.
Re:Did I just lose half a million dollars? by EdwardDiego on Sunday January 30, 2022 @11:09AM (#30138363)
Oh wow, the "answers" on that question are cancer.
Re:Did I just lose half a million dollars? by liminvorous on Sunday January 30, 2022 @08:39AM (#30137071)
Sending currency to non-existant addresses is how people encode arbitary data on the bitcoin blockchain, so definitely possible.

Giving a person control over the funds allocated to their smart contract probably opens holes where they can steal the smart contract's money, though obviously creating software that handles money and can't be updated is its own kettle of fish.

Re:Did I just lose half a million dollars? by emteycz on Sunday January 30, 2022 @11:08AM (#30138349)
The thing is, the address exists - only (probably) nobody has its private key.
Re:Did I just lose half a million dollars? by EVa5I7bHFq9mnYK on Sunday January 30, 2022 @08:24PM (#30143341)
Why would one need to send to non-existent address? Any transaction can include data, one can donate for example.