An Introduction to Smart Contracts
Tags: blockchain, smartcontracts, ethereum, crypto
Published: 2022-03-15 08:06:34

---
title: An Introduction to Smart Contracts
published: true
description: An Introduction to Smart Contracts
tags: blockchain, smartcontracts, ethereum, crypto
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o5a6t1sutr98du1z2r49.jpg
---

Hello and welcome back to [The Crypto Journal](https://thecryptojournal.substack.com/p/an-introduction-to-smart-contracts?s=w).

No fear of missing out. Improve your crypto knowledge in 5 minutes with [#TheCryptoJournal](https://thecryptojournal.substack.com/p/an-introduction-to-smart-contracts?s=w)

This report will be an easy one as I will focus on the introduction to Smart Contracts.

[**Full article here**](https://thecryptojournal.substack.com/p/an-introduction-to-smart-contracts?s=w).



## 📓 What's inside

-   What is a smart contract?
    
-   Why do smart contracts matter?
    
-   How do they work?
    
-   Real-life use cases.
    
-   What do you use to write smart contracts?
    
-   How can you start learning to develop on the Blockchain?
    
-   Tutorials, guides, courses, free resources
    

[![](https://cdn.substack.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4129428-aee1-4251-9420-21f4241988aa_912x678.png)](https://cdn.substack.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4129428-aee1-4251-9420-21f4241988aa_912x678.png)

## ⚡️ What is it

Probably you've heard of **smart contracts** if you are a curious person like me and if you spent (too much) time researching the Blockchain and crypto environment. It's not new technology, but Blockchain has seriously extended the usage of smart contracts.

**Smart contracts** are collections of code that run on the Blockchain.

-   The code is **decentralized** (stored across all nodes in the network)
    
-   The code is **immutable** (can't be altered once committed to the Blockchain)
    
-   The code is **open** (anyone can view it and handle it).
    

Smart contracts cannot be deleted by default, and their interactions are irreversible.

## 🧪 Why it matters

-   Smart contracts allow cryptocurrencies to offer much more than a function as a digital currency that can transfer assets from A to B.
    
-   They allow multiple players to come to a shared outcome accurately, timely, and unattended.
    
-   You won't need to use any intermediary services to streamline a transaction.
    
-   Exclude human participation in transactions using smart contracts as the defined program code does everything.
    
-   Smart contracts provide safety as the data in the decentralized registry cannot be lost.
    
-   To sum it up: Trust, Autonomy, Safety, Backup, Speed, and Accuracy.
    

## 🩺 How does it work?

I'll try to explain this for non-programmers, but one of the most used mechanisms in computer code is "if x happens, then do y."

The most basic smart contract can use this statement as a _transaction type._

The [vending machine](https://www.fon.hum.uva.nl/rob/Courses/InformationInSpeech/CDROM/Literature/LOTwinterschool2006/szabo.best.vwh.net/idea.html) is one of the earliest and most specific models used to explain smart contracts (written down by [Nick Szabo](http://unenumerated.blogspot.com/2006/12/from-vending-machines-to-smart.html) way before the invention of Bitcoin).

- If you insert the right amount of money and choose, the vending machine gives you the selected item. The contract terms are clear, and the transaction executes independently (and no third party included).

If you bundle multiple smart contracts together, you can cultivate a complex set of functionalities that serve as the core of dApps (Decentralized Apps).

[![](https://cdn.substack.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F946ca0be-019a-4185-8ef9-364c7bb59968_480x480.gif)](https://cdn.substack.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F946ca0be-019a-4185-8ef9-364c7bb59968_480x480.gif)

## ⚖️ Use-cases

-   🏦 Financial - **DeFi** dApps designate a challenging choice to the traditional financial market. Thanks to the trustless, **immutable**, and transparent aspects of Blockchain, smart contracts can be used for lending, borrowing, trading, automatic payments, financial data recording, and oh so many more.
    
-   🐾 Digital Identity - Providing unique identity processes in digital assets removes counterfeits and makes [KYC](https://www.investopedia.com/terms/k/knowyourclient.asp) easy-flowing.
    
-   👨🏼‍⚖️ Government - A blockchain-based digital government can guard data, streamline operations, and diminish fraud, waste, and abuse while simultaneously improving trust and responsibility.
    
-   🚚 Supply Chain Management - Automates supply chain with visibility and transparency leads to fewer frauds
    
-   💰 Crowdfunding - Aiming to solve three main issues – ease up KYC verification, eliminate dependency on third-parties such as banks, and speed up pay-in and pay-out transactions.
    
-   🏥 Healthcare - Helping cross-institutional visibility, automating data share, and improving privacy.
    
-   👩‍💼 Insurance - Automating claims and settles disputes with proof.
    

## ⚔️ Players

Writing smart contracts it's not easy if you are not a developer. Various blockchains can use multiple programming languages, but here are some of the popular ones:

-   [Solidity](https://docs.soliditylang.org/en/v0.8.12/) - an object-oriented and statically-typed programming language for writing smart contracts on **Ethereum** and EVM (Ethereum Virtual Machine) compatible blockchains.
    
-   [Rust](https://www.rust-lang.org/) - a low-level statically-typed programming language that is fast and memory-efficient (used in Solana, Terra). It is type-safe, memory safe, and free of undefined behaviors.
    
-   [Haskell](https://www.haskell.org/) - Functional programming at its best - used for writing on [Cardano](https://cardano.org/).
    
-   Ink! - an [eDSL](https://wiki.haskell.org/Embedded_domain_specific_language) to write smart contracts in Rust for blockchains built on the [Substrate](https://substrate.io/) framework. Mainly [Polkadot](https://thecryptojournal.substack.com/p/polkadot-the-blockchain-protocol?s=w).
    
-   [AssemblyScript](https://www.assemblyscript.org/) - Can be used for smart contracts on NEAR.
    
-   [Michelson](https://www.michelson.org/) - For building on Tezos.
    
-   [Vyper](https://github.com/vyperlang) - a contract-oriented programming language that targets the Ethereum Virtual Machine (EVM) based on the principles of [Python](https://www.python.org/).
    
-   [Cadence](https://docs.onflow.org/cadence) - Used for creating contracts on the [FLOW](https://www.onflow.org/) Blockchain.
    

## 🔨 No-code Smart Contracts

[Fuse.io](https://studio.fuse.io/) - Create your own custom branded wallet and

currency in a few simple steps.

[MyWish](https://mywish.io/eth-token) - Create your smart contract without coding.

[GraphLinq](https://graphlinq.io/) - Automate & perform actions based on events triggered on-chain & off-chain with no-code.

[Bunzz](https://www.bunzz.dev/) - Ready-made contracts combination. Create dApps without code.

[CreatorChain](https://www.creatorchain.network/) - Blockchain-as-a-Service.

## 📝 Writing Smart Contracts (Free resources)

Even if you do not intend to write your own smart contract, it's worth learning the basics of how they operate on Blockchain.

They'll play a significant role in determining the success of individual cryptocurrencies.

-   [Learn Solidity](https://www.freecodecamp.org/news/learn-solidity-blockchain-and-smart-contracts-in-a-free/) - a 16-Hour Course on writing with Solidity on Ethereum.
    
-   [CryptoZombies](https://cryptozombies.io/en/solidity) - This course will teach you how to build a game on Ethereum with Solidity.
    
-   [Rust tutorial](https://docs.near.org/docs/develop/contracts/rust/intro) - An intro tutorial on writing smart contracts with Rust.
    
-   [Everything Rust](https://www.rust-lang.org/learn) - Get started with Rust.
    
-   [Ethereum Tutorial Database](https://ethereum.org/en/developers/tutorials/) - A database with text and video tutorials on Ethereum.
    
-   [Substrate learning](https://docs.substrate.io/v3/getting-started/overview/) - Start writing smart contracts for Polkadot with Substrate.
    
-   [Buildspace](https://buildspace.so/) - Awesome community. Hands-on courses.
    
-   [Solidity By Example](https://solidity-by-example.org/) - An introduction to Solidity with simple examples
    
-   [Soldev](https://soldev.app/) - Solana database of tutorials.
    
-   [Speedrun Ethereum](https://speedrunethereum.com/) - It guides you on how to build on Ethereum, the superpowers, and the gotchas while you build up your Web3 portfolio.
    
-   [Smart Contract best practices](https://consensys.github.io/smart-contract-best-practices/)
    
-   [Introduction to Tokens](https://www.defi-academy.com/courses/introduction-to-tokens) - Learn how to create tokens in the Ethereum Blockchain
    

## 🛠 Tools & Helpers
    
More in the [full article here](https://thecryptojournal.substack.com/p/an-introduction-to-smart-contracts?s=w)