07 - The Promise of Smart Contracts
The recent madness over NFTs has resulted in Ethereum becoming as well known as Bitcoin. We learned in "The Other Chains" that the Ethereum blockchain allows anyone to create any kind of token that they want. Payment tokens remain just the tip of the ever-growing iceberg. Enabling the creation of utility tokens, asset backed tokens, and hybrid tokens allows anyone to track the ownership of anything on a blockchain.
The idea of tracking the ownership of anything both physical and abstract presents an enormous market opportunity. Blockchains make ownership tangible in a way it never has been before. The tangibility of ownership and how it will impact the world is a topic for another time. In this piece, we will discuss how the technology on Ethereum and other newer blockchains makes all of this possible.
Show Me the Money
In the original Bitcoin white paper (a document describing the purpose and design of a technology being built), the first sentence of the document described the project as: “A purely peer-to-peer version of electronic cash.” Cash is what is known as a bearer instrument, meaning that you need to actually be in possession of the object in order to use it. The advantage of bearer instruments is that you have a guarantee that someone actually has the money they claim to have. You are able to see and touch the object of value. It is both present and tangible.
In contrast, a non-bearer instrument is called a promissory instrument. A handwritten check is a great example of this because they represent the bearer instrument. Checks are a promise to pay. We created them because they are portable and have the ability to reflect large amounts of the bearer instrument. It is far easier and safer to carry a check worth $100,000 than it would be to carry around its cash equivalent. Despite their portability and security, the person receiving the check does not actually know the check issuer has the money. Checks are really only a promise to make a payment, not the actual payment itself.
Today we use checks less and less, but we do rely on other promissory instruments. Credit cards are the best example of this. When swiping a credit card, what’s really happening is that a promise is being made by the card holder to a credit card company. The credit card company is then paying the person receiving the credit card payment. The card company is assuming the risk that the person swiping the card will not pay and is acting as “third party intermediary.” Third party intermediaries are organizations that assume the risks associated with a transaction.
You are probably asking “How does all this relate to either blockchain or digital assets?” Well at its core, bitcoin’s purpose was to remove third parties. Third parties could prevent a transaction from being processed or charge high fees. Bitcoin was designed to remove the tax collector or middle man. Despite these issues, third parties do, in fact, provide a vitally important service. They increase the speed of transactions by providing assurance the transaction will actually occur.
When buying a house, the buyer must give the purchasing money to a third party in order to prove to the seller they have the funds. What Bitcoin has not been able to do effectively is to replicate a promissory environment through code, mathematics, and cryptography. Locking up Bitcoin as proof of payment is extremely complicated, making it difficult to use in promissory transactions. Bitcoin’s technical design is one to replicate electronic cash, not electronic checks. This is where Ethereum enters the conversation.
Smart Contracts
Ethereum’s innovation was in its ability to build this promissory system in the virtual world. It accomplished this through the use of smart contracts. A smart contract is a digital agreement created with code that will take an action based on an event. The best way to think about a smart contract is to envision something like a virtual vending machine.
In the physical world, I walk up to a vending machine, put in a dollar, press B14, and the machine spits out a Snickers bar. The machine is programmed to take a specific action (Give me a Snickers) when a condition is met (I deposit a dollar). The same concept applies to the virtual world and smart contracts. Vending machines use the deposit of a dollar to know that it is allowed to distribute Snickers. Instead of using a physical dollar, smart contracts use information to determine whether they need to do something. Let’s talk about how a smart contract works in sports betting.
Say that my friend Wyatt and I are betting on the Super Bowl. I think the Panthers are going to win while she is convinced that the Broncos will. Normally we would go to a mutual friend, inform them of the bet, and give them our money to hold until after the game. The friend would be a third party who ensures that at the end of the game the winner gets paid. But let’s say we decide to use a smart contract instead.
First, we put in virtual writing (i.e. code) the conditions of our bet.
IF the Panthers win, THEN Sam gets paid. IF NOT then Wyatt gets paid.
We also tell the code to watch NFL.com to determine the result of the game. The collection of code and conditions together represent a “smart contract.” Then Wyatt and I will send our money to this smart contract. After the game, the contract will look at NFL.com, determine the winner, and pay whomever was victorious.
Hopefully, you can see how smart contracts bring us full circle back to that promissory system. Instead of relying on third parties to ensure a transaction, we instead are able to rely upon code.
Bringing Back
A key principle here is that most of the transactions we conduct are no more than exchanges of information and not physical money. That is because money is information. It informs us about the value of something compared to something else. I know that a Lamborghini is more valuable than a Smart Car just by looking at the price it would cost to acquire one versus the other. Because money is just information, it can be easily replicated digitally. When you create a money system (a blockchain) that also allows you to create promissory instruments (smart contracts), you can replicate Super Bowl bets or replace Visa in an everyday transaction with just lines of code.
Smart contracts also provide us with a way to create new forms of value. As I mentioned before, smart contracts are how you can create tokens on networks like Ethereum. Utility token smart contracts are collections of code that tell the Ethereum blockchain network the number of tokens that are in circulation, the type of token they are, and other key features of the token. All of that is stored in a smart contract. It acts as a repository for information that when you interact with it, will conduct an action. Maybe it makes a payment; perhaps it issues a new token; or it could even create an NFT. All of this is possible with these novel collections of code.
Huge shout out to my collaborators from Foster.co: Cameron Zargar and Diana Hawk
NFT Credit: Chad Cantrell
Follow me on Twitter @thatsauchward