All Projects

๐Ÿ’ฑ DEX Tools โ€“ Uniswap V3 & GluwaDEX Deployment

Deployment tooling and CLI for managing Uniswap V3 protocol contracts and GluwaDEX (SwapPool V1/V2, SwapRouter) in local and testnet environments. Includes Docker-based local test environment, full deployment scripts, and integration test suite.

Blockchain EngineerGluwa / 2022โ€“2023

Stack

SolidityHardhatTypeScriptethers.jsUniswap V3OpenZeppelinDocker

DEX Tools โ€“ Uniswap V3 & GluwaDEX Deployment

๐Ÿ”ญ Overview

A comprehensive deployment toolkit and CLI for managing DEX smart contracts โ€” covering both the full Uniswap V3 protocol stack and the custom GluwaDEX (SwapPool V1/V2, SwapRouter). Designed for reliable, repeatable deployments across local Docker environments, testnet, and production networks.

๐Ÿ› ๏ธ What I Built

๐Ÿ’ฑ Uniswap V3 Full Protocol Deployment

  • ๐Ÿญ Complete Uniswap V3 deployment: UniswapV3Factory, UniswapV3Pool, SwapRouter, NonfungiblePositionManager, NonfungibleTokenPositionDescriptor, QuoterV2
  • โš™๏ธ Deployment scripts with configurable fee tiers, tick spacing, and initial pool parameters
  • โœ… Post-deployment validation: verifies pool creation, fee configuration, and position manager linkage
  • ๐Ÿ’ง Liquidity provision scripts for initializing pools with seed liquidity

๐Ÿ”„ GluwaDEX Deployment

  • ๐Ÿ“œ SwapPool V1 and V2 contract deployment with configurable fee parameters
  • ๐Ÿ”€ SwapRouter deployment and integration with pool registry
  • ๐Ÿ”„ Migration scripts for V1 โ†’ V2 pool upgrades
  • โš™๏ธ Administrative scripts for fee updates and pool pausing

โŒจ๏ธ CLI Tool

  • ๐Ÿ’ฌ Interactive CLI for common DEX operations: create pool, add liquidity, swap, collect fees
  • ๐ŸŒ Supports local Docker environment, testnet, and mainnet via --network flag
  • ๐Ÿ“‹ Human-readable output with transaction hashes, gas costs, and resulting state

๐Ÿณ Docker-Based Local Test Environment

  • ๐Ÿณ Docker Compose with local Hardhat node + deployed DEX contracts
  • ๐ŸŒฑ Pre-seeded with test tokens, liquidity pools, and funded test wallets
  • ๐Ÿ”„ Deterministic: same environment every time, no state drift between test runs

๐Ÿงช Integration Test Suite

  • ๐Ÿ”„ End-to-end tests covering: pool creation โ†’ liquidity provision โ†’ swap execution โ†’ fee collection
  • ๐Ÿ“Š Price impact validation: verifies swap outputs match Uniswap V3 price math
  • ๐Ÿ”€ Multi-hop swap tests through multiple pools
  • โœ… Invariant tests: pool invariant (x*y=k) holds after all operations

โญ Key Highlights

  • ๐Ÿญ Full Uniswap V3 protocol stack deployed and validated in a single command
  • ๐Ÿณ Docker-based deterministic test environment eliminates "works on my machine" issues
  • โŒจ๏ธ CLI tool enables non-engineer team members to interact with DEX contracts safely
  • ๐Ÿงช Integration tests validate complete swap lifecycle from pool creation to fee collection