6 ms·
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, yo
by jazzyjackson 5y ago
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
- XorNot 5y agoI 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.
- ljm 5y agoIt'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.
- skinnymuch 5y agoWhat about the Eth DAO forks? How was that individual responsibility?
- optimalsolver 5y agoAll smart contracts are immutable, but some are more mutable than others.
- ericmay 5y agoOk… 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.
- ljm 5y agoDo ethereum and smart contracts currently have excellent customer service, such that the guy in TFA can get his 500k back?
- spookthesunset 5y agoWhy 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.
- optimalsolver 5y agoCode wasn't law when Ethereum foundation insiders stood to lose a fortune in the DAO hack.
- capableweb 5y agoThe 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.
- BuyMyBitcoins 5y agoYou forgot to add “If you don’t like it, you’re free to create your own blockchain”.
- noduerme 5y agoBack 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.
- riffraff 5y agoAFAIU, 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.
- noduerme 5y agoOn 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.
- axiosgunnar 5y ago> 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-accidentally-sent-to-a-Bitcoin-address-through-Coinbase-The-transaction-shows-completed-but-it-never-got-there https://www.quora.com/How-can-I-find-my-Bitcoin-cash-that-I-...
- kwertyoowiyop 5y ago“Premature optimization is the root of all evil.” And now in a whole new way!
- dTal 5y agoThere 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.
- noduerme 5y agoI 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.
- GaylordTuring 5y agoAnd 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.
- ddingus 5y agoGood grief, this is like machine language for money
- mox1 5y agoexactly, with no-do overs. Everyone hand codes their assembly correctly on the first try right!?!!
- capableweb 5y agoThere 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!
- UncleMeat 5y agoAs 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.
- mox1 5y agoYes, and that code had bugs. https://www.forbes.com/sites/lanceeliot/2019/07/16/apollo-11s-infamous-landing-error-code-1202-offers-earthly-lessons-for-self-driving-cars/?sh=4934e30734bc 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.
- ddingus 5y agoIn this case, not really. User was calling a "ROM" What you describe are dry runs.