Module 09 of 10

DeFi, Tokens & NFTs

Lessons

About This Module

Decentralized finance, or DeFi, rebuilds financial services such as lending, borrowing, trading and savings as smart contracts that anyone can use with just a wallet. There is no bank or broker in the middle: the rules are written in code, and the funds stay under the user's control. Tokens are the unit of value that makes all of this work.

You'll start with the big picture of DeFi and its building blocks: stablecoins, lending protocols like Aave and Compound, and decentralized exchanges like Uniswap. Then you'll look at NFTs and how they connect to DeFi, and see how the two main token standards work: ERC-20 for fungible tokens and ERC-721 for non-fungible ones. The module finishes with hands-on coding, writing and deploying token and NFT contracts with Solidity, OpenZeppelin and Hardhat.

DeFi is powerful but risky: smart contract bugs, price swings and liquidations are real. With these fundamentals in place, you'll be ready for the final module, Scaling & Interoperability, which covers how blockchains handle more users and how they connect to each other.

Lessons

6 videos
01

What Is DeFi? Decentralized Finance Explained

A clear introduction to DeFi: how it differs from traditional finance, and a tour of the main categories including stablecoins, lending, decentralized exchanges, derivatives and insurance.

02

Aave Explained: How DeFi Lending and Borrowing Works

A look at Aave, one of the largest lending protocols: how users supply and borrow assets, how the protocol grew, and what the AAVE token is used for.

03

Uniswap Explained: How Decentralized Exchanges Work

The story of Uniswap, the pioneer of automated market makers, and how its UNI token was distributed to the community.

04

What Are NFTs and How Are They Used in DeFi?

An introduction to non-fungible tokens: what makes them different from regular tokens, and how they can be combined with DeFi protocols.

05

Deploy an NFT Smart Contract with Hardhat and OpenZeppelin

A hands-on walkthrough of writing a non-fungible token contract in Solidity with OpenZeppelin and deploying it to a local blockchain with Hardhat.

06

Full Course: ERC-20 Tokens, DeFi with Aave and NFTs (Solidity and Hardhat)

A deep-dive reference: Patrick Collins' freeCodeCamp course, including lessons on Hardhat ERC-20s, DeFi and Aave, and NFTs. Use it to go further on the topics above.