> For the complete documentation index, see [llms.txt](https://decanectcoin.gitbook.io/decanect/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://decanectcoin.gitbook.io/decanect/readme-1.md).

# DeFi Masterclass

**Level: Intermediate**\
**Module Title:** *Explore the World of Decentralized Finance*

**🧠 What You’ll Learn:**

* Overview of core DeFi components
* How decentralized exchanges and liquidity pools work
* What is yield farming and how to earn passive income
* Interacting with protocols like Aave, Compound, and Uniswap

**📘 Lesson 1: Introduction to DeFi**

DeFi, or Decentralized Finance, is a blockchain-based alternative to traditional financial services. DeFi apps use smart contracts to offer financial instruments without relying on intermediaries like banks or brokers.

Key elements:

* Open access
* Non-custodial
* Programmable assets

**📘 Lesson 2: DEXes and Liquidity Pools**

* DEX: A platform like Uniswap or SushiSwap where users trade directly from wallets
* AMM (Automated Market Maker): Uses formulas like x\*y=k to price trades
* LP (Liquidity Provider): Supplies tokens to pools in exchange for a share of trading fees

**📘 Lesson 3: Yield Farming**

Yield farming is the practice of earning rewards (usually governance tokens) by staking or lending crypto assets.

Steps:

1. Add liquidity to a pool
2. Receive LP tokens
3. Stake LP tokens into a farming contract

Risks:

* Impermanent loss
* Smart contract exploits

**📘 Lesson 4: Lending and Borrowing**

Protocols like Aave, Compound, and MakerDAO allow users to lend crypto and earn interest or borrow against their holdings.

Example: Deposit DAI on Aave to earn APY. Borrow USDC using ETH as collateral. All handled via smart contracts, with interest rates based on supply/demand.
