Smart Contracts In Blockchian

What are smart contracts?

Smart contracts are line of codes which you run on Ethereum network which follows ‘if… then ‘conditions. These are basically conditions written in blockchain.

Currently, there are six smart contracts blockchain platforms, these are Ethereum, Polkadot, Solana, Hyperledger, Tezos, and Stellar. Recently, Cardano also launched this functionality for their testnet. 

How do smart contracts work?

Let’s take an example of e-commerce website A. We buy a product on an e-commerce website called A and since A does not have a delivery service, B is responsible to deliver the product to the customer. What if B is doing some fraud? We will be paying money to A and A would also give some commission to B to deliver the package, but we won’t receive the product. So, there is a trust issue between three different parties, from our side to A and from A to B.

To solve these types of trust issues we can use smart contracts here. What if the entire payment system will be automated. Let’s take the above example, we will buy something from A and the amount will be prepaid but A will not receive the money. They will receive the money only when I receive the product. It’s just like ‘if… then’. Similarly, B receives money only when the product is successfully delivered.

This can be many sectors like gaming, healthcare, real estate.

Types of smart contract

1. Smart legal contracts

 These contracts can be legally enforceable by law. If either party violates this contract, they will be legal action as a consequence.

It consists of three components.

  • Text
  • Data
  • Logic

2. Decentralized Autonomous Organization (DAO)

It is about fully functional, automated organization without hierarchical management. A DAO to function on its own, a functioning DAO is created which has two phases.

  • Launch phase - Define and activate
  • Funding phase- Internal property and currency

When both the functions are done a DAO can function on itself and its functions are carried by its stakeholders through voting.

3. Application Logic Contracts (ALC)

It is an application-based code that is fed data from other smart contracts. It ensures better automation, cheaper transactions, and higher security. It enables communication with different devices and helps to merge technologies with blockchain technology.

Advantages of using smart contracts,

  1. Fast and efficient
  2. Transparency
  3. Security
  4. Saving

Some of the use cases of smart contracts,

  1. It can be used in legal cases so that trust issues will be reduced.
  2. It can be also used in economic sector like banking etc.

Limitations of smart contracts,

  1. Scalability issues
  2. Adaptability
  3. security