Hacker News new | ask | show | jobs
by masklinn 1601 days ago
> this made me realize I wasn’t aware of what smart contracts really were (just looked up solidity today and details of The DAO hack). The potential for irreversible losses, fraud and security holes are much bigger than I realized.

That seemed obvious from the first time I read the expression "code is law".

If code is law, any bug (whether in the contract itself or in the way the contract is called) fucks you irredeemably and with no recourse. I would expect any dev to shit their pants at the idea, even more so upon realising that the code in question is a half-assed brain damaged cousin of javascript, of all thing.

5 comments

It also cannot be a legal basis for anything, because the law doesn't treat the right or ability to enter in to contracts as an absolute. Think minors, wards, power of attorney.

Contract law is one of the more mechanistic parts of the legal system, but only up to a point. There are good reasons the legal profession - even corporate law - tends to attract a different set of personality traits to software development.

there's also the concept of a contract itself being invalid even if people have some right to enter it.

E.g. if you sign a contract while hanging off a cliff to give some dude all your assets in exchange for being pulled up, it is invalid in my jurisdiction.

Or if the people signing the contracts did not actually understand what they were signing it can be considered invalid (which would be akin to the mess in TFA).

Contracts are better left to people, rather then computers.

In Roman Law a contract requires consent, which cannot be forced, https://www.lawteacher.net/free-law-essays/contract-law/cont...

So it's not just your jurisdiction, it's probably at least half of the entire world and I imagine even systems not based on Roman Law have something equivalent.

Especially in that real law is left for judges to interpret, and that's a deliberate feature to allow "wiggle" room.
Juries are the ultimate arbiter of law application. For this very reason.
In jurisdictions with juries. It's judges, otherwise.
Even encryption algorithms proven correct later turned out to be critically flawed.

The legal system is such a quagmire because figuring out what is "right" in all scenarios is anything but obvious. That's how we end up with laws we don't enforce and technical legal behavior that will still get you into trouble. But what's the alternative? Robot justices? No thanks.

If the complexity is in the nature of the problem, then smart contracts must contain all of this complexity. But how can you ever write smart contracts that are bug free and deal with every contingency?

Instead of making systems that are buggy, cold, and unforgiving we should be making systems that are more tolerant of human mistakes.

When I saw the phrase "code is law" I immediately thought of all the code I've written in my life, and I'm not even the very worst coder out there...
That is a feature if you plan to hack it