A12: Token Builder

Medium

Create Your Own ERC-20 Token

Time Allocated: 60 minutes
Points: 50 (+10 bonus)
Group Size: 2-3 students
Materials Needed: Web browser with Remix IDE, Starter code template
Linked Lesson: Lesson 10 -- Solidity Basics
Submission: Working Remix contract + 2-minute presentation + written reflection

Overview

In this hands-on assignment you will build and deploy your own ERC-20 token using the Solidity programming language and the Remix IDE. You will start from a starter template, fill in the missing functions, deploy the token, and then extend it with a custom feature such as burning, minting, or pausing. Finally, your group will present the token to the class.

Learning Objectives

  • Write a complete ERC-20 token contract in Solidity from a guided template
  • Understand the purpose of each ERC-20 function (transfer, approve, transferFrom)
  • Deploy and interact with a smart contract using Remix IDE
  • Extend a base contract with a custom feature (burn, mint, or pause)
  • Communicate technical design decisions in a short presentation

Prerequisites

Activity Structure

1 Setup and Starter Code (5 minutes)

2 Build the Base Token (25 minutes)

Complete the following functions in the starter code. Each has a TODO comment explaining what to implement:

  1. Constructor: Set the token name, symbol, decimals (18), and initial supply. Assign all tokens to msg.sender
  2. transfer(): Move tokens from the caller to another address. Use require() to check the sender has enough tokens. Emit a Transfer event
  3. approve(): Allow a spender to withdraw from the caller's account up to a specified amount. Emit an Approval event
  4. transferFrom(): Move tokens on behalf of another user (if approved). Check both balance and allowance. Update the allowance after transfer
Tip: Compile frequently (Ctrl+S in Remix). Fix errors as you go rather than writing everything at once. The Remix compiler will highlight errors with red markers.

3 Deploy and Test (10 minutes)

  1. In Remix, go to the Deploy & Run Transactions panel (left sidebar)
  2. Make sure Environment is set to "Remix VM (Shanghai)" or "Remix VM (Cancun)"
  3. Enter your initial supply in the constructor argument (e.g., 1000000)
  4. Click Deploy
  5. Test your contract:
    • Call balanceOf with your address -- should show total supply
    • Call transfer to send tokens to a second test account
    • Call approve then transferFrom from a different account
    • Verify balances update correctly after each operation

4 Add a Custom Feature (15 minutes)

Choose at least one of the following features to add to your token:

Feature Description Difficulty
Burn Allow token holders to permanently destroy their own tokens, reducing totalSupply Easiest
Mint Allow only the contract owner to create new tokens and add them to any address Medium
Pause Allow the owner to pause and unpause all token transfers (emergency stop) Hardest
Bonus (+10 points): Implement two or more of the above features. For example, add both Burn and Mint, or all three. Each additional feature earns bonus points.

5 Presentation (5 minutes total -- 2 min/group)

Prepare a short presentation for the class covering:

Deliverables

Item Points Description
Working Base Contract 25 ERC-20 token compiles, deploys, and passes basic tests (transfer, approve, transferFrom)
Custom Feature 15 At least one additional feature (burn, mint, or pause) implemented correctly
Presentation 10 Clear 2-minute presentation demonstrating the token and explaining design decisions
Total 50
Bonus: Multiple Features +10 Implement 2 or more custom features (+5 per additional feature, max +10)

Tips for Success

Real-World Context: Every major cryptocurrency token (USDT, LINK, UNI, AAVE) implements the ERC-20 standard you are building today. There are over 500,000 ERC-20 tokens deployed on Ethereum. The skills you practice here are directly applicable to blockchain development careers.

Submission Instructions

  1. Keep your Remix IDE open with the deployed contract visible
  2. Write a short reflection (3-5 sentences) on what you learned and what you found challenging. Include this in your presentation or submit as a separate note
  3. Be prepared to demonstrate your contract live to the instructor if asked
  4. All group members should be able to explain every function in the contract

Related Resources

Rubric Answer Key Instructor Guide Starter Code

© Joerg Osterrieder 2025-2026. All rights reserved.