Live data from Hacker News

Chasing the DAO Attacker’s Wake – A second exploit

pdaian.com

131–140 of 180 posts

Re: Chasing the DAO Attacker’s Wake – A second exploit

#131
post #80

Earlier quoted context omitted.

It seems like there are quite a few pitfalls to avoid just in writing these contracts, and they aren't obvious things in many cases. This seems incredibly dangerous , given what is at stake when a bug is included in a contract. Is there any form of auditing that contracts can go through to not have these pitfalls? I wonder how many of them are still undiscovered...

There's both an active developer community willing to help for free, and professional auditors you can pay. There are also people talking about a NASA-style bugs/best practices database at some central location. People are realizing that this needs to be developed like safety-critical software, not like fast-moving startup websites. But I would say it's not as scary as, say, developing software for aerospace or medic…

In case anyone hasn't read it, the NASA coding process is extremely interesting: http://www.fastcompany.com/28121/they-write-right-stuff

Re: Chasing the DAO Attacker’s Wake – A second exploit

#132
post #30

As the article briefly suggests, this problem can be completely avoided if every method has no more than one external call and always puts it last. I'm messing around with contracts to do about a dozen different things, and it turns out to be easy to meet this restriction, as long as I'm willing to design the UI accordingly. (E.g. don't send money to lots of users in one step, just update their balances and make them…

What's your setup to mess around with contracts?

Re: Chasing the DAO Attacker’s Wake – A second exploit

#133

Earlier quoted context omitted.

There's both an active developer community willing to help for free, and professional auditors you can pay. There are also people talking about a NASA-style bugs/best practices database at some central location. People are realizing that this needs to be developed like safety-critical software, not like fast-moving startup websites. But I would say it's not as scary as, say, developing software for aerospace or medic…

Five pages? I thought these things were meant to be shorter than plain-English contracts. I draft and review contracts daily and five pages is long for basic things (employment, NDAs, IP transfer etc).

It's software, not really comparable to an English-language contract. Most software is much bigger than that.

Five pages is an outside estimate, for something like a currency exchange. My crowdfunding contract is about two pages, and the vault is one.

Re: Chasing the DAO Attacker’s Wake – A second exploit

#135
post #89
post #30

As the article briefly suggests, this problem can be completely avoided if every method has no more than one external call and always puts it last. I'm messing around with contracts to do about a dozen different things, and it turns out to be easy to meet this restriction, as long as I'm willing to design the UI accordingly. (E.g. don't send money to lots of users in one step, just update their balances and make them…

If this code style is an absolute requirement for the code not to be exploited, it should be probably be built-in in the language specification itself.

Or at least, we should have a linter, and strongly encourage it's use. Maybe make a rule of disclosing linter warnings when presenting contracts.

Re: Chasing the DAO Attacker’s Wake – A second exploit

#136
post #111
post #30

As the article briefly suggests, this problem can be completely avoided if every method has no more than one external call and always puts it last. I'm messing around with contracts to do about a dozen different things, and it turns out to be easy to meet this restriction, as long as I'm willing to design the UI accordingly. (E.g. don't send money to lots of users in one step, just update their balances and make them…

Patchwork solutions won't cut it. "Solidity" is inherently unsuited for the task of safe and correct contract design.

This looks like an ideal use case for a Haskel based DSL. We need good static analysis capabilities, and we have to carefully manage side effects.

Re: Chasing the DAO Attacker’s Wake – A second exploit

#137
post #15

Seems like this is what mutexes were invented for

With a mutex, an A -> B -> A call would deadlock if the mutex is the stop-and-wait or spin-and-retry sort. It would have to be a succeed-or-exception mutex, which is not a common design.

Keep in mind that Ethereum only runs one thread. It puts transactions in order and runs one after another.

Re: Chasing the DAO Attacker’s Wake – A second exploit

#138

Earlier quoted context omitted.

Five pages? I thought these things were meant to be shorter than plain-English contracts. I draft and review contracts daily and five pages is long for basic things (employment, NDAs, IP transfer etc).

It's software, not really comparable to an English-language contract. Most software is much bigger than that. Five pages is an outside estimate, for something like a currency exchange. My crowdfunding contract is about two pages, and the vault is one.

> It's software, not really comparable to an English-language contract.

If the point is to be an alternative to normal, "dumb" contracts, than that is exactly what it needs to be comparable to.

Re: Chasing the DAO Attacker’s Wake – A second exploit

#139

Earlier quoted context omitted.

It's software, not really comparable to an English-language contract. Most software is much bigger than that. Five pages is an outside estimate, for something like a currency exchange. My crowdfunding contract is about two pages, and the vault is one.

> It's software, not really comparable to an English-language contract. If the point is to be an alternative to normal, "dumb" contracts, than that is exactly what it needs to be comparable to.

He is correct in stating that it is code v. english, apples v. oranges. But I was under the impression that the whole point of using code was to explain something in more concrete and definitive terms. If doing so takes more words, more abstract word, with more oppertunity for bugs and loopholes, then what is the point?

Re: Chasing the DAO Attacker’s Wake – A second exploit

#140
post #61
post #20

Nearly a year ago I made the comment -- "Who are these people[1] and what credentials do they have to build and run a cryptocurrency platform?" [1] https://angel.co/ethereum-1 Today, not a single cryptographer, mathematician, or anyone with software security experience is listed on the Ethereum Foundation member list[2]. I am not attacking any individuals by themselves, but as a group this says a lot. For the record,…

Your comment from a year ago was pretty much entirely wrong: The ethereum platform has so far been stable and without exploits to this date. The exploits of theDAO and the exploits described in the article are smart program exploits, not exploits in the underlying platform. Could the solidity programming language have some more features to protect inexperience smart contract programmers from themselves? Certainly, no…

[deleted]
Post reply on HN