Live data from Hacker News

The collapse of the IRON stable coin

irony-97882.medium.com

441–450 of 502 posts

Re: The collapse of the IRON stable coin

#441

Earlier quoted context omitted.

> 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 see…

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.

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

#442

Earlier quoted context omitted.

>You can write perfect code if you have the right tools and do it carefully. Obviously you are not a programmer.

Is there something about formal verification of systems that I don't understand?

No automatic verification would flag misunderstood business logic

Re: The collapse of the IRON stable coin

#443
post #383

Earlier quoted context omitted.

Flash loans are not relevant to the uniswap TWAP oracle, which ignore any transactions in the current block. That oracle was written specifically to be resistant to manipulation and I don't think there's any consensus not to use it.

Could you not still use flash loans in attacks that take longer than one block? You'd have to pay the loan back within each block, but it seems like you could still shift markets enough to take advantage, if you were willing enough to take on some risks.

That'd be quite expensive. And as you manipulate prices across blocks, arbitrageurs would arb it back to "market price". Uniswap V3 allows for a 3rd party smart contract to ask its Uniswap V3 Oracle to employ a 9 day moving average price - which is of course, not very useful as a "spot price", but is super hard to manipulate.

Re: The collapse of the IRON stable coin

#444
post #213

Fwiw the bug was fixed by submitting a transaction to change the oracle to a new contract that just had a fixed nonzero price for titan. Everyone was able to redeem at roughly 74.6 cents.

Quite honestly, that's quite scary. The ability to just change an oracle sounds like a backdoor (and not De-centralized). I'm not exactly familiar with Poly - but, I thought that was the sell of Link, was the idea that you are dealing with Oracle pools rather than a specific, single, Oracle?

Most smart contracts on Ethereum, or other blockchains are only immutable in their marketing material, but not in practice. Either they use an obvious PIMPL/Proxy contract (OpenZeppelin, a popular smart contract library suite has proxy contract that many others use: https://docs.openzeppelin.com/upgrades-plugins/1.x/proxies), or they have other subtler hooks that can be used to change what ABI/function calls to the smart contract does. These hooks are only usable by privileged actors (surprise surprise).

Smart contracts being immutable is a joke, almost. And more importantly, even if they were immutable, proving that formally for a Turing complete language is impossible.

Bitcoin smartly avoided this by making its smart contracts dumber.

Re: The collapse of the IRON stable coin

#445
post #358

Earlier quoted context omitted.

This is a strange statement. It's like saying that a forloop isn't authoritative because it hasn't been approved by a court. "Legal authority" isn't a well-defined object in the evaluation of smart contracts. It is certainly not an authority in the sense that the EVM (or, for other blockchains, corresponding VM) code is. Is this really a surprise? Nodes don't evaluate common law, they evaluate smart contracts. That's…

>Not everyone believes in the legitimacy of the state, let alone that the legal system is somehow the proper authority for evaluation of disambigous source code. This is something that I haven't been able to figure out about blockchain enthusiasts. Assuming the blockchain is wildly successful, it poses an inherent threat to the ability of the modern state to collect taxes. Why do blockchain enthusiasts, who already d…

Isn't this ultimately a 'might makes right' argument?

Re: The collapse of the IRON stable coin

#446

Earlier quoted context omitted.

Formal verification doesn’t help with bad assumptions that went into the design of the program.

That is absolutely true, but even legal contracts can't help you with bad assumptions that underpin the entire contract itself.

But with legal contracts there is a baseline common sense of things that will not happen.

Re: The collapse of the IRON stable coin

#447

Earlier quoted context omitted.

>You can write perfect code if you have the right tools and do it carefully. Obviously you are not a programmer.

Is there something about formal verification of systems that I don't understand?

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

#448

Earlier quoted context omitted.

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.

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.

Isn't this why laywers' have to get indemnity insurance?

Re: The collapse of the IRON stable coin

#449

Earlier quoted context omitted.

No, much different: In a ponzi scheme, the perpetrators will not willingly directly reveal that it's a ponzi scheme. In cryptocurrency, the perpetrators are honest and transparent about it being a ponzi scheme, but surround it in so much techno-babble that they make it sound like a ponzi schme is what you WANT.

These are not Ponzi schemes. In a ponzi you have a mechanism to distribute money to early adopters in the tree. These are just pump and dumps but you create and pre-mine the asset before pumping it. There were ponzis some years back like OneCoin and BitConnect.

I think OneCoin would be classified as a Pyramid rather than "just" a ponzi - a lot of shady MLM promoters got very rich through the recruitment incentives

Re: The collapse of the IRON stable coin

#450
post #311

> _share_price here refers to the price of TITAN, as provided by an oracle, which is correctly reporting it as… 0 (somewhere in the distance, you can hear a room full software engineers burst into laughter ). Aside from the amusing programming error, the main problem with much of the "smart contract" activity today is that doing anything remotely interesting requires an oracle. An oracle is basically a server that re…

no, an oracle is another smart contract that is called by the main contract, the oracle smart contract logs an event, this event triggers sources of truth (servers), each source of truth provides information for the oracle contract by modifying its state, the oracle contract decides if the data is reliable and calls the main contract if so

But there must always be a point where the oracle interacts with the real world, right? Which immediately becomes a point of centralization, which -seems to me- kinda defeats the purpose of having a decentralized system
Post reply on HN