Smart contracts are like tiny programs stored on a blockchain that make something happen when certain conditions are met. It’s an automated, self-executing contract that has the terms of an agreement between a buyer and seller written in its code. Smart contracts give buyers and sellers certainty over an agreement’s outcome without having to involve an intermediary and save them time and effort. The conditions that must be met before an action is taken are determined in advance, and then the smart contract monitors whether those conditions have been satisfied. Once all conditions are met, then the predefined action is taken.
Think of it like a fancy If/Then statement. If a vending machine were run by smart contract, the smart contract would say: IF (1) money is inserted AND (2) selection is made AND (3) product is in stock, THEN (A) vend product to buyer AND (B) give money to vending machine owner AND (C) give the snack to the buyer.