by georgyo · 5y ago · 0 comments
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.
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.
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.
Things are better on consumer law because it assumes from the start that people are stupid and have no idea what they are doing. But other kinds of contracts have quite large security risks.
In the case of a smart contract, it can even happen that both parties agree in how things should take place when there's a problem! But bad code doesn't work that way, and you can find yourself in a null state of indeterminacy without a built in layer to resolve that.
The entire evolution of legal jargon can be viewed as an attempt to provide a linguistic framework whereby ambiguity is minimized and edge cases are anticipated. But human interactions are chaotic and all outcomes or scenarios can never be predicted, hence the need for a layer of human judgement.
That layer is imperfect, sometimes wrong, sometimes biased, but still necessary. I don't see how smart contracts can work without that sort of layer, but with a human judgment layer then they're not really smart contracts in the way people want such contracts to function.
Trusting any smart contract of sufficient complexity is like trusting that a code base has absolutely zero bugs and zero unanticipated edge cases. I just don't see that as realistic.
If a programmer at a bank or exchanged should have coded ">=" then I want 1) for them to easily be able to act on their intentions instead of their mistake or 2) the ability to bring in a 3rd party to interpret and resolve the situation if #1 doesn't work out.
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....
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.
For this one you need programmers and computers.
On both cases, if you go in blind or wing it you might get burned.
I'm not convinced that programmers and computers can bootstrap to that level of experience very quickly. I think a decade ago I was more optimistic on that possibility, but a decade of repeating history has made me a bit more pessimistic on that ability and cynical about the motives of most people involved.
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-acti... (SEC Cyber Enforcement Actions, control-f "blockchain" | "crypto")
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-cryptocurr... (DOJ Activity on Cryptocurrency: A Six-Month Review)
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)
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.
Oh wow. If only this were true. If only they were so diligent in punishing other kinds of things.
Here's something I read recently, from the aftermath of the Libor scandal: https://www.sec.gov/news/statement/stein-waivers-granted-dis... . Really highlights how crazy this whole thing is and how there are really two qualitatively different classes with two different sets of rules in our society.
All the different ways people evade authorities is a large topic. But, you're right, friends in high places help.
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.
(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.
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.
This is the true reason they needed to special case <=0.
Clearly the programmers didn't fully think though what would would happen if TITAN reached and got stuck at zero value.
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.
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".
Sorry; decentralized autonomous finance is here to stay. There will be less disasters as we go along, but they will be much bigger.
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.
https://bitcoinmagazine.com/technical/daos-scary-part-1-self...
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.
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.
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.
> quite trustworthy
As someone being used to write fixes to code that is 20 or even 30 years old, I had to chuckle.
The alternative is our current, arcane legal system - only interpretable by lawyers who charge $600/hr.
Law is law, code is code. They're two very different things. Code can't prevent someone from using violence to force you to overturn a smart contract's decision. The law can because it's enforced by the state. You could certainly choose to build a system of law that uses code, but code by itself cannot substitute for law.
> only interpretable by lawyers who charge $600/hr.
What do you think the going hourly rate would be for software engineers capable of writing bug-free smart contracts? If adoption takes off I'd bet that it will look a lot like the hourly rate of a good lawyer, or even exceed a lawyer's hourly rate given the impossibility of an appeal if the smart contract is poorly coded.
Also lawyers don't interpret contracts. They draft them and advocate on behalf of their clients in disputes. Judges interpret contracts, and are available as a public service paid for by taxes.
The point where the two realms intersect is challenging but needs to be handled appropriately. It would be great if some of the terms of legally binding contracts could be delegated to automated systems. And when two parties do not actually share a common legal system, then code-based contracts can facilitate transactions that would otherwise probably never happen.
You can hit the developers and the computer has much has you want but no amount of violence will fix the "_share_price > 0".
except for the DAO fork of course, when commit rights were law.
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.
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).
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.