[Keynote speech] How Smart contracts can drive change in the economic system #NickSzabo
Korea Blockchain Week·Wed, Oct 21, 2020, 12:00 AM
Transcript
[Music] annyeonghaseyo good morning Sol I'm going to talk about smart contracts and their economic potential and give perhaps a little broader different view of smart contracts than then normally is given so you can think of society as consisting of multiple layers rather like a house you can think of as having a foundation and on that foundation is built structure like structure of wood or steel and on that structure are built walls and floors and finally there's paint and windows and other things to go on that and so you can think of it as layers protocol stacks you can also think of networking protocols as layers and so that's the analogy I'm making here to society at the basic foundation we start with security without security you can have very little in the way of good law and without good law you can have very little in the way of Commerce and so that's all built on the basic foundation of security so that's where I'm going to start and without security there's not much lower commerce and security can we can and should be really broadly defined to be trust to minimize in other words vulnerability minimized any any party whether it's a third party an attacker an insider and outsider each party to a smart contract for example trust minimization means minimizing the vulnerability of parties to each other and to third parties very broadly and in general it applies to all features of your product it's not just I locked the door and that's my security all all the features of your product can be more or less secure more or less trust minimized and so computer science and the progress that has happened in the last century in the first decade of this century has given us this huge computational surplus and a great set of protocols and capabilities for creating this security in a new and more comprehensive way in cyberspace and that new continent that the last speaker talked about and so it's more important to reduce social costs and mental transaction costs than it is to reduce machine costs and that's in fact that the trade-off Bitcoin makes it has proof-of-work it has sense messages all over the world it keeps tens of thousands of copies all over the world all in the pursuit of trust minimization and having the most secure store value a medium wealth transfer ever invented and so that that's really why bitcoin has the 70% market cap that it has is it's focused on the foundation it's focused on getting the basics right and that allows you to be globally seamless so when a bunch of us in the 90s we had a live mailing list called lib Tech where we discussed and came up with many of these ideas we had some ambitious libertarian problems how to privatize money and how to non-violently protect property and enforce as a standard term but but in smart contract terms that means incentivize the performance of contracts and so if you okay so that's where the ideas of smart contracts and blockchains and cryptocurrency came out of that kind of brainstorming and dreaming and thinking and so if you take computer science if you take Byzantine consensus as what we were working with the 90s Satoshi Nakamoto came up with Nakamoto consensus using proof of work which is a big improvement on that you apply that computer science now all of a sudden the security that in the paper world and in the centralized digital world which is a kind of naive transposition the digital world of what was on paper involves a lot of accountants lawyers government officials police investigators and so forth and so it's very local it's based on politics and we can cut the Gordian knot of that and replace that for very simple purposes such as money and smart contracts which I'll talk about with blockchains and so now I'm going to pop up now that we've got talked about the secure foundations I'm going to pop up and talk about the rules and incentives to follow those rules that can be built on top of that now and I'll give a comparison of wet code versus dry code later in the talk but right now what what a basic methodology that has inspired me that a lot of what I'm going to show you is based on is reverse engineering design patterns from traditional law from wet code to dry code from the legal legal rules in the traditional legal system to software and so these are battle tested rules they've evolved over many hundreds of years and countless numbers of disputes and there's a book called a pattern language it was very famous about architectural patterns and so you can also think of legal patterns people have tried to come up with software patterns those have not proved to be so persistent they're not as highly evolved yet and so in this reverse engineering I'm going to talk about what you would learn in the first year of law school and what we're pursuing the 90s and trying to make the security independent of of government which in judicial system forces or not so property is the oldest form of law in fact if you look at the evolution of governments and stuff they came out of property law contracts are the most useful for commerce and a big part of the Industrial Revolution and subsequent economic development that has brought the world out of poverty and related to contract secured transactions things with collateral hypothecation and so forth and of course corporate law and related to that constitutional law and so smart contracts draws their inspiration from traditional contracts this is a really good back in the early and late Middle Ages when Europe was just starting to write down contracts there very simple to the point and follow them and they make great they they give you the core the essence of what they're trying to accomplish in a page or two and they're really great for learning what the essence of a contract is and then using that to reverse engineer into a smart contract and since it's a the foundation of our society sitting right on top of security and it's something you can do it's it's an area where you write your own laws or you and the person you're negotiating with write your own laws and in the case of smart contracts write your own smart contract rules and so why do we do that well when we're building things providing services it requires combining diverse people and objects into value producing combinations and that means doing deals so Alice and Bob both want a deal that will make them both better off even though they may be strategically combat of with each other they may not trust each other very far and again trust minimization is a real theme that goes goes throughout these things doing deals or cars laying down rules that participants are motivated to follow and so as a comparison between wet code and dry code here and and kind of give you a flavor what smart contracts are trying to accomplish imagine the reverse let's take a vending machine which I would call the great grandmother of all smart contracts and let's try to try to do that in traditional law so if you got a lawyer to write out what what a vending machine does if the party of the first puts in two five cent coins for said party gets a soda if party puts in a 10-cent coin party gets a soda if they put in a 25 cent coin they get back a soda a 5 cent coin and a 10 cent coin and so you can see this would be very tedious for the lawyer to write down it would be subject to all sorts of hassle and legal dispute and so it's much simpler to program this behavior into a machine and that's in fact what we've done with vending machines and so smart contracts takes modern computer science and the much much greater computational capabilities we have now and does that for a much wider broad stretch of things and especially low-hanging fruit financial contracts which I will talk about so smart contracts are a security protocol that changed control over things conditional on states of the world and on performance of obligations and so states of the world and performance of obligations you can think of these in the lingo as two kinds of Oracle's they're data that come from outside typically the the blockchain and so state of the world an example that would be you have a smart contract based on a bet the outcome of a sports game that would be a state of the world that you would get and performance of obligation somebody delivering a package somewhere and then the the time and then location of that delivery is registered by a device and uploaded as a blockchain isn't Oracle so and basically when I say protocol I mean in algorithms computer programs plus the messages that they send back and forth is what constitutes a protocol so smart contracts reduce mental transaction costs contracts for difference allow a vast amount of price information that would be really impossible to calculate in your head and the computer does it for you and that that allows you to simulate another another financial instrument algorithmic management I'm not going to talk about that's a big related to employment and also more predictable similar so you have code it's much more deterministic than a legal contract and so it can be a lot simpler a lot easier to predict what's going to go on and there are costs of trust and security especially if you're operating on a global scale across jurisdictions the burden of lawsuit quickly becomes prohibitive which makes it doing contracts across national borders kind of almost pointless for small small deals and thus as a result it doesn't happen much and most of cross-border businesses the domain of big corporations that can afford lots of lawyers and do a lot of repetitive transactions and there's also ambiguity in legal contracts that gives rise to injustice so and smart contracts are often equated with D apps and run on the blockchain and indeed that that code running on the blockchain that trusts minimise code is the core the most important part of a smart contract but we should think of it a little more broadly the bitcoiners theorem contract that trusts minimize code controls assets and that gives you the incentives to perform based on the control of assets being conditional on what you perform but it also involves user interfaces you know interfaces law a lot of search for for potential business partners allow you to negotiate with them and then help monitor performance and let the trust minimize code know how the performance of the contract is going and so performance is just you know doing what you promised to do basically and so again performance verification and condition satisfaction are the two different kinds of Oracle's that can feed into that and so the to take a broad view of this and to see some of the economic potential here let's look at the phases of deal-making so internet commerce over the last thirty or so years has really innovated strongly and revolutionize the phases of deal make and especially search and negotiation and as we'll see smart contracts are more focused on the performance phase which is really lagged so far because centralized commerce can't do trust minimization it's actually very for for poor at doing it trying to do a globally seamless performance phase and a con in a deal so anyway search uber app that matches drivers and riders is a good example of search eBay where you go on eBay and it matches buyers and sellers that's an example of search even in the traditional brick and mortars world a shopping mall is the place you could go where shoppers could be matched with the sellers who sell various things and so the next phase negotiation uber app has a price algorithm that does a negotiation for you and gives you a kind of take-it-or-leave-it price figured out by this algorithm eBay has an auction that determines the price and shopping malls and traditional retail had fixed prices so again those are three different ways there's a lot of different ways to do contract negotiation and then performance phase an uber app the map tells the driver where to go so that helps greatly with the performance credit cards are used for payment payment is a crucial part of most performance phases eBay used PayPal and it was very heavily dependent on PayPal which is why first of all why PayPal succeeded is because they're a good complementary match for what eBay was doing and the eBay businesses had a really hard time signing up his credit card with credit cards so PayPal provided a great alternative to that but also because PayPal was so dependent on eBay eBay eventually just bought them but that greatly helped eBay to become a success is they were really great at the search and negotiation phase with the matching buyers and sellers from the auction but they had really done poorly as most internet companies have done poorly with the performance phase and PayPal was the state-of-the-art at that time and so they made Peter kill and the PayPal mafia rich and gave eat helped greatly with eBay success and of course the shopping mall take your cash and credit card for post performance we have reputation systems like Yelp we have seizing or freezing of collateral which is really trust minimized and what I'm going to focus on here and of course the traditional thing which is not at all trust minimize and works very poorly across national borders and often poorly within them is the lawsuit and so the first takeaway I want to leave with you and this is a project that my team has been working on is that smart contracts aren't just programs written by programmers running on a blockchain that trust minimized code is a very important part of it but I think the next generation of smart contracts or going to be things that non-programmers negotiate between them just like much like you would negotiate a traditional contract Alice gives an offer to Bob Bob can accept to reject that offer if Bob is not accepted or rejected the offer yet Alice can revoke that offer that is that's the English common law and United States version and it Maps pretty directly from wet code to dry code which we've implemented that negotiation process and in the process you're forming the contract you can customize it so this is what we're working on one of the things we're working on Alice and Bob can create various kinds of of contracts derivatives and so forth financial contracts based on various tokens and they can negotiate this you know I want this token here as collateral I want to use that token as collateral etc etc so the editing the formation the creation of the smart contract goes hand in hand with negotiation if you're not negotiating it it's not really fully a contract smart contracts examples in patterns so financial contracts of course that's the low-hanging fruit I'm not going to go over dispute mediation that's not really trust minimized tools and assurance contracts maybe briefly and I'm gonna skip some art property at the time I have okay collateralized versions of loans bonds futures options swaps and contracts for difference that's really the low-hanging fruit of smart contracts and this now goes by the buzzword of defy decentralized in non-custodial finance and so interesting recent examples Yunus swap or access to trust minimized an automated market maker that you can buy or sell from and in fact most of the most of the current work is supporting cryptocurrency trading which is natural because that's a very big thing that can be put in there on chain though those are assets that are on chain and it's a big market so that's naturally where the the first applications are happening we have token sets for you you have some function of token some combination of tokens like you know 70% Bitcoin 25% ETH so much like an ETF more tracks a moving average or so forth there's all sorts of varieties of functions you can do there we have collateralized debt positions where you can put for example 10 III TC into a CVP and then take out loans and in another cryptocurrency and because cryptocurrencies are volatile they usually have to be a over clutter eyes and you have a risk of liquidation if the price moves too much you get liquidated so that that's one of the shortcomings or weaknesses you have to work around but even despite that it's interesting that for example maker Dow has 207 million locked up in CDP's dy/dx allows you to trade on margin long or short they've got some other derivatives so yeah so it's interesting that despite the volatility of this collateral that it's at least being used in some kinds of applications so instead of a trusted escrow so this brings us to atomic swaps which I think are a great building block for financial smart contracts so instead of a trusted escrow roughly the high-level non technical description is used trust minimize code plus cryptographic proof of payment as your trust minimized escrow instead of actually using a trusted third party and when the smart contract is received both it sends both automated based on on chain information and another very interesting thing is that can be cross chain because we have this cryptographic proof of payment it can be used by either chain properly programmed to do this and now so one way to use this is an old language I invented pre Satoshi back in the 1990s and basically a you have a future is defined in terms of atomic swap that's going to happen in the future between two parties with two different two different kinds of tokens for example and similarly an option is a swap that's going to happen optionally if if somebody chooses to exercise it and so again I designed this language this can be done in a wide variety of languages I would encourage people to create and use these high-level languages instead of writing this long solidity because it's gonna be a lot easier to debug this high level these high level descriptions than to find bugs and Long's long solidity or see or go or all these standard programming languages are not really suitable for smart contracts and so I strongly urge people to go to these higher levels since we're gonna be doing mostly financial contracts anyway I would encourage people to create and use these higher-level languages okay so now I'm going to go more depth into what we're doing we've got the idea of ROI of obligations and an obligation is something that you're one of the parties is expected to perform you know often on chain it could be an on chain payment but it could be an off chain payment tracked by an Oracle and every obligation corresponds to a right and the other so I'm taking this language again reverse engineering it from traditional legal wet code to dry code and it works pretty well so we have an obligor who has the obligation we have an obliging this to be performed and then the way this is incentivize is it's generally through collateral in the smart contract world so we've got states of performance have you performed yet are you starting perform etcetera and so that formation the first state of performance is when the contract is performed you have formed agreed to you haven't performed yet and that's when you attach the collateral and so from that point on you you cannot use the collateral for other things assuming you've banned rehypothecation which is a good idea and if all obligations are poor performed you free the collateral once all the obligations are performed if obligation is not performed by a certain deadline plus a grace period eces the collateral and this will show in more detail I got we've got five basic states in our software once it's formed contract its form the collateral is attached performing it's still in the state of being attached once it's performed the collateral is freed if there's a curable breach meaning they haven't performed properly but they have a chance to fix it and do what what they promised then the collateral remains attached but if there's an incurable final breach at that point the collateral is seized and this is a very broad very broad frame again apply it comes from contract law it can apply to just a really wide variety of contracts again we're applying it to financial contracts that's the low-hanging fruit the relationship between smart contracts from traditional law there's a lot of confusion surrounding this smart contracts are not meant to be enforceable in a court of law or any such thing there are very different pieces there dry code there trust me to my software there a security protocol so like the repo man it's a security protocol it controls what I call the burden of lawsuit in other words who has to sue whom if there's a cross-border contract and one person didn't pay Alice didn't pay Bob well then bob has to sue alice in some court and good luck with that because which court are you going to use which country and and so forth so if possession is nine-tenths of law then smart contracts in a lot of situations may be 99 percent of the law especially in cross-border situations because they control the burden of lawsuit by controlling the assets smart contracts are also a security philosophy we should make security protocols correspond to the actual rights and obligations that people want in their deals and so now I'm going to compare the the wet the traditional versus dry code in traditional law logic rounds on subjective minds and enology you know is this case like this one or is it different is this set of facts like this one or different software grounds on boolean logic and bits mathematics basically and security is based on threat of violence basically in law contempt or imprisonment ultimately if you don't pay your fines and fees and what the order court is ordering you to pay software is based on replication in cryptography it's also strong it's it's much more strongly secure but it's also so in a non-violent way predictability law is very flexible so it's unpredictable and can be unjust but it can also be more just in certain cases where the straight rule wouldn't get you the right outcome and software is rigid it's less corrupt much less corruptible it's much more predictable but it also if if there's a case where it's unjust it's not easy to fix maturity highly evolved in many cases law laws much more secure we can learn a ton and lessons that's why I want to reverse engineer law and bring wisdom from highly evolved law into smart contracts under dry code and software is pretty naive it's larval and has few experiences and don't get me started on governments but crypto space knows nothing about governments it's the banks and the traditional organizations that know about governance so if you're investing in a coin that's based on we have a breakthrough in governance you're probably going to lose your shirt because the the strength of cryptocurrency the reason Bitcoin has 70% market cap is trust minimization governance minimization in other words we minimize our dependence on that that aspect and we put replace wet coat of the dry coat it's a very incredibly valuable thing to do it allows you to be globally seamless I can't emphasize enough what a backwards retrograde let I'd step is you know endorsing governance and claiming you have a governance breakthrough risk but anyway don't get me started haha so law lives in jurisdictional silos there's Korea has one set of laws you know China has another set of laws the US has another set of laws Hong Kong has laws based on British common law China borrowed German which was originally Roman civil law they have actually radically different both borrowed from Europe radically different legal systems and that a big part of the conflict in the Hong Kong China disputes right now is that legal difference in China trying to assert more more of their different legal system on Hong Kong and so we do have these very different legal traditions and even within the common-law world or within the civil law world you know we have jurisdictional silos and trying to go across these can be very expensive and is really one of the big reasons multinational corporations dominate global trade is just for that reason it's very difficult for small businesses to thrive there we're starting to see that break down because of we know trust minimize money with Bitcoin and in the future because we're gonna have smart contracts we are going to be able to do more multinational small business lawsuits are very expensive especially when doing them across borders the cost of the software is very low and so one of the things I want to mention are cash pools either you may have heard of Dow is distributed autonomous organizations that's a science fictional kind of thing the real core meat of that is the use of cash pools in an automated triskin minimize Treasury and having some rules for that Treasury but has all sorts of applications have nothing with organizations such as for example distributing cash flows distributing dividends to string bond coupon payments and in a way that's really more powerful I think than tokens themselves or tokenization themselves a token just represents something but if that's something is off chain and based on trust that doesn't get you very far what you're really interested in and a financial instrument is usually the cash flow and so pooling those cash flows even if the cash flows are coming off from a traditional off chain stock or bond or so forth you can trust to minimize and the interesting thing also an interesting distinction to make is their systemic versus particular so their trust minimize particular but if you're holding the collateral mostly off chain you can always get your money from the pool unless that pools drained and that's a systemic risk for anybody is if that pool gets drained then everybody is out of luck so there's all sorts of things and it's smart contracts and in the security protocol world where you can trust to minimize the particular risk it can't discriminate against anybody or or prevent anybody from getting their money as long as there is money in the pool but it can't eliminate the systemic risk that pool might run out of money okay so that brings us here to lightning I'm going to talk about lightning a little bit because bitcoin does dominate the crypto space right now and has a really good scalability model of doing making sure you've solved that security trust minimization problem layer one and that's your get your focus you got to get that right before you get anything else and on that you build more efficient layer shoes that does sacrifice a little bit that trust minimization so and relating to smart contracts you can do vending machines of Lightning's for the first Lightning vending machine was built in 2018 it's a chicken feeder it dispenses you put your lightning Bitcoin in it dispenses worms to little chicken here and since then a bunch of people have built these things they're not widely deployed yet but this is I think gonna be a really big growth industry or lightning base vending machines and speaking of lightning I decided to give these guys free advertisement cuz they didn't pay me I know I just think does it really cool you can use bit refill to prepaid store of cards to get prepaid store cards with Bitcoin via lightning now of course if your Bitcoin Hodler there really is only one reason you would ever spend in the short term your Bitcoin and that's to buy a juicy steak unfortunately that's one of the things they support here in Korea so ok so the potential economic impact of smart contracts as I said before we've already seen how these contractual innovations these innovations in various phases of deal-making really revolutionized and made Internet commerce possible and you know hundreds of billions of trillions of dollars of market cap or based on these breakthroughs but they primarily happen in search and negotiation performance phase has really lagged and that's because they're centralized because of trust based they're not seamlessly global right now and so smart contracts have the potential especially in the financial area of breaking through that and also some of the poor performance in other words seizing or freeing collateral and trust minimized way to incentivize performance and so focusing on financial smart contracts here the notional amount of outstanding derivatives in other words the underlying value of the underlying asset was about 542 trillion gross market value of about 2.7 trillion so the vast amount of money involved and there are six mains kinds of derivatives dominated by interest rates foreign exchange and credit and then there's also commodity and equity derivatives and the trading and volume and interest rate derivatives six-and-a-half trillion a year and about one to two billion a year in transaction fees so that's a it's not a huge market in terms of transaction fees are pretty pretty substantial and growing rapidly and so what smart contracts make possible or globally seamless and trust minimized markets and because of the blockchain security cost you're going to have someone higher transaction fees and there'll be certain situations where people want to pay those fees based on the ability to be globally seamless and avoid political risks and so that's my talk I hope you enjoyed it and I hope you enjoy the rest of conference thank [Music]
Automatic transcript — names and jargon may be misspelled.