6 ms·
Programmable smart contracts are a great idea in a world where programmers write bug free code. That world does not exist yet. Until we have near-perfect code w
by omarforgotpwd 9y ago
Programmable smart contracts are a great idea in a world where programmers write bug free code. That world does not exist yet. Until we have near-perfect code writing AIs every new smart contract is just a disaster waiting to happen.
- repomies691 9y agoThey might still be a good idea, you just have to live with that risk. World is full of risks anyway and you might die tomorrow in a traffic accident. Sometimes risks are worth taking, such as leaving your apartment and risk walking under a car.
- apapli 9y agoNot that I have mathematical proof, but I'd be happy to bet that the chance of buggy code being written is higher than the risks you outlined above :)
- repomies691 9y agoEveryone chooses risks that they take, and consider whether there exists enough benefits for the risks. It makes sense to take calculated risks. I'm opposing the viewpoint "there exist risks, therefore it shouldn't not be considered at all".
- PeterisP 9y agoCome on, people are not saying that "risks exist", they are saying that the risks are very very likely. It's a near certainty that I won't get hit by a car tomorrow - people do get hit by a cars but most people don't get hit by cars most of the time. There is a risk (a fraction of percent), but it's acceptable. It's an even larger certainty that code will have bugs. As far as I've seen, all code will have bugs, as experience shows, even security oriented code carefully made and reviewed by experts tends to have bugs, but it is possible (though not as likely) that a small piece of carefully audited code will be bug-free. That's a bit different than the risk of getting hit by a car; it might be more fair to say that you have a "risk" of being bug-free comparable to the "risk" of winning a lottery.
- repomies691 9y agoCome on. Quote from original comment: "Until we have near-perfect code writing AIs every new smart contract is just a disaster waiting to happen." If smart contracts are at all useful, they most definitely will be useful before we have near-perfect code writing AI's.
- PeterisP 9y agoIt is possible that with sufficient investment in tools for writing safer code, unoverridable smart contracts will become useful enough to outweigh the risks. It's also possible (and I feel that this will be the case) that in the end the risks will be too large anyway for large adoption, so we'll collectively decide that for most use cases smart contracts are useful only with a "social" mechanism for overriding them, contrary to the current "code is law" policy of Ethereum.
- elmigranto 9y agoGive all your money to me, and I'll return it million fold in a year. I know it's risky, but you can die tomorrow in an accident anyways, so why not. Before you write a comment with "why not", apply that to eth first.
- halflings 9y agoThat's like saying legal contracts are a disaster because we do not live in an ideal world where lawyers don't do mistakes, and there are no legal loopholes. Granted, bugs are much more common than legal loopholes, but in the same way an operating system's APIs and constraints are tested until it becomes reliable enough for other people to rely on it, I can see some standard types of contracts (in the same way as in the traditional legal system) becoming recognized for their robustness and used for common operations.
- justusw 9y agoOne could argue that legal contracts are less binding than smart contracts. There is a distinction made between the 'letter and spirit of the law'. Furthermore, a contract, or at least a clause, will become invalid if it goes against existing law in a country (at least this applies to the EU). E.g, I cannot sign a contract in which I sell my kidney to you, as commercial organ trading is outlawed in many countries. Is a smart contract able to make this distinction? I suppose as soon as it develops a moral consciousness it does.
- lindig 9y agoMost "real life" contracts have bugs too. The difference is: the visibility of these contracts is very limited such that these bugs cannot be exploited by random hackers. And any exploit can be challenged in court. Ethereum takes away both - opening you up to be challenge by everybody with no recourse.
- PeterisP 9y agoLegal contracts have a solution for bugs and loopholes, namely, the court system. I can write a three-line contract with the core terms on a napkin, sign it, and it will be okay, since everything not explicitly mentioned will be given reasonable defaults, and attempts to exploit stupid loopholes will be laughed out of the court. If someone defrauds me and gets me to sign a contract based on false information, they don't get to point to a loophole and figuratively take my firstborn, we have a process to void fraudulent contracts. However, if you want contracts that cannot be overridden and are enforced by machines as written (not as intended, as in the legal system), then the bar becomes much higher, then you must get all the details explicitly right the first time and ensure that people don't sign fraudulent contracts, and I'm not sure if this is possible at all.
- mitchmindtree 9y agoWe put our lives in the hands of code written by humans every day, e.g. cars, planes, trains, etc. Perhaps the permanence of executing solidity contracts will at least motivate some safer, more secure practises, in the same way that the permanence of death does when programming vehicles that carry human lives. It would be cool to see APIs for compiling Solidity contracts from safer languages with more concise type systems like Idris[1]. That said, I haven't had a proper dig into Solidity myself yet so it could very well offer some of these features. I'd love to hear some experiences from devs who have written a significant amount of code in it. [1]: https://www.idris-lang.org/ https://www.idris-lang.org/
- elmigranto 9y ago> We put our lives in the hands of code written by humans every day, e.g. cars, planes, trains, etc. Except that code is regulated and tested to the degree average eth enthusiast making this point either not aware of, or intentionally omits.
- ym705 9y agoThat's why you need to get a good education and accessible education on the subject...
- justusw 9y agoNot only is it regulated and tested, the question of liability is easy to answer: Product Liability is regulated by countless national and international laws. But in the case of Ethereum Smart Contracts, who is liable in the real world?
- bshanks 9y agoYou might appreciate https://news.ycombinator.com/item?id=14835977#14839943 https://news.ycombinator.com/item?id=14835977#14839943
- paganel 9y ago> That world does not exist yet With a big emphasis on "yet". Serious question: are the "halting problem" and the "yet" in your sentence dependent on each other? I.e., don't we need to first solve the halting problem before we can manage to write 100% bug-free programs?
- elmigranto 9y agoThere is no need to solve halting problem in general case. We can have heuristics that do not accept programs they are not sure about and it is programmer's job to make correctness more obvious.
- Jabanga 9y agoMy understanding is that the halting problem does not prevent formal proofs of Ethereum contract correctness because Ethereum contracts have gas limits that make them terminating.
- dallashoxton 9y agoAnd the entire concept of 'gas' to me seems to be a hacky work-around in order to implement a Turing-Complete language on the blockchain. I'm not even sure it is needed -- the whole 'Turing-Complete' aspect of the EVM seems to be an engineering solution in search of a problem. And 'gas' is certainly not intuitive as a metaphor for end-users of Ethereum who would use it as a currency (how does a financial transaction "run out of gas", exactly?)
- Jabanga 9y agoGas is analogous to cycles of the EVM that the contracts uses when it executes. Someone suggested 'gas' should have been called 'cycles' to more clearly convey its meaning and avoid a lot of confusion. Anyway, gas/cycles must be limited given there are no access controls on use of the EVM. It's an effective DoS control. It's also orthogonal to Turing Completeness.
- lou1306 9y agoI don't see how you can "solve" the halting problem. But there are lots of ways to tiptoe around it and have some kind of formal verification of software.
- Asdfbla 9y agoIt's possible to write provably correct code, though. At least then you reduce the problem to the issue of correctly specifying what the code is supposed to do. Certain classes of contracts might be small enough to do that. Granted, the requirement for NASA-level code correctness would make smart contracts expensive to develop and put them out of reach of average developers.
- mkagenius 9y ago> issue of correctly specifying what the code is supposed to do. also the intent of the programmer, right?