Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions Gas_and_Fees_Akomaye Meshach.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# What the Hell is Gas Fee and Why Should I Care?

Think of **gas fee** as a **transaction fee** on the blockchain. It's paid in every transaction you make and goes to **validators** or **miners** to keep the blockchain **secure** and **decentralized**.

---

## Who are Validators / Miners?

**Validators** or **miners** are people who **validate every transaction** on the blockchain. They ensure that the chain remains **secure** and **decentralized**.

---

## Why Should I Pay Them My Money?

There are two major types of consensus mechanisms:

1. **Proof of Work (PoW):**
- Validators (miners) use **computational power/energy** to solve complex mathematical problems (cryptography).
- This process validates transactions and includes them in blocks.

2. **Proof of Stake (PoS):**
- Validators **stake their tokens** in the blockchain.
- They use computational resources to validate transactions.

In both systems, **validating transactions is resource-intensive**. The **gas fee** is your way of **thanking them** and **paying for the infrastructure** that keeps the blockchain running.

In some blockchains, gas fees are not just for validator rewards—they're also used to **maintain the security and operations** of the network.

---

## What is EIP-1559 and Why Should I Care?

Once upon a time, the Ethereum chain became **congested**—too many people making transactions at the same time, like a **traffic jam**.

During this period, validators prioritized transactions based on how **high** the gas fee was. Some users ended up paying **2–3x** their transaction value just to get included.

To solve this, Ethereum introduced **EIP-1559**, which added two key concepts:

### 🔹 Base Fee
- This is the **minimum fee** for a transaction.
- It's **adjusted based on network congestion**.
- Over time, base fees are **burned**, reducing ETH supply.

### 🔹 Priority Fee (Tip)
- A small **tip to validators**.
- Think of it as a **thank you message sent in advance** to prioritize your transaction.

---

## What is Slippage and Why Should I Care?

**Slippage** is your **risk tolerance** for **price changes** during a volatile market.

Example:
- You're buying a token at **$1 each** and want to spend **$100**.
- But the token price is **volatile**.
- You set your **slippage to 2%**, meaning you're okay with the price going slightly down or up.
- If the price rises, you may end up with **98 tokens** instead of 100.

Setting slippage protects you from **failed transactions** but also determines **how much price movement you're willing to accept**.

---