Smart Contracts

Smart Contracts
A smart contract is a self-executing computer program that is designed to automatically enforce the terms of a contract between parties.
It is a computer program that runs on a blockchain and can be used to facilitate, verify, and enforce the negotiation or performance of a contract.
Smart contracts typically contain a set of rules and conditions that the parties agree to abide by, and they are coded to automatically execute when those conditions are met.
They are often used in applications such as decentralized finance (DeFi), supply chain management, and voting systems.
One of the key advantages of smart contracts is that they can operate autonomously, without the need for intermediaries such as banks, lawyers, or other third-party service providers.
This can reduce transaction costs and increase efficiency and transparency in various industries.
Important Points regarding Smart Contracts:
It is a program that is stored on the blockchain and runs when predetermined conditions are met
It is self-executed, runs when the conditions are met
They are immutable
Can hold balance
They are public/Transparent
We need a fee for executing the smart contract
ALL operations are traceable and irreversible
Anyone. can deploy a smart contract
Once deployed nothing can be changed or they cannot be deleted
Where are the smart contracts held on a block.So block in ethereum has both transaction as well smart contracts
If the smart contract runs independently then why do we need a fee
While a smart contract runs automatically and independently on a blockchain network, the execution of the contract still requires computational resources to be processed by the network's validators or miners.
These validators or miners require compensation for their work in the form of gas fees.
The gas fee is a transaction fee that is paid by the party initiating the transaction on the blockchain network.
It is used to pay for the computational resources needed to execute the smart contract. The more complex the smart contract, the more computational resources required, and therefore the higher the gas fee.
So, while the smart contract runs automatically and autonomously, it still needs to be processed by the network's validators or miners, and they need to be compensated for their work. This compensation is provided through the gas fee paid by the party initiating the transaction.
What is a Dapp
A DApp, or decentralized application, is a computer application that runs on a blockchain network. DApps are designed to be decentralized, meaning that they operate on a distributed network of computers rather than relying on a single centralized server.
In contrast to traditional applications, which are typically owned and operated by a single entity, DApps are open-source and operate on a decentralized network, which makes them more transparent and resistant to censorship.
DApps are typically built on top of existing blockchain platforms, such as Ethereum, and are programmed using smart contracts.
They can be used to facilitate a variety of functions, such as financial transactions, identity verification, and content sharing.
One of the key advantages of DApps is that they operate in a trustless environment, meaning that they do not rely on a centralized authority to verify transactions or enforce rules.
Instead, they use cryptographic algorithms and consensus mechanisms to ensure the accuracy and security of transactions.
Examples of DApps include decentralized exchanges (DEXs), where users can trade cryptocurrencies without the need for a centralized exchange, and blockchain-based social media platforms, where users can share and earn rewards for content creation.
stands for "Decentralized Application" and is an application that runs on a blockchain and utilizes the blockchain as it's single source of truth.
Note: I am referencing to the ethereum blockchain network and the local currency is ETHER or called as eth




