Live data from Hacker News

Ethereum Contracts Are Going to Be Candy for Hackers

vessenes.com

41–50 of 85 posts

Re: Ethereum Contracts Are Going to Be Candy for Hackers

#41
The much-hyped 'DAO' that has crowd-funded over $100 million dollars worth of ether, is based upon one of the largest contract code seen so far. Even if it has been code reviewed, it's almost certain that bugs remain in there. All it takes is one hacker to find a flaw and $100 million will be gone in an instant

Re: Ethereum Contracts Are Going to Be Candy for Hackers

#42

The much-hyped 'DAO' that has crowd-funded over $100 million dollars worth of ether, is based upon one of the largest contract code seen so far. Even if it has been code reviewed, it's almost certain that bugs remain in there. All it takes is one hacker to find a flaw and $100 million will be gone in an instant

is there an easy-to-look-at link to the code?

Re: Ethereum Contracts Are Going to Be Candy for Hackers

#43
post #28

Earlier quoted context omitted.

>Most likely, Ethereum itself (the "engine") will be effectively error-free - probably as good as the Linux kernel - once it reaches 1.0. "will be effectively error-free" != "probably as good as the Linux kernel", not even close :D

The security history of the JVM suggests that one shouldn't be optimistic there either.

counterpoint: I haven't really heard of any "javascript escaping the container" bugs in a really long time (excepting node.js-related issues)

Re: Ethereum Contracts Are Going to Be Candy for Hackers

#44
post #42

The much-hyped 'DAO' that has crowd-funded over $100 million dollars worth of ether, is based upon one of the largest contract code seen so far. Even if it has been code reviewed, it's almost certain that bugs remain in there. All it takes is one hacker to find a flaw and $100 million will be gone in an instant

is there an easy-to-look-at link to the code?

Yes!

Most Ethereum contracts aimed at public consumption are published at ethereum chain viewers. I like etherscan: this is the DAO's contract https://etherscan.io/address/0xbb9bc244d798123fde783fcc1c72d...

Re: Ethereum Contracts Are Going to Be Candy for Hackers

#45
>>industry average bugs per 1000 lines of code at 15-50 and Microsoft released code at 0.5 per 1000, and 0(!) defects in 500,000 lines of code for NASA

Does anybody know how useful this metric is?

I have read NASA uses C, C++, Java and Ada, of which the last three have a lot boilerplate. Heavily commented C can be verbose too. I realize there is probably a lot of review, commenting and redundancy built-in, and that adds to the overall LOC too.

An MS bug might mean Excel crashes, or a bad business decision is made, unless somebody is using MS software for more critical end points. With NASA, it can be guidance systems, and other low-level routines running in radiation-hardened electronics.

Rosetta lander used Forth onboard, so there were probably a lot fewer LOC to make mistakes in. Just one way to approach bug-free programming vs. ADA's or Java's verbosity and checks.

I write J code, so one error usually amounts to 1 in 5 or 10 LOC ;) But then again, I can see all my code in one glance, and I program iteratively in the REPL.

Re: Ethereum Contracts Are Going to Be Candy for Hackers

#46
post #43
post #28

Earlier quoted context omitted.

The security history of the JVM suggests that one shouldn't be optimistic there either.

counterpoint: I haven't really heard of any "javascript escaping the container" bugs in a really long time (excepting node.js-related issues)

JavaScript doesn't run on the JVM.

Re: Ethereum Contracts Are Going to Be Candy for Hackers

#47

The much-hyped 'DAO' that has crowd-funded over $100 million dollars worth of ether, is based upon one of the largest contract code seen so far. Even if it has been code reviewed, it's almost certain that bugs remain in there. All it takes is one hacker to find a flaw and $100 million will be gone in an instant

Clearly the DAO's first investment should be in getting Augur up and running, so DAO token holders can hedge against a DAO hack in the prediction markets...

Re: Ethereum Contracts Are Going to Be Candy for Hackers

#48
post #17

Earlier quoted context omitted.

First, let me acknowledge that this is a fair question. A bit cynical, perhaps, but fair. To answer it, no, not like this. Contract law has a lot of humans in it. You are certainly able to sign some contracts with combinations of clauses that can get you, and I've read horror stories at the mega-corp levels about contract clauses interacting unexpectedly and screwing some party or other. But even in those cases, the…

I'd love to hear more about those horror stories you mention.

https://www.bloomberg.com/view/articles/2014-05-13/caesars-a...

Re: Ethereum Contracts Are Going to Be Candy for Hackers

#49
post #32

Earlier quoted context omitted.

I'd love to hear more about those horror stories you mention.

Me too. I can't remember enough about what they were to pull up details, though. I remember it was some combination of contractual obligations to supply a certain product at a certain price, obligations to supply a certain number of them, a clause that changed the price if a certain number of them were bought, that sort of thing. You can do things like create contracts where you can buy enough of the items to trigger…

>But considered to be normal stuff at the higher levels of the game.

Does the company in question lose business when this comes out?

Re: Ethereum Contracts Are Going to Be Candy for Hackers

#50

Earlier quoted context omitted.

the 2nd point was to address the fact that the contract can be updated/patched with little if any impact to it's end users. so the new version of the contract gets pushed out, the old one is not in use any longer and just kind of dies off :)

Right, but for a ponzi scheme contract, that's not a great outcome. Or, say, a crypto-currency, one of the sample apps in Ethereum documentation. Either way, you have a trust problem -- who shall be trusted to transfer out all the value the contract holds?

I would imagine that would be something the contract identifies explicitly along the lines of Bitcoin multisig.
Post reply on HN