Smart contract
Another capability that is indispensable in a modern blockchain is smart contracts. A smart contract, also known as a cryptographic contract, governs interactions with the digital ledger, and it allows agreements between network participants to be executed automatically. Smart contracts can act as a complement, or substitute, for legal agreements. It is computer code that directly controls certain aspects of transactions under certain conditions. A smart contract not only defines the terms and conditions (rules and penalties) of an agreement, but it is also capable of automatically facilitating, executing, and enforcing the negotiation or performance of an agreement. A smart contract does this by taking the input, putting that input through the rules set out in the smart contract, and executing the required actions defined by those contractual clauses. For example, a smart contract could stipulate the pay-out on a shipping of perishables depending on when the shipment arrives. Shipments that arrive later than agreed to by both parties are free; otherwise, the importer automatically pays the grower the unit price × the number of units in the shipment.