Live data from Hacker News

Did I just lose half a million dollars?

reddit.com

331–340 of 837 posts

Re: Did I just lose half a million dollars?

#331
post #316

Earlier quoted context omitted.

> You'd expect that invalid actions lead to idempotent errors, not glitch states where you lose everything. Indeed, and that's exactly how most cryptocurrencies work today. You try to send funds to an invalid address, the wallet will present you with an error that you cannot do that. The user in the submission did not perform an invalid action, because they wouldn't be able to perform an invalid action.

So your definition for "valid action" is just that the eth network lets them do it? They clearly didn't want to burn £500k, and that is now irrecoverable, alongside 260 other people who made the same mistake, on a smart contract that forgoes validation for gas fees. How is this not invalid?

> So your definition for "valid action" is just that the eth network lets them do it?

Yes, this is indeed the definition for "valid", that the protocol allows them to do it.

It was a valid action, but not the action the user actually wanted to perform. There are two ways of avoiding these scenarios: A) use UIs and don't interact with the protocol without safeguards, as the UI will prevent you from making mistakes (this user interacted directly with the contract, not via a UI) and B) when doing something involving a lot of money, do it once first with a small percentage, so you can verify it's correct (this user didn't do this either).

For example, I know that IBAN has checksum built into the "address" and that the bank could revert transfers, but if I make transfers above a certain sum, I always send a small amount first, make the recipient confirm how much they received (I send a small random sum) and only then do I perform the larger transfer.

As I mentioned elsewhere in the comments on this submission (https://news.ycombinator.com/item?id=30136941), it's impossible to know if someone actually has access to an address or not, so why would the wallet stop them from sending it?

Re: Did I just lose half a million dollars?

#332

there's about $20b worth of eth in the weth contract. $1.1m of eth has been lost this way (so op's lost weth is about 45% of all weth lost from transfers). https://etherscan.io/address/0xc02aaa39b223fe8d0a0e5c4f27ead...

What’s the other 20b worth of eth for?

people send eth to get weth back, weth is an erc20 wrapper for eth - wrapped eth

Re: Did I just lose half a million dollars?

#333

Earlier quoted context omitted.

It truly is laughable. Ever heard of "Return to Sender" in case of invalid events/transactions?

YES. Weren't these supposed to be SMART contracts? My email provider is smarter than that.

"Smart contracts" was always a really bad name for this functionality.

Re: Did I just lose half a million dollars?

#334

Earlier quoted context omitted.

> Also at least with european banking, if you wringly send money to another account, it is also gone forever. It's not though? The money is still legally yours and can be recovered via the legal system. Only if it is moved out of Europe into less well regulated areas it becomes a problem. This happens in every case though. If I give you cash and you take it to god knows where it can't be recovered either. If I give y…

If you send money to the wrong person and they don't give it back, you can try sue them to give it back, but there is no inherent law that they must do so. Or am I wrongly informed? Because that's the knowledge I have from central european laws.

https://en.m.wikipedia.org/wiki/Unjust_enrichment

Basically there is law that says for every money send should be a cause, reason that justifies sending. If there is no such reason, reciever is entitled to send them back.

Re: Did I just lose half a million dollars?

#335
post #275

Earlier quoted context omitted.

When I do money transfers on bank accounts, I read the 10 digits 4-5 times. If the person that I'm transfering to is in the room, I ask them to read aloud their account number as I follow. The fact that you have to get 10 digits right and that a typo can result in sending the money off somewhere unknown, disturbs me a lot. It's amazing how cryptocurrencies mimicked that part about existing digital money to perfection…

Account numbers have checksums. An „off by one“ typo cannot occur.

Do you know how account numbers work in every bank in every country?

Re: Did I just lose half a million dollars?

#336
post #145

I used crypto in the past, starting a decade ago, but absolutely cannot wrap my head around these new-age concepts such as smart contracts, dozen ETH flavors and whatnot. They seem blackboxes to me no matter how much I read about them. The fact you have to use a withdrawal function instead of the reverse operation used for the initial conversion seems a pretty severe design overlook since they're burned forever this…

If you dont know what you are doing you should never interact with a smart contract directly. People like the guy who lost 500k should be using the frontends which interact with the contracts properly. https://wrapeth.com/

Re: Did I just lose half a million dollars?

#337
post #164
post #147

Earlier quoted context omitted.

It abstracts away underlying hardware, leaving you with a convenient set of abstractions for deploying containerized networked services. Sort of an OS for a cluster of distributed machines. Unfortunately this involves lots of YAML. How’d I do?

One could write a sentence like that about smart contracts. One I pulled from Google: Smart contracts are simply programs stored on a blockchain that run when predetermined conditions are met. They typically are used to automate the execution of an agreement so that all participants can be immediately certain of the outcome, without any intermediary’s involvement or time loss. They can also automate a workflow, trigg…

And here's the "oh so complex" contract in question, all 60 lines.

  contract WETH9 {
    string public name     = "Wrapped Ether";
    string public symbol   = "WETH";
    uint8  public decimals = 18;

    event  Approval(address indexed src, address indexed guy, uint wad);
    event  Transfer(address indexed src, address indexed dst, uint wad);
    event  Deposit(address indexed dst, uint wad);
    event  Withdrawal(address indexed src, uint wad);

    mapping (address => uint)                       public  balanceOf;
    mapping (address => mapping (address => uint))  public  allowance;

    function() public payable {
        deposit();
    }
    function deposit() public payable {
        balanceOf[msg.sender] += msg.value;
        Deposit(msg.sender, msg.value);
    }
    function withdraw(uint wad) public {
        require(balanceOf[msg.sender] >= wad);
        balanceOf[msg.sender] -= wad;
        msg.sender.transfer(wad);
        Withdrawal(msg.sender, wad);
    }

    function totalSupply() public view returns (uint) {
        return this.balance;
    }

    function approve(address guy, uint wad) public returns (bool) {
        allowance[msg.sender][guy] = wad;
        Approval(msg.sender, guy, wad);
        return true;
    }

    function transfer(address dst, uint wad) public returns (bool) {
        return transferFrom(msg.sender, dst, wad);
    }

    function transferFrom(address src, address dst, uint wad)
        public
        returns (bool)
    {
        require(balanceOf[src] >= wad);

        if (src != msg.sender && allowance[src][msg.sender] != uint(-1)) {
            require(allowance[src][msg.sender] >= wad);
            allowance[src][msg.sender] -= wad;
        }

        balanceOf[src] -= wad;
        balanceOf[dst] += wad;

        Transfer(src, dst, wad);

        return true;
    }
}

Re: Did I just lose half a million dollars?

#338
post #235

Earlier quoted context omitted.

It most definitely is a word irregardless of your feelings about it https://www.merriam-webster.com/dictionary/irregardless

Fine. It's not a [standard, generally accepted] word. Feel free to disregard my advice, though; it's no skin off my nose if you don't want to sound like a "native, educated speaker".

Native, educated speaker here: Nobody cares and everybody understood what they meant.

Re: Did I just lose half a million dollars?

#339
post #146

Earlier quoted context omitted.

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 r…

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 .

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?

#340

I love how everyone assumes that the ETH blockchain is immutable and there is nothing that can happen to undo any of this. Did everyone simply forget when the Dao had a contract bug and the ETH devs literally just rolled back the transaction?

It's so immutable that it can be and was forked at least once... It's immutable as long as it's convenient to a clique of people...
Post reply on HN