What is a Smart Contract?
DeFi[L]EarnA smart contract is a programmable contract that allows two counterparties to set conditions of a transaction without needing to trust another third party for the execution.
For example, if Alice wants to set up a trust fund to pay Bob $100 at the start of each month for the next 12 months, she can program a smart contract to:
1. Check the current date
2. At the start of each month, send Bob $100 automatically
3. Repeat until the fund in the smart contract is exhausted
Using a smart contract, Alice has bypassed the need to have a trusted third-party intermediary (lawyers, escrow agents etc) to send the trust fund to Bob and made the process transparent to all involved parties.
Smart contracts work on the “if this, then that” principle. Whenever a certain condition is fulfilled, the smart contract will carry out the operation as programmed.
Multiple smart contracts are combined to operate with each other, which would be known as decentralized application (Dapp) in order to fulfill more complex processes and computation.
What is Ether (ETH)?
Ether is the native currency of the Ethereum blockchain.
It is like money and can be used for everyday transactions similar to Bitcoin. You can send Ether to another person to purchase goods and services based on the current market value. The Ethereum blockchain records the transfer and ensures the finality of the transaction.
Besides that, Ether is also used to pay for the fee that allows smart contracts and Dapps to run on the Ethereum network. You can think of executing smart contracts on the Ethereum network as driving a car. To drive a car, you require fuel. To execute a smart contract on Ethereum, you need to use Ether to pay a fee known as Gas.
Ether is slowly evolving to become its own unique reserve currency and store of value. Currently, within the DeFi ecosystem, Ether is the preferred asset choice used as the collateral underlying many DeFi Dapps. It provides safety and transparency to this financial system. If this confuses you, do not worry as we will be covering this topic in further depth throughout this book.
What is Gas?
On Ethereum, all transactions and smart contract executions require a small fee to be paid. This fee is called Gas. In technical terms, Gas refers to the unit of measure on the amount of computational effort required to execute an operation or a smart contract. The more complex the execution operation is, the more gas is required to fulfill that operation. Gas fees are paid entirely in ETH.
The price of gas can fluctuate from time to time depending on the network demand. If there are more people interacting on the Ethereum blockchain such as transacting in ETH or executing smart contract operations, due to the limited amount of computing resources on the network, Gas price can increase. Conversely when the network is underutilized, the market price of gas would decrease.
Gas fees can be set manually, and in a situation where the network is congested due to high utilization, transactions with the highest gas fee associated with it will be prioritized for validation. Validated transactions will be finalized and added to the blockchain. If gas fees paid are too low, the transactions will be queued up which can take a while to complete.
Therefore, transactions with lower-than-average gas fees can take much longer to complete.

Original article is taken from Coingecko's book "How to DeFi"
🖋 Subscribe our tg-channel DeFi_L_Earn