A smart contract is a function or algorithm that is automatically carried out by a computer system in a trackable and irreversible manner, often on a blockchain. A smart contract has the aim to digitally facilitate and enforce the negotiation and performance of a contract.