What are people talking about when they talk about smart contracts?
In the context of blockchains and cryptocurrencies, smart contracts are:
– pre-written logic (computer code),
– stored and replicated on a distributed storage platform (eg a blockchain),
– executed/run by a network of computers (usually the same ones running the blockchain),
– and can result in ledger updates (cryptocurrency payments, etc).
… In other words, they are little programs that execute “if this happens then do that”, run and verified by many computers to ensure trustworthiness.
If blockchains give us distributed trustworthy storage, then smart contracts give us distributed trustworthy calculations.
Smart contracts are one of the functionalities that sets Ethereum apart from other blockchains.