Blockchain and smart contracts basics in 2 minutes
Shahid Alam
Posted on October 23, 2022
This article aims to give you the necessary "bare minimum" knowledge to get started in web3. These are enough if you are just starting out your journey in web3
Let's get started! Blockchain and smart contract basics in less than 2 minutes. Go!
What is blockchain?
It's a "book" or ledger that is kept by everyone who run the blockchain. These people/machines are known as nodes and every node has a copy of the ledger to verify any transfer of assets. That's it. No one person owns the blockchain.
Blockchain is the tech behind bitcoin that allows people to do peer-to-peer (one person to another) transactions without any company in between.
Since no other company or person is between people when transacting (like credit card companies or e-wallets), it was seen as a huge improvement that allowed privacy (since no one can see who sent who), great security (powered by miners by solving complex mathematical problems) and no reliance on third party (like your bank or credit card companies).
What is a Smart Contract?
Smart contracts are a set of instructions executed in a decentralized way between parties. It’s an agreement, contract or a set of instructions that is deployed on a decentralized network.
Bitcoin also has this feature, however it is not optimized for it. Ethereum is a better candidate.
For smart contract to work and replace the traditional use cases and contracts, we need to push data to it using an external system. However, it cannot get data from the real world directly(like getting cricket scores or weather reports). This is known as the “Oracle Problem”.
Oracles are devices or systems that help feed data to smart contracts from the real world(“off-chain”). For the blockchain to be decentralized, we cannot work with only one oracle. We need a decentralized oracle network (such as Chainlink) as well. This combination of off-chain data with the on-chain logic gives rise to Hybrid Smart Contracts. They help smart contracts to execute a contract with the help of external data by Oracle.
What is the value of smart contract?
Smart contracts create “Trust Minimized Agreements”. They create unbreakable promises or agreements. This helps in speed and transparency. For example, when you buy something online, they promise to deliver the product to you. When you deposit money in your bank account, the bank promises to keep the money safe and in turn you promise to pay the fees they charge.
Sometimes, the people who we put our trust in for work, break them and in most cases, get away with it. This is where smart contracts come into the picture.
Now, there are already systems that solve or prevent these problems in our society, like courts. However, frauds do happen, trusts are broken, and the terms are not met. And as already mentioned, in some cases, they get away with it or take YEARS to make justice happen. Examples - the recession of 1980s when banks refuse withdrawal of its own customers’ funds, the demonetization of some Indian currency notes that caused a lot of controversies and death of a lot of people due denied access to their own money, insurance companies refusing claims because of “hospital partnership agreements” when you really need it.
Here, you trust the BRAND and hope that they do as they have promised.
The traditional alternative is to go to another entity that provides the same service and hope to not get scammed or screwed over.
- In contrast, smart contracts are :
- Immutable
- Executes automatically
- transparent (anyone can see the terms of agreements)
This makes sure that not one central entity can alter the terms in his/her favor. In this case, we trust the MATH and CODE that only has a “single truth” and will execute on fulfillment of the promise ONLY.
Benefits of smart contract
- Decentralized - no entity or single person controls the network. The blockchain is run by individuals/machines who are also known as “node operators”. It is the combination of the node operators and the algorithms they run that make the network decentralized.
- Transparency & flexibility - anyone, even you, can see everything on the chain. This allows the public to review the terms and confirm if they are being ripped off or mislead.
- Speed & efficiency - sending or receiving money happens within minutes (and sometimes seconds!) where traditional methods such as wire transfer overseas take several days to complete. Hacking the blockchain is nearly impossible since to tamper a simple contract, the hacker will need to change the ledger (or history of transactions) on thousands of nodes. Personal opinion - this works great for someone sending money internationally. For domestic, I think UPI is a better alternative.
- Removes third-party reliance.
- Trust minimized agreements - It's less trust, more truth reliant.
Applications of smart contract so far
- DeFi - decentralized finance that removes the reliance on banks and financial institutions to keep our money safe and engage in financial activities.
- DAO- Decentralized Autonomous Organization are groups/ organizations that are governed by a set of instructions or smart contracts. They have no central leadership and are governed by the set of instructions and code written in smart contracts.
- NFTs - Non-Fungible Tokens are pieces of arts (not the ugly apes, please) that are like special collectable cards or Pokémon toys you used to buy because they were limited.
Check out part 2 here!
Posted on October 23, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.