What is a smart contract?
The BlockchainHub "A smart contract is a computer code running on top of a blockchain containing a set of rules under which the parties to that smart contract agree to interact with each other. If and when the pre-defined rules are met, the agreement is automatically enforced. The smart contract code facilitates, verifies, and enforces the negotiation or performance of an agreement or transaction. It is the simplest form of decentralized automation." [1]
Simply put, a smart contract is a distributed trusted program that runs on a blockchain network . It , it is the business logic of a blockchain application [2]. It is distributed because all the network participants not only have a copy of the smart contract, but they also execute the smart contract. It is trusted because once the participants execute the smart contract, they must have the same outcome and come to consensus. Once the criteria on the blockchain network is met, then its code defined in the smart contract will automatically execute, applying any business logic contained as predifined built-in rules.
...
Ref3: https://nakamotoinstitute.org/the-idea-of-smart-contracts/
Architecture of smart contracts
TBD – Discuss types, for example:
• Order-execute
• Execute-order-validate
Differences between a smart contract and a law contract
TBD
Examples of smart contracts
There are many examples of smart contracts. Probably the most popular are in the crypto currency cryptocurrency space, such as Bitcoin and Ethereum. For example, Bitcoin does have a smart contract, albeit a hard-coded one. In other words, the Bitcoin smart contract defines who, what and how Bitcoin works. Whenever someone initiations a transfer of Bitcoin funds, they are essentially executing a smart contract. You cannot simply modify the Bitcoin smart contract without the majority of the network agreeing your version. The other option would be to fork the network and creating an entirely separate blockchain network. This is similar to how Bitcoin Cash came to be.
Ethereum, on the other hand allow , allows you to run various smart contracts on the same network. TBD
Example smart contract use case
Ref: Smart Contracts Business and Use Cases
...