A smart contract is a self-executing computer program that enforces a defined outcome when certain agreed-upon conditions are fulfilled. It helps eliminate intermediaries and arbitrators in fulfilling a contract between disparate, anonymous parties. Currently, a smart contract is not a legally binding document.
Usually, the code and agreements are hosted on a distributed, decentralized blockchain network. As the code has full control over the execution, transactions are fully trackable and irreversible. Initially proposed by Nick Szabo, smart contracts became mainstream through the Ethereum network. Solidity is the most popular programming language to write smart contracts.