Blockdemic Lab

Opinion/News/Deep-Dives on the Future of Money and the Internet

What are smart contracts and how are they used?

Smart contract

Smart contracts are the fuel behind every interesting innovation in the cryptocurrency space right now. Even so, most people don’t really understand them, including those who already own cryptocurrencies.

To make matters worse, the bulk of blockchain industry sources attempt to explain them to beginners, but do so in a roundabout, confusing fashion.

For these reasons, I’ve compiled a simple explainer on their history as well as what they are and how they are used, below.

Where did smart contracts come from?

The genesis for them dates back to 1994, from the mind of Nick Szabo, a Renaissance man who some speculate is Satoshi Nakamoto himself. Back then, the concept for a blockchain but not Bitcoin had already been around for three years and Szabo used it and the concept of a digital cash protocol(like Bitcoin) to theorize how smart contracts might be built.

The gists of his findings is that digital cash protocols could be altered to function as contracts on a blockchain that “self-execute,” meaning that if a condition is met, they trigger some sort of operation like a transaction.

Related to this, he also pointed out that items like point-of-sale terminals are the equivalent of smart contracts that are hosted on private servers.

Blockchain-based contracts, by contrast, would be hosted on a network of computers all at once, instead of in a singular location.

What were the first smart contracts used for?

The first blockchain-based contracts launched with the first ICOs on the Ethereum network. Consequently, nearly all of them were used for exchanging one cryptocurrency for another. You can still experience these in action when you exchange Ether for an ERC-20 token in your cryptocurrency wallet or on your favorite exchange.

How are smart contracts used today?

Today, smart contracts have evolved beyond their most basic use case to act as the backbone for DApps. Generally, a DApp is the same as any other app, except that it is simultaneously hosted on a network of computers(a blockchain network) instead of a single location. Through understanding the basics of some of Defi’s top DApps, it is easy to see how this works out in practice.

Maker’s Collateralized Debt Positions

The Maker DApp uses smart contracts to facilitate what are called collateralized debt positions. Fully explaining this system requires another dedicated post, which you will find here in the future. For now, imagine that CDPs are smart contracts in which you leave a cryptocurrency like Ether, in exchange for the equivalent amount of Maker’s DAI stablecoin.

Under the hood, the smart contracts that manage these exchanges are some of the most complicated in the crypto space because of what they do.

Maker’s user community organizes into what is called a DAO, which anyone can join by holding the MKR cryptocurrency. Think of a DAO as a group of a DApp’s users that govern it instead of a company.

DAOs live on the blockchain and are another key part of the Defi ecosystem that I plan to discuss at length down the road.

In the case of the MakerDAO, any MKR holder can vote on any issue related to the DApp(and its smart contracts) present and future performance. This includes setting the DAI savings rate, which is the interest that people can earn through holding the DAI stablecoin. This interest comes from other users who pay a fee to create new DAI in exchange for their Ether.

The amount of DAI that users receive in exchange for their Ether is consequently determined by a collateralization ratio, which is set by the Maker DAO and coded into Maker’s smart contracts.

This collateralization ratio is nothing more than an exchange rate for Ether to DAI, which is currently $1.50 in Ether for every $1 in DAI.

Since DAI historically has kept its desired value of $1 a coin, it has earned the moniker of “stablecoin.”

During periods of high volatility, traders purchase more DAI to offset the losses they might experience with Ether or other cryptocurrencies leading to the Maker platform being called a decentralized hedging system.

This is, however, only the foundational use case for Maker and DAI. If you’d like to learn more, stay tuned for an upcoming post.

Synthetix

Like Maker, Synthetix began as a stablecoin-focused project, but with the rise of Defi, its team shifted its focus to building a network of smart contracts that host cryptocurrency derivatives.

If you’re scratching your head at this point, then you’re surely not alone.

Derivatives are difficult enough to master in the traditional financial sphere, let alone when they have a crypto-slant.

In the context of Synthetix, a derivative refers to a cryptocurrency that has been pegged to the value of a non-crypto investment like gold and thus, mirrors that value. These derivatives or “synths” are by no means stable and fluctuate with the value of the real-world investments they represent. Their prices are monitored and reported by dedicated smart contracts which also allow them to be issued, exchanged, and traded.

Synths can theoretically represent anything from precious metals to art to stocks and even real estate. The value behind owning them is that you do not have to pay any sort of fee related to the safekeeping of the investment class involved or to an expensive, legacy trading platform.

Currently, Synthetix functions as a sort of stock exchange for synths with a daily trading volume of over $1.2 million, all of which is facilitated by its smart contracts.

While this is a drop in the bucket compared to the New York Stock Exchange, the Synthetix platform is still the current leading example of Defi in action.

Beyond allowing for the creation and trading of crypto derivatives, it has many other unique features, all of which are facilitated by smart contracts.

With it, we can already see what the future financial system might look like, which is why I will return to Synthetix in a future, dedicated post.

Where does all of this leave us?

Through these examples, it is easy to see how smart contracts are fueling the Defi revolution.

Without them, there would be no blockchain-based financial system(Defi).

Knowing the information above, you now know why.

In my next post, I’ll build upon this discussion by focusing on the major weaknesses of smart contracts and how certain groups are working to improve them. Until then, remember to connect with me on Twitter @Expatcrypto3.

Note: In this post, I used Ether as the key example for collateral in the context of DAI purchases though this was just for the purpose of clarity. As of now, many other forms of collateral are now accepted.

Tagged ,

Leave a Reply

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