8. What is a Smart Contract?
Just like the traditional contracts that we use in our daily lives (from purchasing a car to selling a property), smart contracts are a digital contract in the form of a computer program that is stored inside a blockchain. In the distributed environment of blockchain, smart contracts make sure that the participants comply with the agreed-upon terms and conditions.
Traditional Intermediaries
Though it’s not a very ethical example, consider a betting website
that allows the fans to place a bet on the football match. It requires people to fund their bets beforehand.
People tend to bet through a betting website because they do not know each other, and they do not trust each other. Thus, the website works as an intermediary and ensures that the people get their money if they win the bet. The trust that people put in the betting website is owing to the fact that the website charges service fees
. Therefore, win or lose, the website always wins. But iff the website isn’t well established, those who manage the website may run away at any time. So, this threat
always remains.
Blockchain & Smart Contract
Blockchain enables people to place a bet without an intermediary. People do not trust each other! Do not worry. They don’t need to. They will trust the Blockchain Protocol
. This is where the smart contract comes into action. Once the bet is funded, the smart contract will automatically release the funds to the right person as soon as the conditions get fulfilled. So, if a person placed a bet in favor of team X, then the blockchain network will verify the outcome of that match from various sources and release the amount immediately.
Why do we trust smart contracts?
For starters, because the funds aren’t stored in one single place. They are distributed over the network and cannot be manipulated by anyone. Moreover, they are immutable in the sense that an agreed-upon can never be changed. There are no chances of anyone tampering with your smart contract. Since the smart contract is distributed, it will be verified by everyone involved in the network. So, a single-sided attempt of releasing the funds will be labeled as invalid and will be discarded.
