18 ms·
This has always been the problem with smart contracts. They are infact dumb contacts. To program one you need to think about all the edge cases. The programmer
by georgyo 5y ago
This has always been the problem with smart contracts. They are infact dumb contacts.
To program one you need to think about all the edge cases. The programmers here likely did want >0 here. The possibility that the thing feeding price data return zero incorrectly was higher than the price legitimately being zero in their minds.
There is no court or lawyer who can interpret the spirit of the contract.
- motioncuty 5y agoDo you see no value in throwing these "dumb contracts" out there and seeing what happens? An expensive experiment for the speculators, but we got to the moon on a roman candle iterated a billion times, so I'm personally just curious about these programmable organizations of digitalized willpower.
- meowface 5y agoI agree. It's software. Lots of software sucks and is buggy and vulnerable. Sometimes mission-critical software sucks and is buggy and vulnerable and causes catastrophes when it fails. A lot of it's malware. A lot of it's inefficient and/or useless. But a lot of it's good, and more good things will come out over time. It's currently the equivalent of like 1998 in the smart contract space right now.
- thebean11 5y ago> There is no court or lawyer who can interpret the spirit of the contract. That's obviously the point, though. You are trading one set of risks for a completely different set of risks that might suit your use case much better; your counterparty being able to contest a contract in court could very well be a "bad" thing for you.
- toomuchtodo 5y ago> your counterparty being able to contest a contract in court could very well be a "bad" thing for you. Evading the law (whether the court or a regulatory body such as the SEC [civil] or DOJ [criminal]) is typically a "bad thing" for the person or people intending to or successfully doing so. https://www.sec.gov/spotlight/cybersecurity-enforcement-actions https://www.sec.gov/spotlight/cybersecurity-enforcement-acti... (SEC Cyber Enforcement Actions, control-f "blockchain" | "crypto") https://www.ropesgray.com/en/newsroom/alerts/2021/March/The-CFTC-Signals-New-Era-in-Enforcement-of-Cryptocurrency-Trading-with-Action-Against-Antivirus https://www.ropesgray.com/en/newsroom/alerts/2021/March/The-... (The CFTC Signals New Era in Enforcement of Cryptocurrency Trading with Action Against Antivirus Software Pioneer John McAfee) https://www.jdsupra.com/legalnews/doj-activity-on-cryptocurrency-a-six-1846233/ https://www.jdsupra.com/legalnews/doj-activity-on-cryptocurr... (DOJ Activity on Cryptocurrency: A Six-Month Review) https://www.reuters.com/world/us/us-court-authorizes-irs-seek-identities-taxpayers-who-have-used-cryptocurrency-2021-05-05/ https://www.reuters.com/world/us/us-court-authorizes-irs-see... (U.S. court authorizes IRS to seek identities of taxpayers who have used cryptocurrency)
- thebean11 5y agoAre you saying the only time a contract is disputed is when the other party is evading the law? Nobody abuses the legal system to screw over people without enough resources to fight in court?
- toomuchtodo 5y agoI'm saying the legal system takes authority. A smart contract doesn't avoid or override that authority. https://digitalchamber.org/wp-content/uploads/2018/02/Smart-Contracts-Legal-Primer-02.01.2018.pdf https://digitalchamber.org/wp-content/uploads/2018/02/Smart-... > Is A Smart Contract Always A Legal Contract? > No. Because a smart contract is computer code, a smart contract may represent all, part, or none of a valid legal contract under U.S. law. Smart contracts function – in whole or in part – to give effect to legal contracts. Thus, smart contracts are the programmatic means by which some or all of the terms of the legal contract are performed. It is the underlying contractual terms that are given legal effect. That legal contract and the contractual terms is what is evaluated and governed by the legal system. Smart contracts are fancy business logic snake oil salespeople are attempting to sell as the law of the land.
- thebean11 5y agoNot quite sure what you're saying, that you expect the DOJ to somehow overturn the judgements of smart contracts, with possibly anonymous participants or participants outside of the DOJ's jurisdiction?
- ceejayoz 5y agoI think the point is more that if you owe $200M to someone, a court is unlikely to accept "it's irreversibly stuck in a smart contract" as an out.
- thebean11 5y agoSure, I don't disagree with that. For example, defrauding someone with a smart contract obviously doesn't offer the scammer legal protections.
- xyzzy123 5y agoSome chains/coins are backed and developed by fairly well defined "legal entities" (presumably for reasons related to securities law). I am waiting with popcorn in hand for the day someone loses money via smart contract and then takes the entity behind the chain to court to overturn it. (We've seen disastrous bugs overturned by community-consensus hard fork but not to my knowledge by court order). Not yet, but it seems inevitable.
- toomuchtodo 5y ago> Some chains/coins are backed and developed by fairly well defined "legal entities" (presumably for reaso). I am waiting with popcorn in hand for the day someone loses money via smart contract and then takes the entity behind the chain to court to overturn it. I would very much like to see regulators purposely engage in these activities, and then directly pursue those within their reach. There's no reason to wait for more citizen victims when the model is proven and the government has the resources to set the stage to demonstrate the failure scenario. This is simply a more elaborate sting versus putting a car on the street to be boosted.
- RcouF1uZ4gsC 5y ago> You are trading one set of risks for a completely different set of risks that might suit your use case much better; your counterparty being able to contest a contract in court could very well be a "bad" thing for you. There is no trade of risks. The judicial system is still going to assert their authority over contracts. Your counterparty will still be able to contest a contract in court. The guys with guns the court sends out to enforce their verdict are not going to be impressed with "code is the contract" and "blockchain". They will lead you to a (jail cell) block in chains (handcuffs) if you try to defy the court order. Instead you are trading specification of contracts in a legal language where there has been centuries of experience in writing and interpreting those contracts, for specifying the contract in a new language that is still evolving and where there is not a whole lot of legal precedent on how to interpret them and how to resolve bugs. These "smart contracts" are not decreasing your risk, but rather increasing it.
- cortesoft 5y agoBad news for you, then… your counterparty can’t still bring you to court.
- lmilcin 5y ago> That's obviously the point, though. You are trading one set of risks for a completely different set of risks. But that's exactly the point. People are not able to interpret "smart" contracts. For normal contracts most people can understand the contract and if there is a dispute you have laws and courts who can interpret in every case. In case of "smart" contracts even the contract developers more often than not seem to not be able to understand all consequences. So if we are trading one set of risks for another it kinda seems to me to be a a really shitty tradeoff.
- bob33212 5y agoThis is how ALL of Crypto works. A decentralized ledger means that you cannot call the CEO or CFO of the ledger and have a clearly fraudulent transfer revoked. That is the tradeoff.
- xyzzy123 5y agoWhat I think a lot of people don't appreciate yet is that computationally decentralised systems can still have legal single points of failure. Lots of chains have holding entities or foundations (nominally for governance, really to justify their premine or "reserves") and seem rather vulnerable, especially if they pay the core developers. The CEO of that entity won't take your calls but they are absolutely exposed to the whims of the legal system in their founding jurisdiction.
- worik 5y agoYes. Trading off hundreds of years of experience and judicial tradition and precedent for a brand new shiny (just trust us programmers) system. If the former system were to be irretrievably corrupt, teetering on the edge of collapse, and the proposed replacement were capable of replacing it then it would be worthwhile. The existing international financial system is corrupt, the judiciary in most of our world is complicit, but it is not on the edge of collapse (look how brilliantly it sailed through the 2008 crises. It used its political power to get the middle classes to bail out the super rich). The proposed replacement (cryptro currencies) has no support from cryptographers (I am not one) nor finance geeks (that I have been). It is even worse that that which it proposes to replace. Additionally in most of the Western World we have the democratic institutions that can be put to use to fix the system. Economists are slowly coming around to recognising the catastrophic mess that the current system is, how it is sapping our vitality as a community, enriching the few (hi Unicorn founders - fly to Mars please) and impoverishing the middle classes. We can fix this. But we have to give up on single fixes (like crypto). This requires modern system thinking....
- kordlessagain 5y agoAnyone interested in codified risk should read about rai stones.
- jayd16 5y agoHmm. I don't think this is the first legal contract of ambiguous intent. Surely any court would decide what the proper reading is and rule in some direction.
- SamBam 5y agoWhile it's certainly true that there are plenty of legal cases that hinge on the inclusion or omission of a single comma, or a single word, or something like that, by and large the courts (and the whole system) try and sort such things out through principles such as intent and least-harm. This is particularly the case with ownership of money. If you've put money in a bank, and the bank says "sorry, due to a programming error you can't get your money back," that's on the bank. They are legally required to try and get you your money back. Similarly, legal contracts (as opposed to defi smart contracts) must contain certain elements to make them legally enforceable. These include such elements as capacity (the capacity of the signer to enter into a contract, which can take into account whether they can fully-understand the contract) and adequate consideration (whether the contract is blatantly unfair to one party). So a contract that seems reasonable but might have some complex edge-case that requires extreme fine-grain parsing or auditing to see how you might end up with no money may not be legally-enforceable at all. In the defi world, it seems like you're entering into a contract that's written in code, but there's no requirement to be able to actually parse and have the capacity to understand all the code that is written in the contract (or omitted, in the case of edge-cases the programers didn't think about). This seems like it wouldn't fly in any legal contract.
- jcpham2 5y agoI've been saying for a very long time now to anyone who chooses to listen that a contract itself is a human construct - it is both temporal and physical and has location to be relevant and useful. Without all of those properties a contract ceases to useful to a human being under all edge cases. So it is, in fact, a dumb contract. Humans want contracts that make them whole at the end of the day, that's the point of the contract: jurisdiction over the human realm.
- exporectomy 5y agoHow is that thing you've been saying relevant here or how does it lead to your 2nd paragraph? Smart contracts meet all your requirements for a contract just as PDF contracts do.
- shkkmo 5y agoI believe the point the poster was making is that "smart contract" is a misnomer and contracts comprised of code should be more realistically called "dumb contracts" since they lack the intelligence to understand and compensate for context and intent.
- missblit 5y agoThey really shouldn't be called contracts at all, since intent ("meeting of the minds") is a fundamental part of contract law. Imagine for example if a mortgage contract contained some bizarre inscrutable loophole that as-written would give the first 3rd party to notice it total control over over the house. This would of course be laughed out of court because that part of the contract wouldn't be enforcable under contract law. "Code is law" is more accurately written as "code is not law at all".
- shkkmo 5y ago> They really shouldn't be called contracts at all, since intent ("meeting of the minds") is a fundamental part of contract law. That's a really good point. They are arguably neither "smart" nor "contracts". Maybe a better term is "automated blockchain agents" or something similar?
- skybrian 5y agoThis is less about actually going to court and more about counterparties being able to give each other a bit of slack based on customs in the profession and what was “really” meant because they may need to work with each other again someday. The courts are for when negotiations fail.
- cabalamat 5y agoPrograms have bugs in. This is something programmers should be aware of!
- tigger0jk 5y agoAlso, if the price of TITAN is 0, then you really can't pay out 25 cents worth of it... It does seem correct that the contract should handle such a case differently than just trying to pay you out UNDEFINED DIVIDE BY ZERO ERROR count of TITAN
- georgyo 5y agoYou just hit the nail on the head. I did not think about that. This is the true reason they needed to special case <=0.
- phire 5y agoIf you think about it, the special case should give holders the option to withdraw the 74c of USDC without any TITAN. Clearly the programmers didn't fully think though what would would happen if TITAN reached and got stuck at zero value.
- SV_BubbleTime 5y agoThis is what I was thinking. It should be decoupled. Here are the rules for how many USDC you get and here are the conditions for your TITANs. On the TITAN there should have been a condition for over zero, and a totally separate condition/case for zero… or less than or equal to zero since we’re working on edge cases no one considered.
- runbathtime 5y agoThat is what courts are for- to interpret the spirit of a contract. There is a point where hiding deliberate pump and dumps/ fraud/ ponzi schemes through complicated tokenomics or incompetence (we couldn't predict all the edge cases) no longer is an excuse. At this point, there is really no difference between the approach to launching these half baked algo/backed stablecoins and deliberate fraud. It could be easy for a court to make the decision that the contract was designed to be complicated on purpose to hide deliberate fraud, or at least could determine the devs were recklessly incompetent and still responsible.
- xur17 5y agoThat's both a downside and an upside though - they do exactly what they say they will do. The issues occur when people don't realize exactly that they say they will do. To me it's just a different set of trade offs. Also, it's worth noting that this contract wasn't audited, a baseline practice in the industry. Most larger contracts go through multiple waves of audits, while this was apparently released with exactly 0 (so hard for me to be shocked when there are issues). > A code audit likely would have caught this (this type of bug is so common in software development, I’ve probably made it hundreds of times myself), but of course this smart contract was not audited. Only its sister-contract on the Binance Smart Chain, written in a different language, was.
- tornato7 5y agoAny experienced crypto investor knows that putting money into an unaudited contract that's less than a few months old is basically throwing that money away. There is another side to this, though, which is that protocols than have been around for a year or more without problems are quite trustworthy and become important building blocks for DeFi.
- anyfoo 5y ago> have been around for a year or more without problems > quite trustworthy As someone being used to write fixes to code that is 20 or even 30 years old, I had to chuckle.
- miracle2k 5y agoYes, but these smart contracts are often fairly short (in essence, they shift value from one ledger entry to another), and not every bug is exploitable. They are also effectively paying a bounty worth hundreds of millions of dollars if you can find an exploit. It is not unreasonable to feel increasingly confident in their safety after some time.
- oneshoe 5y agoThis is precisely why Cardano is using Haskell for their language.
- jkhdigital 5y agoYeah when I first read the Cardano stuff back in 2018, I was like "thank God someone gets it and wants to avoid the dumpster fire that is Ethereum"
- tfang17 5y agoThat's the whole point. Code is law. The alternative is our current, arcane legal system - only interpretable by lawyers who charge $600/hr.
- jnwatson 5y ago$272 million dollars could buy a lot of lawyer hours.
- Retric 5y agoSmart contracts don’t protect you from being sued. So, now you need both lawyers and programmers while still risking losing everything.
- disruptalot 5y agoNot exactly. There are plenty of anonymous projects, developers and users.
- meowface 5y agoPlus, even if they lose their anonymity, many are in places like Eastern Europe where suing them won't be so easy.
- bootlooped 5y ago"Smart contracts and cryptocurrencies - great for anonymous people in Eastern Europe who want to avoid the law, less so for other types of people" It's not an argument that's going to convert many people, but at least it's honest.
- meowface 5y agoI don't think that's generally true. It is very useful for criminals in countries that don't extradite to the US, but Many of those same people could make and were making money through other forms of cybercrime for years. Even without cryptocurrencies, new technology will always keep coming out that'll facilitate and potentiate more cybercrime. To me, the answer there is and has to be geopolitical. Whatever crime they're committing, if it's against a foreign national, they have zero fear of repercussions, and that lack of fear is totally rational because there's basically no chance they'll ever face repercussions even if their real name and address is plastered in a million places. If they knew they could be extradited, or at least sentenced to serious prison time in their own country, and that there was a significant chance of it happening if they were to be identified, then I'm convinced most of them would behave differently.
- msgilligan 5y agoSmart contracts is a horrible name. The better analogy (which has been around for years) is that they are the digital equivalent of (snack and beverage) vending machines. As with vending machines, they have their use cases, but they aren't lawyer "smart" and they certainly aren't legal contracts. I'm not sure how much trouble a better name would have saved everyone, but it might have done a better job of setting expectations.
- femto113 5y agoSo is this event the digital equivalent of the bag of chips getting stuck on the row below it or the frustrated customer shaking the machine until it falls over and squashes them?
- msgilligan 5y agoLooks like some very expensive chips got stuck in the machine.
- jkhdigital 5y ago"Self-executing contracts" removes pretty much all of the confusion
- numtel 5y agoThe vending machine analogy is exactly how smart contracts were first introduced by Nick Szabo and Vitalik Buterin. https://bitcoinmagazine.com/technical/daos-scary-part-1-self-enforcing-contracts-factum-law-1393297672 https://bitcoinmagazine.com/technical/daos-scary-part-1-self...
- dheera 5y agoNot only that, but all the hashes will probably be broken at some point in the future. We thought MD5 was the be-all end-all of hashes back then, but here we are at SHA-512 thinking it's our masterpiece. Two decades from now it will probably be obsolete.
- canadianfella 5y agoInfact
- DennisP 5y ago"Smart contract" has always been a bit of a misnomer. If they'd just called them "scripts" then people wouldn't complain about the lack of lawyers.
- jl2718 5y agoEverybody said the same thing about the 1987 automated trading crash. Get rid of those darn computers! Sorry; decentralized autonomous finance is here to stay. There will be less disasters as we go along, but they will be much bigger.
- kaliali 5y agoThis is why Cardano smart contracts will be so strong in August. The language running underneath it all is Haskell, a functional programming language where you can prove the code will work as intended. You won't have to constantly put out fires like in Solidity.
- Lucadg 5y agoSmart contracts are neither smart nor contracts. It's code which does stuff and if you want to be on the safer side of it, you allow time and liquidity to test them out. If you want to assume risks and possibly higher rewards you get in early (ape, in crypto speech). It's pretty simple. What makes it complicated is that they are called smart contracts.
- mimixco 5y agoThe classic "halting problem" in comp sci shows that no one can even determine all the edge cases, much less test for them. This is why all software has bugs and always will have bugs. The way smart contracts lock-up software and make it impossible or difficult to edit can only create more bugs and prevent them from being fixed when they're found. This is the exact opposite of how professional, enterprise software development handles updates! The lawyer problem is even worse than not being able to interpret the contract. The code isn't even a contract, legally. When conflicts arise from these deals, courts will settle them the way they always have. They won't read code and then decide that "code is law." That's something programmers made up that will also never be true.
- mimixco 5y agoPerhaps I should explain why the halting problem is an issue. In comp sci, the halting problem says we can never guarantee that, given some input, a program won't halt. "Halt" is another way of saying "stop without doing the intended thing," which is what we call a bug. One of the ways this translates to everyday debugging is that humans cannot ever know the range of all possible inputs or conditions to a program. We don't have that ability any more than we can give someone a list of all the words that can be made with the letters A-Z. If we cannot write down what all the possible inputs might be, we cannot be sure that one of them doesn't cause halting! By the same token, as useful as they are, no set of regression tests can prevent all bugs for the same reason: it simply isn't possible to come up with a set of regression tests that is in any real sense "complete" (ie: ensures no halting). The halting problem was proved mathematically by Alan Turing and applies to all Turing computers, so we know it applies to smart contracts. In fact, the inability of the developers to conceive of one possible input (a zero value from the oracle) is what led to halting in the case of IRON. To make the problem worse, even knowing that halting (aka bugs) was a possible outcome (a likely outcome, even), not only did the company apparently not seek any outside code audit, they locked down the contract (because it's "law," lol) so that the code can't be fixed even though it's now known to be broken. So there's the stupidest kind of programming ever. Smart contract is a name in the same vein as the Ministry of Peace in Orwell's 1984. It is anything but smart. It is known to have bugs (halting problem) and they cannot be fixed (locked down "by law," rotflmao).