In this chapter, we cover smart contract and smart contract platforms. Smart contracts are programs that are executable and live on a blockchain. Smart contract platforms are the actual blockchains themselves. We'll distinguish the difference between the two and give you a better understanding about each concept and why they're so important to the technological revolution – they create an entire new world for what's possible.
With Bitcoin handled, we're now going to explore one of the most exciting features of blockchain technology, and that is the concept of a smart contract. It's so important that there is a special group of blockchains known as smart contract platforms that are specifically built to facilitate the use of this simple but amazing feature. The smart contract platform is a blockchain that provides the backbone for building decentralized applications. The ecosystem consists of wallets and tokens, as you would expect, along with a programming language that allows developers to build blockchain applications. Such applications are known as Dapps or decentralized applications, and they are entirely functioning systems that are peer‐to‐peer, generally with all of the standard properties of a blockchain. Smart contract platforms are known as “Layer 1,” while the applications that are built on top of them are denoted as “Layer 2.” Smart contracts can be built into the applications and will run when predetermined conditions are met and are thus paramount to the operation and flourishing of decentralized finance (DeFi) and other blockchain applications. Unlike databases, where administrators maintain and update records, smart contract platforms rely on contributions from the network – hundreds of thousands of participants – to validate transactions.
Earlier this year I was preparing to travel and the day of my trip, my flight was canceled, which required a whole lot of logistical juggling to reschedule. Naturally I have travel insurance; however, making a claim is never simple. Imagine instead that, when a flight is canceled, that data is automatically sent to an insurance smart contract as an input and, if the flight was covered, the contract would automatically issue a refund as an output. This idea, posed by TrustRadius, could happen automatically, cost effectively, and securely, and minimize effort and expense. This is only one example. The types of Dapps that use smart contracts that we will see are limited only by the imagination of the developers, and we believe that this technology will touch every area of commerce. Smart contract platforms empower them to set up and manage private and public blockchain networks instead of building from scratch, saving them money.
In the view of the Securities and Exchange Commission (SEC), smart contract platforms can carry different regulatory risks than other crypto classes. If platforms have their network functioning, are in production, and are sufficiently decentralized, the SEC views these as less risky assets, akin to legal contracts. Smart contract platforms require tokens – their own crypto – to function, and the whole point of a token such as ether, which is associated with the Ethereum blockchain, is to allow transactions to occur. This makes a smart platform contract its own crypto class.
Smart contract platforms are the gateway to burgeoning DeFi systems (we explore DeFi in the next chapter) and can be used for almost any agreement between two parties. As a DeFi platform, they make financial products accessible to anyone with Internet, regardless of their status and nationality. Additionally, users can hold their money any way they want and control where it goes without any interference. The DeFi system also allows peer‐to‐peer transactions without intermediaries, providing a sustainable alternative to the tightly controlled traditional banking system.
In addition to this, smart contract platforms can be used to create tokenized assets, NFTs (discussed in Chapter 5), and even other blockchains. They are the foundational layer to the implementation of this next technological wave.
Twenty years ago, the Internet began to play a major role in our life. We remember growing up during this exciting time, excited about the ability to send information across the world nearly instantaneously (email), get information about businesses instantaneously (web pages), and began to explore this idea of doing business on the web (ecommerce). It was hard to imagine then what a cell phone would evolve into; however, fast‐forward a few years and smartphones such as iPhones began to take society by storm (creating anxiety for all of us who were left behind). Now, it is blockchain technology that is seeking to transform current business structure, communication, and internal processes, and also the nature of money. Big‐name companies such as IBM, Walmart, Home Depot, and Toyota are all implementing blockchain technology, generally smart contract platforms. What we find so interesting is that with artificial intelligence (AI), IoT, robotics, and blockchain converging, we're seeing automation and autonomous systems playing an ever‐increasing role in industry. Industries across the board are seeing dramatic increases in efficiency, product tracing, and security, and it's just begun.
We call this convergence the Age of Autonomy®, which we review in Chapter 11; however, as a sneak preview, consider that IoT will provide sensors and networks to measure and communicate data. AI will process this data into something actionable, and robotics can translate this into the physical world (such as a self‐driving car). Blockchain technologies and, notably, smart contract platforms govern and enforce the transfer and store of value from work produced. We're moving to an age of self‐driving cars to one of self‐driving businesses.
We discussed supply chain and blockchain innovation earlier, but this example is intriguing as it involves one of the top smart contract platforms and the most unpretentious brands of all time, Walmart.
When a contamination issue arises in the supply chain, identifying where it occurred can be a complex and lengthy process. For example, it took two months for Walmart to identify the source of a salmonella outbreak in Mexican papayas and to recall them. Walmart recognized this issue. The company announced that it would partner with IBM to run two proof‐of‐concept projects to test a new way of tracking food. One of those projects was centered around tracking mangos in U.S. locations.
Walmart started by creating a benchmark. First, a project member bought a package of sliced mangos and asked his team to identify the farm from whence it originated. It took seven days to trace it back. Given the benchmark, Walmart investigated its own processes and began to digitalize and store food safety processes and product information on the Hyperledger Fabric blockchain. Suppliers used new labels and updated their data through a web‐based interface. This action created a single historical record for the produce. By the end of the project, Walmart found that it was able to reduce its product traceability time from seven days to 2.2 seconds. That is a mind‐boggling improvement. Now Walmart has vastly expanded its supply chain tracing using IBM blockchain, built on top of Hyperledger Fabric.
As you can see, smart contract platforms are building autonomy throughout the entire production cycle. Robotics will automate production in the physical world, while sensors and data will move through the Internet of Things. Through bots, agents, and cryptocurrency, software will generate, transfer, and store the world's value. Artificial intelligence will provide the brain power to learn, execute, measure, and adapt each component within the decentralized system. We're bullish on companies that understand this dynamic.
Contracts are agreements and have been around since the days of ancient Mesopotamia and Sumeria, around 2300–2600 BC. That's a long time ago. Over the years, we've seen contracts evolve; this is a fundamental basis for our legal system – enforcing agreements. Smart contracts permit transactions and agreements to be carried out among disparate, anonymous parties without needing a central authority, legal system, or external enforcement mechanism. The terms of the agreement between buyer and seller are directly written into lines of code. The code and the agreements contained therein exist forever on the blockchain. The code controls the execution, and transactions are trackable and irreversible. A smart contract is self‐executing, meaning that once the smart contract can see that the conditions for the contract have been met, it automatically executes. And, because it's on the blockchain, it is unalterable. No chasing payments, no renegotiations, no escrow companies.
As authors, we'd love to see the publishing industry consider smart contracts, as they take away ambiguity or bias. Our literary agent, Herb Schaffner, remembers when the first Kindle prototypes were being passed around publishing offices to the great skepticism of many. Eventually, however, publishers adapted, as readers loved ebook devices and piled up stacks of digital books in their reading queues. Often, new technologies are not quickly embraced; however, let's look at how a smart contract could impact the world of book publishing. In terms of author agreements and author royalties, smart contracts could be coded as part of the overall author–publisher agreement to make royalty deposits into the agent’s or author's bank accounts when book sales thresholds are reached. The conditions and executions would be transparent to the author, publisher, and agent, so no longer does the agent have to waste time asking the editor to waste time asking the royalty department to waste time to send a statement. Royalties are already managed on a financial database; plugging that into a smart contract could open up time for everyone involved.
This could easily apply to any kind of royalty and remove all need for interpretation. Another obvious example is home buying. Once the buyer has deposited funds and the seller checklist has been fulfilled, deeds and funds could automatically be transferred without requiring an external escrow agent.
Smart contracts will change law and commerce fundamentally by removing bias, and once you understand how smart contracts work, you will understand how the crypto revolution reaches far beyond digital currencies. Smart contracts will boost our economic engines with the three great lubricators of technological progress: transparency, data protection, and cost reduction. What bitcoin is to the monetary system, smart contracts will be to the legal system.
Think of an invoice: it's a simple legal contract. We can already create a smart contract for an invoice that would autonomously transfer money to the designated party once the conditions are met. In the coming decades, we'll be able to create smart contracts as complex and subtle as any legal contract today. The smart contract is a fundamental structure at the basis of the innovation – going forward.
In the following sections we discuss a few selected applications of an emerging digital economy built on smart contracts. These systems promise to be more efficient and safer than previous technologies while protecting your financial and data identity.
Several IT experts and scientists have published journal articles analyzing the benefits of smart contracts, including Tharaka Hewa, Mika Ylianttila, and Madhusanka Liyanage in a 2021 article in the Journal of Network and Computer Applications. The authors note: “Many applications [that are] already notoriously hard and complex are fortunate to facilitate the service with the blessings of blockchain and smart contracts. The decentralized and autonomous execution with in‐built transparency of blockchain‐based smart contracts revolutionize most of the applications with optimum and effective functionality.”1
The researchers confirm smart contracts' beneficial features such as accuracy: “The programmed conditions in the smart contracts are immutable and verified prior to the deployment in nodes in the blockchain network. The execution is automatic once the condition is met. The accuracy is guaranteed without any human or other error on the exception.”
The authors also conclude that smart contracts prevent fraud or other noncompliance. In fact, smart contracts will facilitate the enforcement of contractual agreements across many industries and use cases with in‐built transparency and resilience against crisis. Next are a few examples.
Know your customer is a crucial function in the financial services industry. If you've onboarded at a crypto exchange, you have experienced the many checks, ranging from identification submitted to an actual photo, to prove you are indeed you. These checks get more robust in larger scale and worldwide transactions such as the ones we have with our fund. The reason is simple: to minimize crime, fraud, and money laundering.
This seems straightforward enough; however, the extensive paperwork also presents a liability for bankers and customers. People can conceal their identities in money‐laundering activities and, if not caught, banks can be criminally liable. In addition to that, customers submitting information are now releasing their personal data to a third party. What if, instead, your identity information was stored in a nonmodifiable and verified crypto asset (a special form of NFT – we'll discuss this later) that you controlled. A smart contract could look at that asset and verify that you are you without requiring additional information submitted and without requiring you to transmit information over the Internet. As the owner of the data, you would have the ability to disclose as much of your data as desired or required but not more than that. All can be verified by a smart contract. The smart contract makes it easier for the institution while allowing you to have control of your data. This is where we are going as a society.
Selling and leasing real estate, homes, and commercial space involves lawyers, actuaries, and brokers, and each transaction has extensive processing, verification, and documentation needs. If you've purchased or sold a home, you remember the hundreds of pages of various documents requiring signatures (and if in Texas you need to show up in person to sign on actual paper!). Finalizing major deals can take weeks, months, or even years and is subject to interpretation and, especially, a third‐party escrow to confirm whether the transaction is viable or not. A smart contract eliminates most of these delays.
Paper agreements are replaced by a programmed smart contract residing on a blockchain. These contracts contain deal terms as electronic protocols so that each set of data provided to the contract triggers the next step in the process. Once a certain set of criteria is met – say all inspections are done, for example, and all monies have been submitted and verified – the contract can then execute the transaction. Further, all transaction data is stored in the distributed ledger.
Smart contracts also provide the mother of all backup systems, reproducing all transactions, so even if data is lost on one device, the data will still be available via the ledger. These innovations are already happening in companies such as Propy, which uses smart contracts for cross‐border real estate transactions, removing the risk and headaches for buyers in different countries and regions, and, as another example, Seattle‐based SMARTRealty is applying smart contract technology to everyday real estate rental, purchase, and sale transactions and deploys smart contracts for every deal done. These are just a few of the early adopters. Many more will come and many will rise and fall, just as in the early days of the Internet, but, ultimately, we see a world where real estate and smart contracts go hand‐in‐hand.
We may not always articulate it, but most of us have a sense of the inefficiency of insurance claims processing. Insurers maintain an army of fraud investigators and claims adjusters to monitor claims for lying and misrepresentation, as insurance fraud is rampant. On the other side, policyholders know the frustration of waiting for claims to be processed and paid. Meanwhile, on the governmental end of things, state law enforcement and the FBI actively investigate and prosecute fraud, which the FBI estimates at more than $40 billion per year, which costs the average U.S. family between $400 and $700 per year in the form of increased premiums.
Blockchain technology will save insurers and the insured billions of dollars by minimizing the potential for fraudulent activity.
Not surprisingly, U.S.‐based insurers are eager for greater adoption of smart contracts, as smart contracts can automate claims and validation through the decentralized ledgers of the blockchain network, eliminating the bulk of the time‐consuming and tedious claims process. Consider automobile insurance. Say you are involved in a car accident, and it was the other driver's fault. You submit a claim to your insurance company to recover your loss. Your insurer begins investigating the claim, as does the other insurance company, both companies doing duplicate work that is subject to delays and possible human error. If insurance claims are placed on a blockchain, different insurers, reinsurers, brokers, and other parties can access the same shared data. Governed by a smart contract, the policies will automatically execute programmed claims‐processing actions that can automate information transfers between insurers and other parties and release payments to policyholders seamlessly.
This is only the beginning, however, as smart contract solutions to complex farming issues are gaining traction in many African agricultural regions. In one example, farmers in Ghana receive crop insurance through a smart contract that is triggered when certain pre‐set conditions are met, enabling farmers to secure their farms and family livelihood in case of extreme climatic events such as floods or droughts. Another company provides insurance to small farms in Ghana, Kenya, and Uganda through smart contracts that trigger claims based on intelligent weather predictions. By using this technology wisely, smart contracts will not only streamline claims, they may be able to prevent damage and overall lower cost, pain, and impact to all.
As with aspects of the insurance industry, professional auditing services are labor‐intensive, subject to fraud, and dense with paper‐driven compliances. Smart contracts provide transparency to stakeholders, board members, regulators, and potential business partners, and can support advanced bookkeeping tools and ensure accurate record‐keeping based on the incorruptible and distributed codes in the blockchain network. Since the blockchain can't be tampered with, regulators can trust the smart contract for compliance. Similarly, auditors' work can be far more streamlined, as the smart contract will automatically release approvals and signoffs in the forensic auditing process.
Democracies debate, discuss, and explore advances in secure, trusted electronic voting. Some nations are further ahead than others, and some countries face technical hurdles in implementing electronic voting systems. In the United States, voting integrity came under unwarranted and invalidated attacks during the 2020 elections. However, the firestorm of coverage and numerous controversies raised public awareness of the value of integrity and security in the vote. Some research projects underscore that smart contracts can be part of an overall approach to voting systems “by ensuring decentralization, transparency and eliminating a single point of failure.”2
Smart contracts in health care have the potential to improve a range of processes and outcomes. These include storage and security for health information, more robust controls for patient data, and automation of regulatory compliance requirements. Smart contracts can strengthen patent protection for life‐critical clinical research, and expose fake and counterfeit drugs.
Blockchain is having an impact on the provenance and tradability of the pharmaceutical supply chain, fake and counterfeit drugs, and tampering.3
The simple fact is that no industry is more circumscribed by compliance and record‐keeping than health care. The high cost of American health care is partly about costs of hospitalization and how well insurance companies or Medicaid/Medicare negotiate those fees. Insurance companies and hospitals engage in running battles over the fees hospitals charge. Smart contracts could help unravel the byzantine nightmare of health care “funny money” by incentivizing instant payments for improvements by hospitals in lowering fees and achieving other efficiency targets.
Health care thought leader Dr. Mitchel Schwindt analyzed the benefits of smart contracts on hospitalrecruiting.com:
As members of society age, interactions grow exponentially with providers and health systems. Surgeries, procedures, consultations, and medication changes quickly become difficult to track… . [We know] over 90% of hospitalized patients cannot recall one or more medications. The current system is broken and dangerous. Storing patient data on the blockchain, combined with the power of smart contracts, can grant access to those with permission to view and keep records up to date. Ready access is assured in times of emergency. Authorized parties can add to the medical record and make updates backed up on the blockchain. The days of multiple paper copies of scratched‐out meds will end. Changes are viewable to all the patient's caregivers. Smart contracts can remove the friction when multiple parties are processing various aspects of a patient's care. Data is current, verified, and accessible, based on the permissions in the smart contract.4
Smart contracts allow records and information to be stored on a digital ledger, so communication will travel with patients more efficiently than ever before without filling out numerous forms. The patient's preferred physician can also view records on the blockchain network. Hospitals and health care companies rely on several databases filled with patient information; however, these can be too restrictive to allow for sharing potentially life‐saving insights around the globe. Without blockchain and smart contracts, this information may take a long time to reach the recipient and possibly be hacked. If health records were kept in a smart contract and stored on the blockchain, that information would be available to hospitals and research institutions everywhere.
Once you have used Venmo, CashApp, or other instant payment apps, we guess you don't want to go back to sending checks by mail. In fact, the generation born between 2010 and 2024 is known colloquially as Generation Alpha, and it's unlikely that many of them will have ever seen or used a checkbook. Instant payment apps are just the start – we can do better. For artists, smart contracts can provide a foolproof remittance system without the intermediaries (banks and companies) that add costs and fees. Smart contracts allow for consistent and near‐instantaneous payments per use of song, video, art, crafts, and so forth through real‐time remittance. This adds transparency and will speed up payments to musicians and content creators for whom payments often dribble in. Because of their impregnable security, smart contracts are more likely to be adopted by corporations and platforms such as Spotify or Etsy. Think about it this way: What if we could have a Venmo with all of the functionality of Venmo but without the actual company Venmo – just peers exchanging funds? With blockchain‐empowered smart contracts, we can do this.
Do you get an email from your car reminding you that the windshield wiper fluid is nearly empty? Or that one of the tires needs to be inflated? You know what we're talking about if your car is a newer model. That's the IoT (Internet of Things) at work. The sensor in your wiper tank talks through the Internet to your customer service account, which autonomously sends you the email. Smart contracts are a pillar of all the decentralized, autonomous operations evolving in many areas of our world.
A John Deere tractor now comes fitted with rear‐view cameras, touch screens showing application rates, fuel economy, and input placement, and GPS‐powered autonomous guidance that ensures efficient coverage with accuracy down to sub‐one‐inch specifications. Sensors in the tractor communicate with satellites that talk back to the steering and engine operations. These self‐driving, GPS‐guided tractors plow on the darkest of nights, leaving the driver with few worries aside from staying awake or the fate of his favorite team playing in a game on the radio.
This is important because data will drive smart contracts. IoT, by its nature, is sensor data. Every day more devices are connected and more data is being collected. With billions of devices connected in every major industry, in many places, the move is happening now. Combined with AI and robotics, the IoT is facilitating major steps forward in automation. This is the Age of Autonomy® and, as predicted in Jake's first book, crypto, blockchain, and smart contracts allow for automated financial transactions, ushering in an economy where autonomous, permissionless software can optimize, make real‐time decisions, and move capital 24/7. The smart contract platform is the vehicle to facilitate how many of these financial operations work. We dive further into this later in this book.
The function of the smart contract in our economy marks the first part of this story. We tackle the second part in the next chapter, where we explain how smart contract platforms work, boosting a massive swath of financial opportunities of which you should be aware. Finally, if you want to geek out about how smart contracts are designed, developed, and programmed, check out the home of smart contracts at https://ethereum.org/en/developers/docs/smart-contracts/.
3.145.88.241