Smart Contracts Basics

Cardano Explained

Smart Contracts Basics

The Alonzo hard fork is bringing smart contract capability to the Cardano ecosystem. We are all familiar with the term "smart contracts", but what are they? What is the potential they offer?

The next significant IOHK project to be launched is the Alonzo hard fork which will bring full smart contract capability to the Cardano ecosystem through the integration of Plutus scripts on the blockchain.  Alonzo is named after mathematician and theoretical computer scientist Alonzo Church.  Many Cardano community members are participating in the Plutus Pioneers set of courses to learn the core principles of coding in Plutus. Plutus is a “purpose built smart contract development language” that uses the functional programming language Haskell.  Alonzo’s testnet rollout plan has 5 stages: Blue, White, Purple, Red, and Black. The Blue phase is currently underway. 
 
   Smart contract capability will be a huge step forward for Cardano, so at this point in time I thought it would be useful to explain the basics of smart contracts: 
   
  We are all accustomed to the term “smart contracts”, but what are they? What is the incredible potential they offer?  Nick Szabo, a computer scientist, law scholar and cryptographer proposed the idea of smart contracts in 1997.  In a world that relies upon intermediaries, lawyers, middlemen, brokers, agents, and third parties, smart contracts embody the the most powerful democratizing elements of crypto currencies and blockchain technology.  Blockchain offers secure digital identity, secure storage of personal credentials and documents, and secure verifiable personal financial authenticity. We will all benefit from the capability of smart contracts running on the blockchain, but for at least 3 billion of earth’s residents who do not enjoy the commonly assumed privileges of personal documentation and legal authentication, the opportunities are literally life changing.
    
  Decentralization, immutability,  security, and the trust inherent in a distributed ledger are the foundation that smart contracts are built upon. For the “unbanked” and “undocumented” citizens of the world, these sureties will empower them and enable them to lead better lives. It is Cardano’s mission to make that life changing technology available.  For the residents of nations that have access to the normal advantages of modern society, smart contracts will be equally as liberating, but also highly disruptive to many industries, governmental organizations, and civilian data infrastructures.
 
   So what are smart contracts? Simply put, smart contracts are executed as pieces of code running on a blockchain.  A smart contract stores data, verifies rules, and self executes.  Smart contracts require no intermediaries or middlemen, deriving absolute trust from the shared distributed ledger.  They offer speed, accuracy, and the immutability of the blockchain. Smart contracts can be said to “codify business logic.” There is literally nothing that will not be changed by the combination of smart contracts and the  blockchain.  Smart contracts enable the development of apps that offer peer-to-peer functionality. Defi is the first and most obvious sector that is being enabled by smart contracts.  
 
   A simple description of smart contracts is the example of a Vending Machine.  A vending machine functions on rules which must be fulfilled and verified before it will dispense its offerings.  You put the required amount of money into the machine, it verifies that the rules have been fulfilled, and then it self executes the “contract” by dispensing a snack or a drink or whatever it holds for sale.  You don’t need a lawyer, or a broker, or an agent to verify the transaction and execute the interchange.   No one gets a commission on the deal between you and the vending machine.  And once the transaction is complete, it cannot be reversed, you can’t simply put the item back onto the machine and get a refund.  Furthermore, no one can alter the transaction by dispensing the incorrect item or requiring that more than the stated amount be paid. 
 
   The real world circumstances to which smart contracts can be applied  are everywhere in our lives.  Real estate, health care, law, energy production and consumption, government agencies, medical records, all aspects of personal and business finance, agriculture, commodities, construction, manufacturing, supply chain systems, product provenance, data gathering and processing…there is no end to the list. Everything from national census data and urban farming to all forms of personal identity and documentation will be revolutionized by the combination of the blockchain and smart contracts.  
 
  Smart contracts are written in a range of programming languages.  Their code is open and verifiable, any interested party can inspect the contract’s code and verify the logic it follows. They can be deployed by anyone. Once deployed and running on a blockchain they cannot be tampered with or altered. However, we are not all adept at coding and programming, so for those of us in the Cardano community, the good news is that Marlowe, a DSL,  (Domain Specific Language) has been created and the Marlowe Suite will be available in the near future. But I’ll leave that for the next post…
  
written by: Eric Hill     published at: Jul 7, 2021

Further articles you might be interested in


Knowledge Base

Gottfried Wilhelm Leibniz: The Last Of The Polymath Geniuses

I wrote about the great genius Geralomo Cardano in an earlier post. He was what we call a "Polymath", which was a common description of early scientists and mathematicians before the concept of "academic specialization" became the normal path to follow. Gottfried Wilhelm Leibniz is considered to be one of the last great Polymaths, and for good reason.

Dec 3, 2023, by Eric Hill


Knowledge Base

A.T. and A.I.

Anyone who has studied the history of computer science and cryptography will be familiar with the terms, "Turing Complete", and "Turing Machine". These terms were coined due to the influence Alan Turing had before computers as we know them existed. His brilliant solution to breaking the Nazi's Enigma coding machine during WWII has been well documented in multiple books and films. However, just before his untimely death in 1954 at age 42, (69 years ago) he correctly foretold the potential of what we now call, "AI", and the disruption it would cause in our own time.

Sep 7, 2023, by Eric Hill


Partners

The Generation Forest Panama Update

One of the important aspects of CardanoCafe is its commitment to supporting charitable organizations that positively impact our planet's ecology. One of the most dynamic organizations we support is The Generation Forest project in Panama. Here is an update on the activity there.

Jun 21, 2023, by Eric Hill


Knowledge Base

What is ESG?

Most of us agree that businesses should apply the basic concepts of ESG to reduce environmental stress on the earth and to encourage like-minded individuals to invest in those companies. Here is a basic description of ESG principles, and an observation on the backlash that has arisen in opposition to them.

Apr 9, 2023, by Eric Hill


Knowledge Base

Charles Hoskinson

Everything relating to Cardano can be traced back to its co-founders: Charles Hoskinson and Jeremy Wood. I highlighted Jeremy Wood in one of my recent posts, and now I will attempt to illuminate some of the important facts about Charles Hoskinson and his broad sweeping vision for Cardano and the world.

Mar 22, 2023, by Eric Hill