Yes, someone will have a use case where this can't do (obscure thing) nobody really needs to do. The way to design this is to try to express common contract forms - buying, selling, lending, renting, betting, derivatives - and make sure you have the expressive power for that. Then stop.
A decision table would be an improvement over some current written contracts. A friend once asked me to read over a complex currency swap derivative contract, written in English and I found a clause that was the opposite of what it should have been.
(And no, layering another language layer on top of the byte code, and a proof system on top of that, is not the answer.)
Presumably because paper contracts don't scale; nor do they arbitrate machine:machine interactions without human proxies on both sides.
But one nice thing about contracts (the objects of civil law) is that the state doesn't actually get involved in them except in the breach. You can create as many contracts as you like, as often as you like, with whomever you like, without any sort of filing cost or delay, and they will require no resources to maintain until someone on one side or the other thinks the contract has been violated.
I can't imagine the same being true if all contracts essentially worked like deeds, having to be notarized and filed at a government office (even if electronically) to have force, and needing to pay upkeep fees to keep them filed there lest their force lapse.
Also: a blockchain is nice because it allows people in different sovereign jurisdictions to create a contract. There's no legal contract I can make, as a US citizen, with e.g. a Cuban or Iranian citizen. But I can transact with them through a smart contract.
> already has it that a contract does not have to written down to exist so if you're pretty sure things are going to go well - say mowing the lawn, you can go ahead and just enter the contract with nothing written down
Yeah, but there's a reason people do write contracts down rather than... not doing that, when they want to actually have them be enforced in the breach.
Personally, I don't even really want smart contracts to "do" anything on their own; all they would need to be useful is to be predicates—executable code running on a distributed computer that automatically detects a breach of contract, so that legal measures can be taken. That, by itself, is much more useful than a regular two-party written contract that devolves into "burn down their office to get out of the contract", or the regular three-party (you, them, a lawyer) written contract that costs $500/hr to facilitate.
Without any middleman, this doesn't work, because the parties are in a prisoner's dilemma, rather than an iterated prisoner's dilemma—nobody can effectively punish the other party in a future transaction, so there's no incentive to not screw the other party over.
Without smart contracts, what you need here is a "marketplace owner"—a legal agent where both sides have a legal agreement with them. This changes the situation so both sides are playing an iterated prisoner's dilemma with the marketplace owner, who can punish a user on either side for what they did to a user on the other side in a previous one-off transaction.
But this marketplace-owner role is also known as a "middle man." Their role in punishing defection is valuable enough that the market doesn't disappear if they extract rent from both sides—and so they usually do. Ideally, we would have an alternative where everything still works out, but where rent cannot be extracted.
With smart contracts, the marketplace-owner role is performed by, essentially, the buyers and sellers all automatically voting on whether a given transaction was legitimate. The smart contract is just the specification both sides have agreed to, in a given case, for judging the legitimacy of a transaction; and the blockchain is just a database which all parties doing this auditing synchronize amongst themselves, containing copies of both 1. those specifications, and 2. all the data required to validate any new transaction against them (which, in the case of a ledger-like transaction, is usually "all the valid transactions executed so far").
There still needs to be a human-level legal recourse for disputes—but those disputes would only ever be disputes about the specification of transactional legitimacy being wrongly specified, which are much rarer than disputes of the form of "he defected!"/"no I didn't!", to the point that the service of arbitrating such disputes would not be seen, at a human level, as valuable enough to justify rent-extraction.
Don’t we already have this? Street markets and retail shops and one off websites and millions of other agents making up modern markets? It seems to work fine.
In cities with police forces. Purchases at street-markets don't devolve into robbery because police forces disincentivize that. The municipality taxes you for that service, and so is effectively a middleman and rent extractor for these transactions.
Also, in cases where you've decided to trade using cash rather than to barter, you're being protected from your counterparty paying with counterfeit currency, by the state coming down rather harshly on counterfeiters, keeping counterfeit currency out of the market. That's a service they provide in exchange for state-level taxes. So, another middleman and rent extractor in your transaction.
> one off websites
When this works, it's because the payment processor (Stripe, PayPal) is acting as the middleman and rent-extractor.
Even without a payment processor, you can usually seek redress from your credit card company (another middleman and rent-extractor.)
Also, a search engine probably acted as a matchmaking agent to lead you to reputable services (and so is also acting as a rent-extractor in a round-about way, with sponsored ads and such.)
Without these parties in play, the Internet is not a safe place to transact. 99.99% of credit card input forms on the internet (by volume) are those of phishing domains. That's what a non-iterated prisoner's dilemma looks like.
The state, or any actor for that matter, can fill multiple roles in a transaction. Intermediating all transactions is a bad role for any actor to be in (from every other actor's perspective), because it's one prone to rent-extraction. Any time you hand money over to a second party through a third party, humans have enshrined the logic that the third party—if it's big and powerful enough—can demand a cut of that transaction.
In all the cases I mentioned, the rent that is being extracted is a cut of all regular transactions. Sales tax / VAT is rent; credit card fees are rent; payment-processor fees are rent; and all of these are percentages. That is why states, credit card companies, and payment processors all have billion- (or trillion-)dollar budgets.
Imagine we eliminate that intermediation. Transactions flow directly between buyer to seller, with nobody able to take a percentile cut of them. No rent is extracted from the original transaction.
Now, in the case where a transaction doesn't go well, we do still want some actor to arbitrate disputes over a transaction. But, given the way legal systems work, it's entirely possible to do that arbitration after the fact. That is the whole idea of civil court, after all.
Such arbitrations usually result in the need for a recompensatory transaction (i.e. a lien); and such transactions need to be intermediated (i.e. supervised) by a third-party, since the two parties have already proven that they aren't mutually trustworthy. So there is a transaction here from which you probably can't stop rent from being extracted.
But that's okay! Disputes happen very rarely, while regular transactions happen all the time. The total cut of small-claims court, probate court, etc. fees, is way smaller than the total revenue of sales tax. The total amount paid to retain an arbitration service, is way smaller than the total amount earned by operating an escrow service. Etc.
The state is essential! It just doesn't belong between two people. It belongs waiting behind two people, acting as the exception-handler which one or both parties run to to report the transaction as having failed from their perspective. Then the state can step in. Much less work for the state; but also, much less rent to extract.
What does this mean?
Replace 'hackers' with 'lawyers' or 'accountants' and that's already true in our present system.
“Technicalities” in general are a lot less of a thing than TV shows would lead you to believe
The common moniker to9 not take a contract verbatim is not codified in law as such, I guess. And if it were, it would be ironically self defeating. I don't know US Law precisely, but Germany has BGB § 242 Leistung nach Treu und Glauben - liability by trust and obligation (with respect to the customs of trade).
Translating this title shows how deep the connection runs. "The spirit of the law" as you imply strikes me as something coined at least in roman times if not koine or older. The law is actually very strongly exploiting misunderstandings. The ruling theme is still that vulgar language is wrong, the obligation to interpret code is on the subjects and it is satisfied by the availability and ability of lawyers. The exploitation is giving the judicial branch an advantage that is unfair to the point that lawyers are likened to devils. The downside is that it gives lawyers (including judges) a hard time as well.
The problem with smart contracts remains the same, that limit on expressiveness extends to computer code, that cannot express questions of morality any better.
Automated transactions may have useful applications, but seeking fairness is not one of them.
The way programmatic code can improve on it by automated tools is burdened with the same level of complexity, if not higher than Natural Language. But Smart Contracts are, as the name implies, intended to be used for small, manageable bits of code. Never mind codes that are too big to handle for a single person, bugs from a single typo for example could still happen. There's simply two sides to that. Either strict enforcement is thought to promote improvements in code quality. Or lenient apologies hope to promote amicable values, as far as trust is concerned, e.g. if due diligence also implies to inform whether a likely mistake was intended or not.
If the other party knew of the mistake that may be a "Versteckter Einigungsmangel" (covered up, hidden; Agreement; lack of, deficiency - hidden deficiency of agreement). In that sense no smart contract would be enforcable, because the conscious decision is deferred - post hoc ergo propter hoc.
The deciding difference is, if there's an automatic arbitrage bot for example, and it's not aware of the mistake, the creator has no liability to check for mistakes, I suppose. Whereas if exploits are targeted at buggy programs, that's a different matter.
The deciding factor would be the custom of the trade. Custom comes from costume. So if a foolish script kiddy exploits a huge bank they will suit up and claim higher right from custom. Vice versa, a kid exploited by automatic gambling bots e.g. will be blamed for wearing a suit to big for it's size. /s
Furthermore, some areas of law seem more open to "Technicalities" than others. It's hard to believe that tax structures like https://www.investopedia.com/terms/d/double-irish-with-a-dut... were part of the intent of the law, though they are compatible with the word of it. The difference between avoidance and evasion often rests on a technicality.
Finding ways to subvert the intent whilst remaining within the 'rules', is the very essence of hacking. No one said the username input couldn't contain an SQL statement?