Smart contract, also known as a cryptocontract , is a computer program that directly controls the transfer of digital currencies or assets between parties under certain conditions.It not only defines the rules and penalties related to an agreement in the same way that a traditional contract does, but it also automatically enforces those obligations. Smart contract are similar to a contract in the physical world, but it’s digital and is represented by a tiny computer program stored inside a blockchain.
What's the main idea behind a Smart Contract?
Since a smart contract removes reliance on a third party when establishing business relations, the parties making an agreement can transact directly with each other.
Consider the example of a crowdfunding platform where product teams share their projects and collect money from supporters until a goal is reached. If such a platform is centralized – like ABC, for instance – then it acts as a third party between product teams and supporters who donate their money. This means both sides need to trust ABC and, in fact, pay an additional fee to ABC to serve as an intermediary.A smart contract can perform the same crowdfunding actions like sharing projects, setting goals, and collecting donations, but without a third party.We can program a smart contract to execute all of these actions.More precisely, we can program a smart contract to receive funds until a goal is reached. If the project gets fully funded before the deadline, the money raised automatically goes to the product team. If the project fails, the money automatically goes back to supporters.Since a smart contract is stored inside a blockchain where all data is stored in a decentralized manner, no one is in control of the money. In a decentralized business model, smart contracts replace any other trusted third party.