so where does one draw the line between theft and just doing what the code allows? I wonder in the future crypto courts is the defense, "your honor, the code allowed me to call initialize again, they specifically didn't set it to true." going to fly? Or will you have to prove that the 10 mil you now have was intended to be given to you and your "victim" isn't a victim at all.
> so where does one draw the line between theft and just doing what the code allows?
This is the heart of the problem with smart contracts. The theory is that the code is the law. There is no theft. There is no need to trust, authority, or arbitration.
Of course, this only works when the smart contracts perfectly meet a correctly defined spec and have no bugs.
Code is law applies at least to the flow of money - unlike USD, the court can’t do something like garnish your wages to pay back a 10M settlement by taking some crypto out of your incoming transactions, both due to the anonymity and cryptographic parts of the concept. Of course, they could simply throw you in jail (civil contempt of court), but you still keep your money in that scenario.
Comments like this make me think we software engineers live in a different world.
>unlike USD, the court can’t do something like garnish your wages to pay back a 10M settlement by taking some crypto out of your incoming transactions
You think so, do you? "The law is the because that's what the law says it is". It might not be possible now (and I'm not sure I believe that, you can garnish foreign wages) but it will be if the need arises.
"But the code" yeah, no, that's a silly argument that only applies to cyberspace and not the physical world you occupy
It's 'legally' possible in that the court can say that you have to pay back some amount of crypto or some amount of USD, but with crypto it's not something that they can enforce in reality if the debtor doesn't cooperate. I'm saying the court can't force incoming transactions to be 60/40 split with 40% going to a different party, and the anonymity part of crypto means you can create a new wallet whenever you want to get paid without the court even knowing that you are receiving crypto as payment.
> and the anonymity part of crypto means you can create a new wallet whenever you want to get paid without the court even knowing that you are receiving crypto as payment.
Yeah, and if you get paid in cash you can keep it secret to.
OTOH, if your lifestyle reveals you have access go and are spending funds and not making required payments, courts can impose other consequences, up to and including imprisonment. But usually, seizing and selling off physical or reachable intangible property would be the first way to handle monetary debts. And, sure, crypto itself may be easy to conceal, but if you can’t use it to acquire anything tangible without sacrificing the safety, is it really usefully safe?
“garnishee” is the noun for the person subject to the garnishment (that is, the person owing/controlling money to/of the debtor whose held funds or payments are redirected from the debtor to the creditor); the verb for imposing the garnishment is “garnish”, and in the past tense “garnished” not “garnisheed”.
my reading of the code is law idea is that the code determines what is possible in the system, in this theory you can say that the law which code represents in more ironclad than most laws (at least common law) however this reading, which I thought was the default one, does not take into account bugs occurring in code or that people may not have thought rigorously enough to prevent people from doing not what the law intends but also what the code allows.
That's not enough, all parties would have to have 100% awareness and understanding of the smart contract, detail by detail.
Real life contracts sometimes turn out to have non-enforceable clauses within our legal framework, or may be entirely invalid if, for example, signed under pressure or false pretense.
Imagine if Goldman Sachs did this. A judge can say "look, you can follow our rules or we start seizing assets etc".
And when you're sitting around trying to be anonymous, well... you're doing everything on a public ledger, so now you're extremely restricted.
Hell, courts/legislative bodies could even go down the "force all miners within their jurisdiction to rollback an unwanted transaction". You think miners care enough to make a stand on this kind of stuff?
Unless you're going to like.... download your consciousness onto the blockchain you are still just as liable to being told by a court what to do as anything else.
Judges have tremendous amounts of discretionary power when carrying out the law, and a good judge certainly isn't going to just give up because the identity of one party isn't immediately known. The example already given of ordering that the transaction be reversed on the network (even if that involves compelling uninvolved people to cooperate with the process) is entirely plausible.
Are judges going to manage to identify and compel enough miners (or devs, i guess, assuming the miners adopt the compelled transaction revert version) to have enough hash power to win a fork?
this could easily be combined with legislation providing tools to make it harder and harder to participate in mining off-fork.
US financial laws have been very useful for the gov't to be able to de facto give it worldwide jurisdiction in some areas, I think there would be relatively few qualms about continuing down this path. Especially if (for example) Robinhood and Coinbase were forced to follow along. At one point the "blessed" thing will become the only place you can really operate.
For example, the court could declare that this transaction was illegal, and anything spent from it is also illegal forever. The ledger is open, so courts can compel exchanges to watch for such transactions and report anyone that can spend coins derived from them (exchanges have already been forced to comply with KYC).
This would destroy the real-world value of this block, basically making it a digital equivalent of dirty money.
The power of the court to 'right' the 'wrong' (e.g. by reversing transactions) is limited on a decentralized public blockchain governed by pure code that crosses national borders. This strengthens the position "the code is the law".
On the other hand, this feature is a motivation for centralists to take issues with public decentralized blockchains.
Except it's not, really, because a judge who's unhappy at it isn't going to care about "the code is the law" talk. They're just going to tell people to fix it or else, and all being in another country usually means is that the asset seizures will take longer.
>because a judge who's unhappy at it isn't going to care about "the code is the law" talk.
in my experience if you ever tried to tell a judge the code is the law you will be in for a world of hurt. Hope they don't read about it elsewhere either.
on edit: obviously in agreement with parent, just noting that the very concept of the code is the law introduced to a judge is going to elicit some very negative reactions.
How are they practically going to find the defendant? On a public blockchain, you can't always put a name or face to an address. The tokens in question can change hands many times and make it hard to trace identity.
>The theory is that the code is the law. There is no theft.
What rubbish. You cannot claim "the computer let me do it" and expect to be let off for that. That's an extreme absurdity and is absolutely not how the law works.
Contrary to what a lot of people seem to think: Crypto is not "outside" the law in any way. It is a token of value (like FIAT currency) and there are plenty of laws that cover use cases from capital gains taxes to money laundering to, you guessed it, theft.
> Of course, this only works when the smart contracts perfectly meet a correctly defined spec and have no bugs.
In practice, if using a smart contract as a contract, the way you'd use a paper contract, then two parties would sit down and negotiate; draft the negotiated agreement into the form of a smart contract; and then agree (signatures, handshake, multi-sig deployment, whatever) that "what the smart contract does — as executed by the network-consensus abstract machine — is our explicit mutual intent, and damn any statement by either of us to the contrary."
This is the same thing you're doing with a paper contract: by both signing it, you're agreeing that "what the paper contract says — as interpreted by a judge — is our explicit mutual intent, and damn any statement by either of us to the contrary."
Of course, nobody's actually using smart contracts as contracts. They're just using them as trusts/agents. For now.
But a smart contract used as a contract wouldn't have "bugs." It's a negotiated agreement; negotiated agreements have loopholes. And loopholes are perfectly legal. If you left one in, and your counterparty exploits it? Too bad for you. You should have run your contract through a better (code) lawyer.
Signing a paper contract doesn't mean you're bound to any bad thing that happens because of it for life. If a smart contract is so strict that eg it can be against public policy then it's not a real contract.
Note that in my above statement, the "network-consensus abstract machine" is the same kind of thing as "a judge": namely, both an arbitrator, and an official that declares certain clauses objectively void even if both parties like them.
See also: the DAO hard-fork that created Ethereum Classic.
Except it's not the same kind of thing, because an actual judge has legal power. Your abstract machine is going to be sidelined pretty quickly if a judge decides it's doing something illegal or unconscionable and issues injunctions to that effect.
I meant that the abstract machine's behavior is dictated by the legislation of the "society" of node operators, in the same way that the judge's behavior is dictated by the legislation of the society you live in. They're both appointed arbiters. And they've both got the responsibility of enforcing, among other things, certain 'inalienable rights' — i.e. making certain contracts (or certain legal motions based on the wording of a contract) invalid, if they would be greatly damaging to one party in a way deemed unacceptable to "society."
> if a judge decides it's doing something illegal or unconscionable and issues injunctions to that effect
A judge can't tell a distributed network that has equal presence in countries with mutually-antagonistic economies what to do. They can at most ban the network's nodes from being operated in their country — but people in that country can still continue to use the network through a VPN.
Think of it like offshore gambling, except that it's 'offshore' respective to every country on Earth, and there's nowhere a sufficiently-motivated Navy can send a bunch of boats to shoot at it, either.
Much of the economic value of blockchains comes from the fact that they allow private citizens of countries that have no trade/treaty compatibility (e.g. countries actively at war with one-another), to have a basis for trust allowing them to enter into contracts with one-another. The basis for this trust is the virtual 'overlay' legal framework of "whatever the software the majority of node operators decide to install says, goes."
Of course, if you and I are both in America, and we enter into a smart-contract contract, then we're also entering into a civil legal contract evidenced by that smart contract (just like we're entering into a legal contract if we make a verbal "handshake agreement.")
But if we have a compatible legal framework to operate in, that grants our contract as valid†, then why would we even need a blockchain?
† (A common reason to not grant a civil contract as valid: because it's a contract for purchase of illegal goods. In such cases, you don't have a compatible legal framework to operate in, even if you're operating in the same country.)
> A judge can't tell a distributed network that has equal presence in countries with mutually-antagonistic economies what to do. They can at most ban the network's nodes from being operated in their country — but people in that country can still continue to use the network through a VPN.
The distributed network is to some degree a red herring here: in most cases, an unhappy judge would be issuing orders compelling behaviors from specific people (e.g. "you're going to send that $10M back to the person who had it"), and if that contradicts the code, too bad - do it some other way.
> Think of it like offshore gambling, except that it's 'offshore' respective to every country on Earth
Except it's not: if you're in Iraq and I'm in Brazil and we enter into a contract (as would be legally understood in either or both countries), we are now in a contract under the jurisdictions of both countries.
Even being literally "offshore" doesn't really matter: almost every country will claim jurisdiction over its own citizens if they're not already under the jurisdiction of some other nation (by way of being on a ship registered under that nation's flag). You can't actually escape the law just by going out into the middle of the ocean.
> in most cases, an unhappy judge would be issuing orders compelling behaviors from specific people
I'm presuming here that the unhappy judge is on the other end, is the thing. There's no judge local to the person “in the wrong” who actually has cause to go after them. Only the judge in the other country does.
If I'm in Iraq and you're in Brazil, and I rip you off, and you have no idea who I am because I'm just some pseudonym on a darknet market, then sure, a Brazilian judge can write an order for "me" to pay the money back... but how are they ever going to enforce that? They don't even know who "I" am.
Let's say they at least know where I am (Iraq.) In a compatible-legal-frameworks situation, your judge could get an arrest warrant out, and nudge my country's police to try to do some ISP PRISM-ing to figure out who I am. Then your judge could try to get me extradited to Brazil to be tried.
But if Iraq and Brazil aren't on "good buddies who treat one-another's warrants in good faith" terms... then what's your judge going to do?
(To put this another way: if Edward Snowden ripped a bunch of private US citizens off before heading to Russia/Switzerland/wherever, would he have been any more likely to have been extradited sooner?)
> if you're in Iraq and I'm in Brazil and we enter into a contract (as would be legally understood in either or both countries), we are now in a contract under the jurisdictions of both countries.
In the case of actual offshore casinos, if you lose money to another person, you don't owe them money, because you never interacted with them directly. You played a game together; but while doing so, what was technically, legally happening was that you were interacting with the casino, and they were interacting with the casino. So, if anyone owes anyone money, then it's the casino that you owe money; and, separately, it's the casino that owes them money. (This is a large part of why casinos get you to trade your cash in for tokens, and then play games using the tokens. Everything that happens with the tokens, is "you interacting with the casino.")
You see this dynamic domestically in the form of e.g. car insurance. If you rear-end someone, you don't owe that person money. You owe your insurance provider money; your insurance provider owes their insurance provider money; and their insurance provider owes them money. Usually all different amounts! Because those are three different contractual agreements, being settled separately.
While it’s not necessarily the case that this is the body of case-law that would pertain if you send Dogecoin to someone in another country through your mutual memberships in some DEx, it’s not not necessarily the case, either.
—————
I think we’re getting off-track here, though. My original point wasn’t that a judge would be replaced by a network-consensus abstract machine. It’s that a network-consensus abstract machine is a valid replacement good for a judge, when you don’t have any compatible legal framework through which to access a judge. This is the good people are paying for when they pay crypto transaction fees: this fake robot judge, that—while worse than a real judge in almost all respects—is at least better than the nothing (i.e. the “send Western Union and pray your counterparty isn’t a Nigerian prince”) you get by default in international civil/contract-law dispute scenarios.
I mean, I agree with that, but I don't think having to restart the entire financial system or get 51% approval to edit any existing program is a good way to deal with problems like this.
It's slightly different than what you describe, because the parallel contract is an actual contract: a written and binding agreement between multiple parties, which explicitly grants consent for some bit of software to govern a given business arrangement.
Most "smart contracts" aren't Ricardian contracts, though, they're just chunks of software running on a blockchain.
They probably should be though, because contract law applies to business whether a specific legal contract is drafted or not, and no, that implicit contract doesn't say "whatever the software does is fine".
The legal system isn't a computer that implements the law strictly to the letter based on only factual information. There are "reasonable person" standards, allowance/tolerance for mistakes, etc.
Relevant to this discussion is rules covering mistaken deposits to a bank account: recipients are obliged to return the assets, not shrug their shoulders and use the cash while they proclaim "Bank's fault; they're responsible!"
Nobody can predict the future of how business will get done years down the road, but I think Smart Contracts can potentially utilize both Oracles (systems like Chainlink) to provide objective data about the world for triggering Smart Contract logic, and Arbitration systems (something along the lines of Kleros) for humans to make subjective judgements about human concepts like "reasonableness" in contracts.
A very contrived example. Say a Smart Contract exists for a contractor to paint a boat cornflower blue and then get paid when the job is done, but the Oracle system says that the contractor messed up and painted it sky blue. It can be part of the Smart Contract in the event of some error that it can go to arbitration to some pre-agreed-to subject matter experts that both sides agreed to beforehand for a quick and reasonable resolution or fee.
This kind of thing can be planned for and made standard in smart contracts. It'll only happen if it saves businesses more time and money than it costs though, and many other question marks will be involved. I think it's very exciting conceptually though.
But if a bug allows you to delete the contract. It’s useless. In the real world, a contract exists unless all parties agrees it doesn’t. A “loophole” won’t cause money to be removed from escrow unilaterally.
A very major part of that decision was because the payment was not reasonably assumed to be a mistake. Obviously that argument isn't going to work here.
All exploits are technically some version of “just doing what the code allows”, I don’t see how that would change whether or not a hack/theft actually occurred.
At that point, why have the smart contract? If you want 'automation', just get a trustworthy third party to execute the financials for you , as is already done with (for example) most real estate contracts.
Why have smart contracts indeed, if executing the code in the contract is called a "hack." Perhaps in the case in the article a trusted third party would have been superior and there wouldn't be $10M missing.
Where big money is at stake most sensible judges will, or will /try/ to, look behind absolutist language in a contract (be it smart or not). Courts are very good at looking at contracts and asking what the parties intent was. They will ask things like "was it intended not to initialize this function?" They may then answer the question with, "No of course not, it was a bug. The person exploiting that bug knew that and cannot reap the benefit". Maybe, or maybe not: trying to guess what a judge will say is a mugs game, but my point is that saying it's a smart contract not operated humans renders it "Absolute Code-as-law" one can't interfere with is unlikely to fly.
I think smart contracts are meant to automate the work behind contracts/agreements, but if someone hacks you, well, they did something illegal and you can sue?
I think the question is: Why then deal with all those inefficiencies and cost of distributed computation, mining, and broadcast transactions, if you need courts to override decisions anyway, and insurance to cover yourself when something goes wrong? You can already "automate" without smart contracts.
I share the general skepticism, but I am open to the idea that (much like other electronic commerce), the smart contracts might make 99% of transactions much more efficient; so the expensive manual interventions are only used on a small proportion.
Of course, it is not necessarily obvious that blockchain-powered smart contracts are the only way — or the best way — to achieve that automation and efficiency!
> the smart contracts might make 99% of transactions much more efficient
The entire point of proof-of-work is that it is inefficient, by design. Efficiency is counteracted: Advances in technology that lead to more efficient mining techniques directly mean the difficulty for the next block being adjusted up.
Operating on traditional databases (where automation is regularly implemented, too) is orders of magnitude more efficient. Because like most other things other than proof-of-work, those processes directly benefit from getting more efficient.
PoW wasn't designed to be more efficient, the Nakamoto consensus type implementation exists to improve honesty and security. There is no traditional database that's as secure as a blockchain, it's always a tradeoff between security/immutability and efficiency. But since efficiency does matter many 2nd generation chains have moved away from PoW.
I think the way to look at is that, smart contracts are not behind the contracts/agreements, smart contracts are the contracts/agreements. Once you realize that, if a smart contract executed successfully then the operation was legitimate.
Of course, ethereum forked when a big hack happened, but it won't be forking for every hack, otherwise it's not really a reliable blockchain.
A smart contract can't actually be the contract (and may end up not even vaguely correspond to the resulting situation in the real world) because the legal system alters or voids contracts all the time. A judge who decides that your smart contract has an unconscionable clause isn't going to care about what you say about immutable code - he's going to tell you to fix it in the real world or else.
How do you get rid of courts? Do you imagine an alternate reality where existing regulations do not and can not apply? Because I'd recommend continuing to imagine.
I think that's the wrong question. If a court can decide (and enforce) what a smart contract "really means", then smart contracts don't really bring much to the table. It doesn't matter what the court would actually decide.
The main thing smart contracts bring to the table is a mechanism of enforcing contracts without government involvement or control. The contract gets enforced, period. The parties can be anonymous, it doesn't matter which country they're from, and so on.
If a court can decide/enforce what a smart contract "really means", then the smart contract still decides who has possession of the related assets before the courts get involved. That's for ill or for good. Anyone who wants to get the courts involved has to care enough about changing the status quo to pay for a lawsuit. Changing what the status quo is, before the lawsuit, changes the balance of power.
Automation is valuable in itself. Imagine a system of thousands of smart contracts interacting with each other millions of times a second. No court system is (currently) equipped to deal with that except in the most superficial way.
It may depend on a legal system in a country but I think 'Or will you have to prove that the 10 mil you now have was intended to be given to you and your "victim" isn't a victim at all' is more likely. For instance there were cases,where ATMs dispensed stupid amounts of money because of some error. People would normally be found guilty if they take the money that technically isn't theirs.
Proponents of Ethereum will say that smart contracts obviate the need for courts. I don't think this sort of Ethereum bug/hack thing has ever shown up in the court system yet. I'm sure someone will bring a case if they know who did it. If gaining access to someone's system using default credentials or no credentials is a violation of the CFAA then I'm sure this is as well.
In the future I think smart contracts will be standardized - these kinds of things won’t happen unless you’re trying something new. If that’s the case there will probably be services/testnets to properly vet it before launching on a mainnet.
> these kinds of things won’t happen unless you’re trying something new.
Unfortunately, that's probably not going to be what occurs. Even today, there are constantly bugs discovered and fixed, some critical, that have been latent in systems for decades - as in since the last century.
The recent FragAttacks against WiFi systems come to mind.
A bug-free version of ProfitSharingRewardPool is much more plausible than a bug-free version of WiFi, or SSL, because the former is less than 1000 lines of code and apparently had an unintended $10M bug bounty.
We were dicussing errors in smart contracts not just errors specific to ProfitSharingRewardPool. Your comment is correct about ProfitSharingRewardPool but is incorrect about smart contracts. That goes to show that errors happen all the time.
if it went to court, i am guessing presuambly under a plea deal the hacker would be required give back all or most of the crpyto to rectify the 'mistake;' if not, it would prove intent to steal . For example, there is the 2005 Sammy MySpace XSS incident. Technically, his code was interpreted by Myspace as valid CSS/html, but was still guilty due to intent.
This explanation, much like its sibling "voluntary transaction" defense of market failures and economic coercion, sounds to me like a bully who hits their victim with their own arm, and then exclaims, "stop punching yourself!".
If the person who lost the money had to use smart contracts, you've got a point. If they used them because they thought they were a good idea, I hope they learned their lesson.
Agreed, but the crypto crowd wants smart contracts to be ultimately used by everyone, which means (in their hypothetical world, which I hope never materializes) many if not most uses will be of the "had to use" kind.