What are Smart Contracts & how they are contributing to Web 3.0

After the recent tweets from the Dogefather & the release of Uniswap v3, the crypto market got completely overturned. In fact, all of the coins were up trending because of this hype where Ethereum touched its record time high of $3,306.42 that makes Ether’s ROI be 8087.2% 🙂

Cryptos have begun the buzz again just like in 2018 and a lot of words started trending like Decentralization, Blockchain, Web 3.0 and many more.

But have you ever wonder why people are associating the word Web 3.0 with this hype, and how this can transform the future?

Let’s understand, Services like GitCoin, Audius, Compound, StorJ, Oasis, Ephimera etc. are all built as a Decentralized platform using blockchain or rather using the Ethereum platform.

  • Ethereum is not just an AltCoin, it’s a complete platform that has the capability to shape the entire Centralised Finance system like banks, insurance etc. in the coming 10 years.
  • Ethereum is a decentralized open-source blockchain.
  • It has the currency of its own known as Ether, and is the second-largest cryptocurrency by market capitalization, after Bitcoin.
  • Ethereum is the most actively used blockchain.
  • Ethereum can easily be programmed and allows you to build DApps(decentralized apps).
  • Every 15 seconds a new block gets added, making it 5,760 blocks a day in the Ethereum chain.
  • Popular apps on Ethereum that you can use now.

And, to fully understand Ethereum, we need to first understand what really are Smart Contracts, which is the core of the Ethereum Platform.

What are Smart Contracts then?

Smart Contracts in general are a piece of code that stays in the blockchain network and performs the series of steps as programmed. They maintain their own state for eg. Ether Balance, Contract Name, address of the sender etc. The state is shared between the complete network.

Smart Contracts are a big misnomer as they are not at all Smart, they will behave as you programmed, just like If This – Then That. The word smart implies because it doesn’t involve any third party or human to be able to process this transaction.
Smart Contracts can be programmed just like in normal programming languages, for instance, you want to send some amount of Ether once a year for someone’s birthday, or cases like auto rent payment every month.

Benefits of Smart Contracts

Smart Contracts Offer several benefits when programmed appropriately. It can allow people to do transactions without third parties, saving the cost for middlemen, for instance, Real Estate property registration where multiple registrations & brokers are involved, cases like that can be automated with Smart Contracts & OpenLaw.

Since this is a completely autonomous system, so there is no risk of human errors & manipulation, they are safe & decentralised, can reduce the administration time & cost.

How they came into existence?

Smart Contract might sound new, but it came into existence where a cryptographer named Nick Szabo, wanted to design the traditional contracts in such a way where they get autonomous & executed when certain conditions are met, that way you don’t have to trust the third party like Banks & brokers and making it completely Decentralized.

But the real working example of Smart Contracts came after the initial foundation for Ethereum was laid out by Vitalik Buterin in 2014.

How does a Smart Contract Look like?

You can find a ton of Smart Contracts on Etherscan, which gives you a detailed overview of the active Ethereum blockchain, as the blockchain is public every transactions & contract can be publically accessed.

Below are some of the contracts from one of the test networks for Ethereum i.e. Rinkeyby

There are two popular language choices when it comes to Smart Contract programming

Sample Smart Contract in Solidity

                    

pragma solidity ^0.5.2;

// Contract HelloFTD
contract HelloFTD {

// storage for the contract, this will be permanently stored inside contract
string public msgToFTD;

constructor(string memory initMessage) public {
msgToFTD = initMessage;
}

function updateMessage(string memory newMsg) public {
msgToFTD = newMsg;
}
}

Check out this wonderful comparison between Solidity & Vyper to choose the ideal language for your development.

Hope you learned something from this today, feel free to add your questions/feedback in the comments. 🙂