Create Pair Ex

A detailed walkthrough on creating a Uniswap V2 pair contract using the Uniswap V2 factory contract. The lesson covers the basics of the Uniswap V2 Factory, including initializing the WETH contract and Uniswap V2 factory, deploying a new ERC20 contract, and then creating a new pair contract.

1. Code Walk Create Pair
A comprehensive explanation of the createPair function in the Uniswap V2 factory contract. The lesson covers how the createPair function works, including how addresses are sorted and converted into numerical values, as well as how the factory contract uses create2 to deploy the Uniswap V2 pair contract. Duration: 7min
2. Create Pair Ex
A detailed walkthrough on creating a Uniswap V2 pair contract using the Uniswap V2 factory contract. The lesson covers the basics of the Uniswap V2 Factory, including initializing the WETH contract and Uniswap V2 factory, deploying a new ERC20 contract, and then creating a new pair contract. Duration: 1min
3. Create Pair Ex Sol
A practical demonstration of how to deploy a new Uniswap V2 pair contract. The lesson shows the code for creating the contract, and then goes through running tests against the actual contract on mainnet, using a forked network. Duration: 2min

Course Overview

About the course

What you'll learn

How to use Uniswap v2 dex and contracts

Interacting with the Uniswap v2 router and factory

How to create Uniswap v2 liquidity pools

How to add liquidity to Uniswap v2 pools

Swaps, flash swaps, flash swap arbitrage, and time-weighted average price (TWAP)

Course Description

Who is this course for?

  • Advanced smart contract engineers
  • Web3 developers
  • Smart Contract Security researchers

Potential Careers

Security researcher

$49,999 - $120,000 (avg. salary)

Smart Contract Auditor

$100,000 - $200,000 (avg. salary)

Smart Contract Engineer

$100,000 - $150,000 (avg. salary)

Web3 developer

$60,000 - $150,000 (avg. salary)

Web3 Developer Relations

$85,000 - $125,000 (avg. salary)

Meet your instructors

Tasuku Nakamura

Tasuku Nakamura

Founder at smartcontract.engineer

Smart contract engineer and educator.

Last updated on November 13, 2025