News for hackers. Stuff that matters.
Re:The collapse of the IRON stable coin by marcosdumay on Thursday June 17, 2021 @06:21PM (#27545084)
Well, to be fair, people write legal contracts without fully understanding what they are writing all the time too. I do disagree that people understand them on most cases.

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.

Re:The collapse of the IRON stable coin by ineedasername on Thursday June 17, 2021 @11:26PM (#27547058)
Yes, and when normal contracts don't (because they can't) anticipate every possible scenario, there is a meta layer on top of that to resolve edge cases.

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.

Re:The collapse of the IRON stable coin by everfree on Friday June 18, 2021 @01:45AM (#27547698)
> 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.

You can do this to some extent using formal verification. Most code doesn't get formally verified because it's kind of a pain to do, and you can usually fix bugs later, but smart contracts are the perfect candidate for it since they are (1) mission critical, (2) naturally limited in size and scope, and (3) cannot be fixed after the fact. You can write perfect code if you have the right tools and do it carefully.

Re:The collapse of the IRON stable coin by dwaltrip on Friday June 18, 2021 @02:40AM (#27547936)
Formal verification doesn’t help with bad assumptions that went into the design of the program.
Re:The collapse of the IRON stable coin by everfree on Friday June 18, 2021 @03:29AM (#27548157)
That is absolutely true, but even legal contracts can't help you with bad assumptions that underpin the entire contract itself.
Re:The collapse of the IRON stable coin by ineedasername on Friday June 18, 2021 @10:16AM (#27550553)
Yes, that's sort of what I mean though: you can't avoid mistakes like that, but with legal contracts there is mechanism to resolve that issue with hundreds of years of experience and benchmarks and mechanisms for figuring out how to hand these things. It's messy and imperfect, but there's no achieving perfection human affairs.

Smart contracts don't have a mechanism if this sort. If you have an issue with them as in this case with IRON, your best hope is that IRON will find a way to handle it that satisfies everyone (which may be hard) or that the normal legal system is able to resolve it.

Both of those kind of negate the purpose many people want smart contracts to have in being free of sovereign legal systems and, once implemented, automated without the need for human judgement that may be biased or bad etc, so no longer able to be trustless. At best they simply automate portions of a contract, which is still a very good thing, but not really what enthusiasts are hoping for.

Re:The collapse of the IRON stable coin by afiori on Friday June 18, 2021 @04:14AM (#27548396)
But with legal contracts there is a baseline common sense of things that will not happen.
Re:The collapse of the IRON stable coin by DonHopkins on Friday June 18, 2021 @02:26AM (#27547867)
>You can write perfect code if you have the right tools and do it carefully.

Obviously you are not a programmer.

Re:The collapse of the IRON stable coin by everfree on Friday June 18, 2021 @03:27AM (#27548152)
Is there something about formal verification of systems that I don't understand?
Re:The collapse of the IRON stable coin by avereveard on Friday June 18, 2021 @03:49AM (#27548266)
No automatic verification would flag misunderstood business logic
Re:The collapse of the IRON stable coin by chrisseaton on Friday June 18, 2021 @03:37AM (#27548196)
People make mistakes in their verification code the same way they make mistakes in their actual code.
Re:The collapse of the IRON stable coin by DonHopkins on Friday June 18, 2021 @04:15AM (#27548399)
There is something about this "business logic" that I don't understand:

>Because the TITAN price falls to 0 which we have unthought of, the contract will revert the redemption transaction.

Re:The collapse of the IRON stable coin by nuclx on Friday June 18, 2021 @07:31AM (#27549320)
> You can write perfect code if you have the right tools and do it carefully.

And you are DJB.

Re:The collapse of the IRON stable coin by IanCal on Friday June 18, 2021 @01:49AM (#27547719)
Regular contracts don't have a built in layer to resolve issues either. As you say, it's a meta later above this.

Laws still apply to things handled with smart contracts. You can't say "well sure the escrow contact did the wrong thing but it's code so you can't come after me for your money back".

Re:The collapse of the IRON stable coin by ineedasername on Friday June 18, 2021 @10:30AM (#27550716)
I agree that right now the legal system still applies.

The problem is that lots of smart contract enthusiasts embrace them for the same reason they embrace crypto currency: they see it as a way to avoid government institutions that they do not want to have to work with or trust. In fact they want the entire contract to be trustless: agree to the terms, implement them in code, and and since the rest is automated you don't have to trust that the other party won't follow through.

I don't see how that can actually work in an automated fashion. Whether it's traditional government or some other legal system or analog, you need a resolution layer above contract layer, but at that point you've lost a lot if what enthusiasts want in smart contracts.

Re:The collapse of the IRON stable coin by im3w1l on Friday June 18, 2021 @07:20AM (#27549278)
I trust the alarm on my phone to wake me up in the morning, even though it's been programmed by flawed human beings. It's possible to reach sufficient reliability despite our flaws and bugs.
Re:The collapse of the IRON stable coin by ineedasername on Friday June 18, 2021 @09:39PM (#27556987)
"Sufficient Reliability" still needs mechanisms to resolve the rare issues that occur. A 5 9's system still needs resolutions for the 0.001% scenarios. In the case of your phone's alarm if your phone crashes, runs out of battery, app cache gets corrupted, whatever-- you can intervene with your human judgement to determine an appropriate resolution. What mechanism do smart contracts have for 0.001%?

Your phone's alarm is also not a critical transaction worth a person's life savings or the wealth of a country or a transaction involving life-critical supplies etc. The bar is a bit higher here, and even the most reliable systems ever designed have the ability to insert human judgement when the rare issue happens. Smart contracts are supposed to be appealing because they avoid the need for biased/imperfect judgement in favor of something "trustless", or at least that's the vision many see for them.

Contracts can also have hundreds or thousands of clauses, making "sufficient reliability" a much higher bar than an alarm clock. Especially because many of those clauses entail human concepts that would be extremely difficult to translate into code: What is the algorithm for determining "force majeur"? That's a pretty basic clause that appears in many contracts, but I don't know where you'd even begin to get a computer to understand & properly identify such events.

I don't see a pathway to sufficient reliability in smart contracts anywhere on the horizon, save for very simple cases. Even then, here we have IRON, which should have been relatively simple as these things go, but failed because the simple case of "Titan has no value" was not considered.

Re:The collapse of the IRON stable coin by davidwritesbugs on Friday June 18, 2021 @03:42AM (#27548222)
ex-lawyer here: I can confirm it is possible to write buggy conventional contracts; I have done so on numerous occasions. I have missed the odd ',', or simlar lexical slips, in a clause. Fortunately no rockets or stablecoins crashed as a result. And yes, a judge would resolve this to the sound of mocking laughter in the courtroom.
Re:The collapse of the IRON stable coin by EveYoung on Friday June 18, 2021 @04:41AM (#27548515)
Isn't this why laywers' have to get indemnity insurance?
Re:The collapse of the IRON stable coin by davidwritesbugs on Saturday June 19, 2021 @02:22AM (#27558256)
It is. Being sued for professional negligence is hurty & we earn by inflicting pain on others not getitng hurt ourselves. A static type checker/formal verifier for legal contracts would be worth serious money.