A smart contract is a computer program that automatically enacts the terms of a purchase or service agreement between a buyer and a vendor. A decentralized, blockchain-based network hosts the code and the agreements it contains. All operations are under the code’s watchful eye, and all transactions can be viewed and cannot be undone.