#cryptobrew 0005 : Smart Contracts
🍯 DeFi Part II
First off, be sure the read the Part I of this issue called #cryptobrew 0004 : DeFi, where I covered a lot of the fundamentals and terminology around DeFi. It is very important as I will be using those terms going forward. In this Part II issue, I will be discussing Smart Contracts, which are the building blocks that power DeFi.
What are Smart Contracts?
Smart Contracts are essentially a piece of code that:
Enforce rules that determine the outcome of the contract based on the inputs and conditions
Remove the need for a third party
Execute automatically on the blockchain
Examples of Smart Contract platforms are: Ethereum, Polkadot, Solana, EOS and Binance Smart Chain.
One of the biggest issues we have as a society typically revolves around Trust. Trust is why we have paper contracts, attorneys, banks, lenders, certificates, realtors etc. All these things are essentially Third-Party services that help facilitate a transaction. Smart Contracts aim to eliminate the need for such Third-Party services by being a truly decentralized platform which can:
Provide Trust (rules are coded into the contract)
Be Permissionless (decentralized)
Be Immutable (cannot be changed since it resides on the blockchain)
Let’s go through some real life examples to help understand better the areas where DeFi can have major impacts.
Taxes. The government does not trust its citizens to pay taxes, that is why the IRS exists and why we have to file taxes etc. Imagine Smart Contracts being developed with built-in rules that automatically deduct taxes from any taxable event and sending funds straight to the IRS without the need to file anything.
Sports Betting. People who wager on sports also don’t trust the losing opponent will pay up. This is why Fantasy Sports websites like DraftKings exist. Imagine Smart Contracts that automatically deploy funds to the winners based on game results.
Inheritances. When a person dies, they do not trust that their family will do the right thing by distributing assets according to how and when s/he would want. This is why we have Wills, Trusts, Estate Planning Services etc. Imagine a Smart Contract that automatically deploys an inheritance of $50,000 every year to your heir(s) as soon as they turn 18 until the funds run out or a lump sum of $250,000.
Currency Exchange. If I wanted to exchange $5,000 USD for the equivalent is CAD, I would have to go to a bank or a currency exchange service provide in today’s world. In the DeFi world, the Smart Contract will automatically perform the transaction. This is actually how a number of the decentralized crypto exchanges are functioning. No need for a Third-Party.
There are so many applications and we can go on and on. But this is just to help you understand why this is a big deal. Smart Contract help enable the ownership and control of our assets and transactions without the need to pay a third-party to do the job. This is where the power of true self-sovereignty resides. Everyone becomes their own bank and is able to make their own financial decisions as they see fit.
The examples above all sound great in theory, but there is one major problem however. Smart contracts only store rules, but need to know of things that may happen in the real world that will affect it. If a person dies, how would the smart contract know as well as the age of the heir? If a sports wager is made, how would the smart contract know the winning team in real-time?
This is where you may have heard the term Oracles or Blockchain Oracle. Oracles are services that provide outside information to the blockchain. So in the Sports Betting example, an Oracle feed could be built for live sports games. In the Inheritance example, a deceased registry service could be built along with the smart contract having maturity dates on when to deploy funds only if person is deceased. These are all things that the Oracle Services can feed into the smart contract once built.
Chainlink is a popular Blockchain Oracle you may have heard of.
Smart Contract Platforms
In the beginning, I listed the top Smart Contract platforms that are being used right now, which are Ethereum, Polkadot, Solana, EOS and Binance Smart Chain. You may have been wondering why Cardano wasn’t listed, this is because Cardano does not currently have smart contracts working in Production. It is still being tested and is supposed to be launching sometime in the fall. Aside from the ones listed the only other one I am interested in is the Bitcoin “taproot” upgrade which is supposed to enable Smart Contracts on the Bitcoin blockchain.
To be continued…
There you have it. Hopefully things are starting to make a lot more sense. Take the time to understand everything and will wrap-up with DeFi Part III, final issue next week.
Blockchain Oracles - Wikipedia
The Best Smart Contract Platforms - Shrimpy Academy
Cardano Will Double With Smart Contract Launch and Address Count - Investor Place
As always, this is not financial advice. I use this as a way to journal my thoughts and share with anyone else interested enough to want to read this, as well as for educational purposes only.