How could smart contracts actually work (in China)?

A friend of mine sent me an email regarding my post and video yesterday about smart contracts, Ethereum and China:

Regarding China, if you have a smart contract do you get paid automatically or do you still have to have a human being pay you?  If the former, how does the smart contract know that you have done the work?  If the latter, how does it protect you from unscrupulous employers?

A quick backstory, the first person to academically write about this idea was back in the 1990s by Nick Szabo in The Idea of Smart Contracts.  He has since written a number of articles on it (I linked to several here).

We are familiar with computer software that uses/runs/manages/executes nearly all of the financial instruments on electronic stock exchanges.  And how there are various clauses written into them to hedge against (or prevent, or in case of) some type of counterparty risk.  Thus, how to do that with just a normal contract at a normal job or even one that a migrant worker would do?

One way this might work:  Beijing Bob (an employee) would use a public/private digital key to sign a digital contract with his boss Anhui Alice who also uses a public/private digital key to sign it.  Within the contract will be a number of provisions and stipulations regarding payment time periods and clauses that hedge against the possibility that one party does not fulfill their end of the bargain.  Perhaps there will be a clause that says how payment will actually take place: through an escrow service (BTCrow), through Bank X, through address Y, or a mix of different options.  This contract could be stored on a public decentralized cryptoledger (something like Bitcoin or Ethereum).  It is tamper proof / forge proof as it sits there immune from 3rd party interference.  While most people think of Bitcoin as a currency tracking tool, as I described in the video, in arithmetic terms it is more akin to a database that can be used to track any particular dataset as long as it fits within the technical limitations.  It just so happens that the sole data this past four years has been for one particular “token” as represented by an integer on the ledger (e.g., bitcoin).

Signatures and votes

 

because its users must submit a digital key to interact with “the agent” (the ledger).  And that this counts as some kind of direct voting mechanism because the software automatically reacts to it without needing manual correction or input.  And that miners are paid for their work (and they too can vote by turning off their rigs or forking).  Thus, because all of these actions take place in a decentralized autonomous manner the protocol meets the strict definition of a DAO.

 

Now, as of right now, no real decentralized autonomous organization (DAO/DAC) is known to actually exist on a cryptoledger, although there are payroll bots and various software-based HR tools out on the market (Bitpay).  Some analysts claim that Bitcoin itself is a DAO because all of the users technically must submit a digital key which counts as some kind of voting mechanism and miners receive direct compensation for their work — and there is no administrative overhead per se.  Yet, development of the Bitcoin protocol or ecosystem are not handled by direct “votes.”  In fact, just like the cargo cult on Vanuatu dressed up like soldiers with the belief that air cargo planes would return, this is a very superficial way to look at how a company actually works.  In reality, because of how development has become centralized within the Foundation, the current Bitcoin ecosystem is a blend between “shareholder” and “stakeholder” system.  This has potentially problematic management issues long-term as the fiduciary responsibility boundaries are fuzzy due in part to how it is funded (sponsorships).  For example, privacy advocates with the Dark Wallet and ZeroCoin projects would like to move development one way, but the Foundation — and therefore the core developers — moved a different direction.  There was no direct voting mechanism by BTC holders with digital signatures.

What a real DAO would do is actually execute the contract based on pre-agreed to conditions.  If a digital signature counts as a vote, the only way to modify what a DAO would do is to get whatever X amount of votes to approve some kind of execution process (again, this is hardcoded into the program before hand, perhaps some are weighted differently).  To a limited extent, multisignature transactions already work already with Bitcoin itself, although again, you are limited to around 10,000 bytes which would not be enough to fit hundreds of “votes” (Ethereum developers have recognized this limitation in their whitepaper).

For a technical overview of how multisig works, I recommend watching a video explanation by Andreas Antonopolous (Taariq Lewis put together this PPT deck of Andreas’ notes).

Mitigating abuse

While there is a way to change the way the DAO could operate by convincing the rest of those with votes to modify it with their private keys, the original contract would still be left in public view and untampered with.  What could happen is that contract itself would have an nLockTime (time-based) clause or condition that after X amount of time, if certain conditions are not met (for example, payment) then it would then follow some predefined termination clauses.  Perhaps it would send itself to a predefined arbiter or escrow DAO.

While I doubt smart contracts will solve all of the problems on the edges of a cryptonetwork (e.g. “meat space”), it will prevent tampering with the actual contract itself thereby protecting employees (and employers) from trusted 3rd party risks such as fraud.

So in a nutshell, ignoring other aspect of asset management, the following scenario could take place:

Beijing Bob digitally signs a smart contract with Anhui Alice stipulating various expectations, terms of compensation, etc.  This contract stipulates that payment will go through various channels each month, however if there is a breach of contract it will end up with Cathy’s escrow service (which itself could be an independent DAO).  In fact, there will very likely be several virtual escrow services that need to maintain a good, honest reputation to do business (just as they do today).  Furthermore, there will likely be a dispute mediation clause regarding independent arbitration if all else fails (just like today).  By ‘all else fails,’ I mean there will be a time-based trigger: if neither Bob nor Alice both re-sign clause B, C or D by a specific time in the contract located on the ledger, the contract is sent to Dan the mediator/arbiter.  Dan could, like an independent escrow service, be chosen from a list of known reputable arbiters who face similar market conditions to provide unbiased service (Judge.me is a type of service like this).

These type of default-based relationships and contractual stipulations take place today and while it may be difficult to initially “codify” them into software, it is likely just a matter of time.

At the same time, there are some uncertainties and legal risks which vary depending on jurisdictions.  In China, ignoring the Party apparatus, it is hard to speculate how the various townships, counties, municipalities, provinces and the central government itself will recognize this type of ledger-based asset management.  Twenty years, most Western commentators believed that the internet would empower the average Chinese resident to maneuver around censorship, but the GFW has proven very capable of stemming the flow of all information. 1 While it would be difficult for them to block such decentralized peer-to-peer activity perhaps each government layer will instead want a small piece of the transaction and only recognize smart contracts that go through specific government-run DAOs or use government-run escrow and arbiter services.


  1. I was directly impacted every day for 5 years there, the GFW is very effective for the most part.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top