How to Create a Meme Coin: Deploy an ERC-20 Token on Uniswap

How to Create a Meme Coin: Deploy an ERC-20 Token on Uniswap

In this tutorial, we'll walk through how to create your own meme coin using thirdweb and deploy it to a decentralized exchange like Uniswap. By the end, you'll have a tradable meme coin and understand the basics of providing liquidity.

What you'll learn:

  • How to deploy an ERC-20 token smart contract
  • Minting a token supply
  • What a DEX (decentralized exchange) is
  • Creating a liquidity pool on Uniswap
  • Swapping your meme coin

Video Tutorial

Prerequisites

  • A web3 wallet like MetaMask
  • Some test funds on blockchain network of choice

Let's get started!

Step 1: Deploy an ERC-20 Token Contract

First, we need to deploy a smart contract that will represent our meme coin. We'll use thirdweb to do this.

  1. Go to the thirdweb dashboard. Hit 'Get Started' and connect your wallet.
  2. Go to the Contracts tab and click 'Deploy Contract'.
  3. Choose the 'Token' contract (not Token Drop). This is a standard ERC-20 token.
  4. Configure your token:
    • Upload an image
    • Enter a token name
    • Enter a symbol
    • Add a description
  5. Select a blockchain to deploy to. (Uniswap supported testnets)
  6. Click 'Deploy Now'.

Confirm the deploy transaction in your wallet. Once deployed, you'll see your token contract in the dashboard.

Step 2: Mint a Token Supply

Next, let's mint an initial supply of tokens to your wallet.

  1. Open your token contract in the dashboard and go to the 'Tokens' tab.
  2. Click 'Mint Tokens' and enter the amount to mint, e.g. 1,000,000.
  3. Confirm the transaction. You should now see your wallet's token balance.
💡 Tip: You can optionally lock the minting permissions in the 'Permissions' tab if you don't want anyone to mint more later.

Step 3: Add Token to Wallet

To interact with your token, add it to your wallet:

  1. Copy your token contract address from the dashboard.
  2. Open MetaMask, go to Tokens > Import Token.
  3. Paste your contract address. The token details should auto-fill.
  4. Click 'Next' to finish.

Step 4: Provide Liquidity on Uniswap

To make your token tradable, you need to create a liquidity pool on a DEX. We'll use Uniswap on a supported test network.

ℹī¸ A liquidity pool requires a pair of tokens, typically your token and something like ETH or a stablecoin. Traders can then swap between the two.
  1. Go to Uniswap and connect your wallet.
  2. Click 'Pool' and then 'New Position'.
  3. Select your token and another token as the pair.
  4. Enter the starting price.
  5. Enter the amount of tokens to provide.
  6. Click Preview and then 'Add' to create the pool. Approve the transactions.

You've now created a 'meme coin'/token trading pair! You'll earn a % of trading fees too.

Step 5: Trade Your Token

Finally, let's swap our 'meme coin' with token of your choice on Uniswap:

  1. Go to the Swap page and connect your wallet.
  2. Select the token you paired and your 'meme coin' token as the 'from' and 'to' assets.
  3. Enter the amount of the paired token to swap and confirm the trade.

That's it! You can now swap between your 'meme coin' and a token of your choice, increasing or decreasing the price based on supply/demand.

Wrapping Up

In this guide, we walked through how to:

  • Create an ERC-20 'meme coin' with a custom supply
  • Provide liquidity on Uniswap to create a market
  • Swap tokens on a DEX

The same techniques apply for any token use case, not just meme coins. You can create tokens for in-game currencies, community points, and much more.

A few tips and reminders:

  • Only deploy to test networks while learning
  • Be thoughtful about initial token distribution
  • Always do your own research and never trade with funds you can't afford to lose
  • Providing liquidity is a more advanced topic, make sure to learn the risks

I hope this tutorial was helpful for learning about tokens and DEXs. Until next time, happy building!