A12: Token Builder
MediumCreate 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
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
- Lesson 10 (Solidity Basics) -- data types, functions, mappings, constructors, events
- Basic understanding of ERC-20 token standard (covered in Lessons 7 and 10)
- A modern web browser (Chrome, Firefox, or Edge)
Activity Structure
1 Setup and Starter Code (5 minutes)
- Open remix.ethereum.org in your browser
- Create a new file called
MyToken.sol - Copy the starter code from the Starter Code page into your file
- Read through the TODO comments to understand what you need to implement
2 Build the Base Token (25 minutes)
Complete the following functions in the starter code. Each has a TODO comment explaining what to implement:
- Constructor: Set the token name, symbol, decimals (18), and initial supply. Assign all tokens to
msg.sender - transfer(): Move tokens from the caller to another address. Use
require()to check the sender has enough tokens. Emit aTransferevent - approve(): Allow a spender to withdraw from the caller's account up to a specified amount. Emit an
Approvalevent - 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)
- In Remix, go to the Deploy & Run Transactions panel (left sidebar)
- Make sure Environment is set to "Remix VM (Shanghai)" or "Remix VM (Cancun)"
- Enter your initial supply in the constructor argument (e.g.,
1000000) - Click Deploy
- Test your contract:
- Call
balanceOfwith your address -- should show total supply - Call
transferto send tokens to a second test account - Call
approvethentransferFromfrom a different account - Verify balances update correctly after each operation
- Call
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:
- Token Identity: What did you name your token? What is the symbol?
- Feature Demo: Show your custom feature working in Remix (live or screenshot)
- Design Decision: Why did you choose this feature? What real-world token uses it?
- Challenge: What was the hardest part of the implementation?
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
- Start with the starter code: Do not write from scratch. The template has the structure ready -- just fill in the TODO sections
- Compile after every function: Fix errors incrementally. Solidity error messages are specific and helpful
- Test with small numbers: Use an initial supply of 1000 or 10000, not billions. It makes debugging easier
- Use multiple accounts: Remix provides 15 test accounts. Use at least 2 to test transfers
- Read the error messages: If
require()fails, Remix shows the error string you provided - Check the Lesson 10 slides: Every function you need to write was demonstrated step by step
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
- Keep your Remix IDE open with the deployed contract visible
- 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
- Be prepared to demonstrate your contract live to the instructor if asked
- All group members should be able to explain every function in the contract
Related Resources
© Joerg Osterrieder 2025-2026. All rights reserved.