EthSpring

⌘K
  1. Home
  2. Docs
  3. EthSpring
  4. Ethereum Applications
  5. Tokens, DEX, and Stablecoins

Tokens, DEX, and Stablecoins

We’ll cover ERC-20 (how ICO works); decentralized exchange – Uniswap (how to swap ETH for some ERC-20 tokens); and stablecoin (DAI and USDC are all ERC-20 tokens).

This is going to be a brief overview. For an in-depth understanding of these topics, recommend attending the DeFi track.

ERC-20

Readings

ERC-20 token standard

https://github.com/ethereum/EIPs/issues/20 – interesting to read through the original discussion thread

ERC-20 tutorial on ethereum.org with Web3.py example

ERC-20 ConsenSys implementation

ERC-20 OpenZeppelin implementation

Recommend the book Mastering Ethereum for an overview of Ethereum, there’s a chapter tokens talking about ERC-20 token.

Some examples of ERC-20 tokens:

UNI (Uniswap)

COMP (Compound)

DAI (Dai)

MKR (Maker)

BAT (Basic Attention Token)

WBTC (Wrapped BTC)

USDC (USDCv2: upgrading a multi-billion dollar ERC-20 token)

Filecoin is NOT an ERC20 token, here is more about the filecoin ICO

ERC-20 tokens on Etherscan

Interact with Smart Contracts on Etherscan – Etherscan blog

Metamask Tips and Trcks – Video, tips on advanced gas control and ledger

For checking current gas price

Solidity By Example – Use this as a reference to learn solidity

Quests

  • Interact with smart contracts on etherscan
    • Get some ERC20 token, e.g. DAI (can swap your ETH for DAI on Uniswap, see the topic below on how);
    • Go to the ERC20 token smart contract page on etherscan, e.g. DAI contract page;
    • Go to Read Contract, try reading different fields, e.g. put your address as input to check balanceOf;
    • Go to Write Contract, use transfer to transfer some token to another address of yours;
    • Look at the transaction in etherscan;
    • Go to Read Contract again to verify the balanceOf changed for your other address.

Decentralized exchange – Uniswap

Readings

A comparison of Decentralized Exchange Designs

Constant Function Market Makers: DeFi’s “Zero to One” Innovation

Uniswap – A Unique Exchange – A good introduction on fundamental ideas behind Uniswap

Minimum Viable Exchange and this gif – Gave you a good intuition about how the constant product market maker model (x*y = k) works

Uniswap Guide with Advanced Tips and Tricks – Video

How to provide liquidity on Uniswap V3 – with Screenshots

Uniswap V3 – New Era of AMMs? Architecture Explained – Video from Finematics (checkout other Finematics videos too)

A good deal for liquidity providers? – Explains impermanent loss

Understanding Uniswap Return

Uniswap docs

Uniswap smart contracts

Quests

  • Swap some ETH for another ERC20 token (preferably Stablecoin like DAI) on Uniswap
  • Add liquidity to a Uniswap pool
  • Remove liquidity from the Uniswap pool
  • Ceate your own ERC20 token, and add it to Uniswap

Stablecoin

Readings

Ethereum.org stablecoin tutorial – Types of stablecoin

Stablecoins: designing a price-stable cryptocurrency

How MakerDAO Works – Video, Coindesk on the DAI “stablecoin” protocol

What is Maker DAI? Beginner’s guide

The Market collapse of March 12-13, 2020: How it impacted MakerDAO

Awesome MakerDAO – more resource on DAI and MakerDAO

Quests

  • Mint some DAI – There’s a “see how it works” video on the website