What are smart contracts and how do they work?

Smart contracts are computer protocols that are used to facilitate, verify, or enforce the terms of a contract. They can be used for any type of transaction and are self-executing with the terms of the agreement between two parties being directly written into lines of code. This type of code can exist on the blockchain platform and can transfer assets between two parties who agree upon the terms. When a contract is created, it is stored in a decentralized, secure, and immutable ledger and enforced by the blockchain network. The terms of the smart contract are enforced automatically once the conditions of the agreement are met, eliminating the need for third-party arbitration or enforcement.