DEV Community

Cover image for An Introduction to Smart Contracts
Tudor-Radu Barbu
Tudor-Radu Barbu

Posted on

An Introduction to Smart Contracts

Hello and welcome back to The Crypto Journal.

No fear of missing out. Improve your crypto knowledge in 5 minutes with #TheCryptoJournal

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

Full article here.

๐Ÿ““ 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

โšก๏ธ 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 is one of the earliest and most specific models used to explain smart contracts (written down by Nick Szabo 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).

โš–๏ธ 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 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 - an object-oriented and statically-typed programming language for writing smart contracts on Ethereum and EVM (Ethereum Virtual Machine) compatible blockchains.

  • Rust - 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 - Functional programming at its best - used for writing on Cardano.

  • Ink! - an eDSL to write smart contracts in Rust for blockchains built on the Substrate framework. Mainly Polkadot.

  • AssemblyScript - Can be used for smart contracts on NEAR.

  • Michelson - For building on Tezos.

  • Vyper - a contract-oriented programming language that targets the Ethereum Virtual Machine (EVM) based on the principles of Python.

  • Cadence - Used for creating contracts on the FLOW Blockchain.

๐Ÿ”จ No-code Smart Contracts

Fuse.io - Create your own custom branded wallet and

currency in a few simple steps.

MyWish - Create your smart contract without coding.

GraphLinq - Automate & perform actions based on events triggered on-chain & off-chain with no-code.

Bunzz - Ready-made contracts combination. Create dApps without code.

CreatorChain - 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.

๐Ÿ›  Tools & Helpers

More in the full article here

Top comments (9)

Collapse
 
joelbonetr profile image
JoelBonetR ๐Ÿฅ‡

Bookmarked for a near future :)

Collapse
 
djpysu profile image
Tudor-Radu Barbu

Thank you!

Collapse
 
yongchanghe profile image
Yongchang He

Hello These free resources are pretty helpful, Thank you!

Collapse
 
djpysu profile image
Tudor-Radu Barbu

Thank you!

Collapse
 
marcomoscatelli profile image
Marco Moscatelli

I am learning web3 and this article is a life saving, thank you!

Collapse
 
djpysu profile image
Tudor-Radu Barbu

Thank you! #web3 FTW!

Collapse
 
artscape profile image
Artscape NFT Art Gallery

Helpful, for dummies like me.
Subscribed!

Collapse
 
djpysu profile image
Tudor-Radu Barbu

Thank you!

Some comments may only be visible to logged-in visitors. Sign in to view all comments.