Live data from Hacker News

Thinking About Smart Contract Security

blog.ethereum.org

61–70 of 85 posts

Re: Thinking About Smart Contract Security

#61
post #58

Earlier quoted context omitted.

Any smart contract enforcement mechanism would necessarily rely upon some outside system Absolutely. This drastically limits the scope of smart contracts. You can do all kinds of interesting stuff with the contracts and digital money, like ponzi schemes, simple gambling games, and so on, but you can't link them with the real world without relying on some third party trust. And once you require trust, then you might a…

I don't see why this is a fundamental problem. At worst, a simple legal shim of the "third party law firm legally bound to do X if smart contract dictates so" would bridge pretty effectively. Smart hardware locks sounds interesting. I'll have to read up on what they tried -- it sounds like a technically interesting problem.

It's a pretty fundamental problem for a "trustless", "decentralised" system to require either a significant amount of trust, a third party to fix things or both in most conceivable practical use cases.

If you're requiring a third party law firm to ensure offline parts of a smart contract are enforced and mediate disputes, you might as well write the contract in something the law firm actually recognises as a contract.

Re: Thinking About Smart Contract Security

#62
post #60
post #52

Earlier quoted context omitted.

Because: 1. It's very hard to create a language that is both restrictive yet useful enough, without it being just as hard to verify (e.g. total-functional languages are not nearly restrictive enough to make some global properties easily provable; the only languages that make this somewhat feasible are finite state machines, and their expressiveness is questionable). 2. Even if that were somehow possible, it wouldn't…

1. Starting from a declarative language (think XML), you might not be as expressive, but you would still have a lot of value and mitigate a lot of the potential problems. 2. Safety properties that fall back on current law could be added in case of dispute. This scenario would still have great value as a smart contract.

1. XML is just a notation, and being declarative is not in itself a guarantee of easy verification: Prolog is declarative and yet Turing complete (though it's important to note that you don't need to be Turing complete to be hard to verify!). So while declarative is an excellent idea, it doesn't help with the problem of deciding what exactly the language can do to be both useful and relatively easily verifiable.

2. Absolutely, but I think the whole motivation behind projects like Ethereum is to replace the law with algorithms. I think that any computer scientist with a basic understanding of complexity would see why this is impossible, but the idea persists. Eventually, someone who's less ideologically pure would find a way to reconcile the utility of cryptocurrencies with the necessity for human law.

Re: Thinking About Smart Contract Security

#63
post #58

Earlier quoted context omitted.

I don't see why this is a fundamental problem. At worst, a simple legal shim of the "third party law firm legally bound to do X if smart contract dictates so" would bridge pretty effectively. Smart hardware locks sounds interesting. I'll have to read up on what they tried -- it sounds like a technically interesting problem.

It's a pretty fundamental problem for a "trustless", "decentralised" system to require either a significant amount of trust, a third party to fix things or both in most conceivable practical use cases. If you're requiring a third party law firm to ensure offline parts of a smart contract are enforced and mediate disputes, you might as well write the contract in something the law firm actually recognises as a contract…

See my other comment, there are gradients of trust not simply trusted or trustless.

A simple example why is that 10 MM parties across the world want to coordinate together for a custom contract - this might be challenging depending solely on the current system (coordination cost, different jurisdictions), but there may be benefits to having elements of both systems involved.

Again, this is all speculation - and only time will tell, but I also think it's a debate to be had, rather than suggesting that such a system is worthless if it depends on any real world legal forms.

Re: Thinking About Smart Contract Security

#64
post #25

IRL, contract law and courts take precedence over schemes like Ethereum and the DAO, just like arrest warrants do, money laundering regs, etc. Whether this is good or bad, it just is. In real contract law, there are three elements of a contract. 1. a meeting of the minds: the parties must agree on what is being exchanged 2. an actual exchange, in both directions, it's called "consideration" 3. at least one of the par…

> It is not "a meeting of the minds" for one side to drain the other side of their total balances, and it violates "consideration" as well since nothing is being exchanged for the extra money. So there is ample reason to claim that these were not valid contracts and should be rolled back. I disagree. From the Explanation of Terms and Disclaimer[1] on the DAOhub site: "The terms of The DAO Creation are set forth in th…

|I disagree.

Excellent! and I disagree with you, so we disagree. Where does that leave us? Simply as two proponents of free speech... unless... unless we have a smart contract between us, one under which you just drained my Ethereum account of ether. Beyond being a proponent of free speech, that gives me "standing" to become a "litigant", a "plaintiff" against you as "defendant". You would get to tell your side to the judge, just like me.

Here are some exaggerated hypothetical examples where you will agree with me; then hopefully you can see how a judge would look at the present situation with the DAO:

If, buried in TheCodeThatIsLaw that AllPartiesKnewAndAccepted, there is encoded an agreement to deliver narcotics to children, or sell children into slavery, or to provide funding to a terror training cell for children, then it wouldn't matter what TheCodeThatIsLaw says, a court would declare it invalid, NotAContract, NotBinding. Even if we encoded it in language that says "this is the funding part, being non-specific about the activities". That's simply how it works. Period. And you can't write a binding contract to give money away, there's no consideration.

TheCodeThatPurportsToBeLaw must meet standards of its own in order to provide additional binding law, the standards I outlined above, a meeting of the minds, consideration, and reliance. So when it comes to challenging the results of TheCodeThatPurportsToBeLaw, courts will look inside, and they will look for AMeetingOfTheMinds, and they will look at what actually happened, how people behaved, and the court will decide if TheCodeThatPurportsToBeLaw fulfills the requirements that all contracts must fulfill in order to be binding.

My point is not that these contracts are invalid; my point is that these contracts are not free from interpretation by courts, and they are not free from meeting the standards of contracts as seen and interpreted by the courts, and not as seen by one party to the agreement who got what they wanted.

And, by the way, contracts can't contain ponzis. No matter how many signatures, lawyers, notaries, and PhDs in economics are involved in forging the agreement, TheCodeThatIsLaw is not the law if the code contains a ponzi. That's how the law works. I'm talking about US law (we are talking .com here) but other countries of laws use similar methods of determination.

Re: Thinking About Smart Contract Security

#65
post #59

Help? I have no idea WTF is going on here. I've tried to search around for a clue but the more I read the more confusing it gets. At first it seemed that Ethereum was a kind of cryptocurrency like bitcoin (something that people could "mine" and exchange), then something about "contracts" that don't require trust, then something about it being effectively "a computer" that never stops, an investment system investing i…

A few quick answers: - Ethereum is a contracting language combined with a crypto currency; to run the contracting language requires miners to not only determine the solution to a puzzle (as in Bitcoin), but also to run code written by contract writers in a virtual machine[1]; the blockchain stores the results of these computations There's a lot written on the DAO (just search HN), but a quick summary: - A DAO is an a…

Who is the author of the DAO contract?

Re: Thinking About Smart Contract Security

#66
post #55

Help? I have no idea WTF is going on here. I've tried to search around for a clue but the more I read the more confusing it gets. At first it seemed that Ethereum was a kind of cryptocurrency like bitcoin (something that people could "mine" and exchange), then something about "contracts" that don't require trust, then something about it being effectively "a computer" that never stops, an investment system investing i…

Start with https://github.com/ethereum/wiki/wiki/White-Paper , I guess? http://ethdocs.org/en/latest/ may be helpful.

The second link is the most clear resource I've seen thus far. Thanks!

Re: Thinking About Smart Contract Security

#67
post #65
post #59

Earlier quoted context omitted.

A few quick answers: - Ethereum is a contracting language combined with a crypto currency; to run the contracting language requires miners to not only determine the solution to a puzzle (as in Bitcoin), but also to run code written by contract writers in a virtual machine[1]; the blockchain stores the results of these computations There's a lot written on the DAO (just search HN), but a quick summary: - A DAO is an a…

Who is the author of the DAO contract?

Slock.it, a startup interested in IOT and cryptocurrencies, authored the contract. See the gitblame of the main code here: https://github.com/slockit/DAO/blame/develop/DAO.sol (there are a few other libraries in the repo that have issues as well)

Re: Thinking About Smart Contract Security

#68
post #34

>There will be further bugs, and we will learn further lessons; there will not be a single magic technology that solves everything. Interesting change of attitude! I was just watching a talk[1] from a couple of years ago where Vitalik says "there are a substantial number of applications where you can actually say yes 'I am 99.9 percent certain this is bug free'". Amazing how much a few years of industry practice can…

True at NASA and in many other places that spend 100x as much per line of code, albeit it's more like 95% surety.

Re: Thinking About Smart Contract Security

#69
post #59

Help? I have no idea WTF is going on here. I've tried to search around for a clue but the more I read the more confusing it gets. At first it seemed that Ethereum was a kind of cryptocurrency like bitcoin (something that people could "mine" and exchange), then something about "contracts" that don't require trust, then something about it being effectively "a computer" that never stops, an investment system investing i…

A few quick answers: - Ethereum is a contracting language combined with a crypto currency; to run the contracting language requires miners to not only determine the solution to a puzzle (as in Bitcoin), but also to run code written by contract writers in a virtual machine[1]; the blockchain stores the results of these computations There's a lot written on the DAO (just search HN), but a quick summary: - A DAO is an a…

DAO also has connotations in software architecture which makes this more confusing. What does DAO stand for in this context?

Re: Thinking About Smart Contract Security

#70
post #69
post #59

Earlier quoted context omitted.

A few quick answers: - Ethereum is a contracting language combined with a crypto currency; to run the contracting language requires miners to not only determine the solution to a puzzle (as in Bitcoin), but also to run code written by contract writers in a virtual machine[1]; the blockchain stores the results of these computations There's a lot written on the DAO (just search HN), but a quick summary: - A DAO is an a…

DAO also has connotations in software architecture which makes this more confusing. What does DAO stand for in this context?

Decentralized Autonomous Organization: https://en.wikipedia.org/wiki/Decentralized_autonomous_organ...
Post reply on HN