Multi-DEX Swap Router
Solidity contracts that route token swaps through Uniswap V3/V2 and PancakeSwap, built on a diamond (EIP-2535) factory and a transparent-proxy router.
- 01User / dApp
- 02Transparent-proxy router
- 03Uniswap V3 · V2 · PancakeSwap
Problem
A product needed token swaps routed through several third-party DEXs, and the contracts had to keep growing without forcing users onto a new address every time a feature landed.
What I built
- Router contracts that send swaps through third-party DEXs: Uniswap V3, Uniswap V2 and PancakeSwap.
- A diamond proxy (EIP-2535) factory split into facets, so new features are added as facets instead of redeploying the factory.
- A transparent-proxy router so the routing logic can be upgraded safely behind a stable address.
- Hardhat project in TypeScript, with tests.
Stack
- Solidity
- Hardhat
- TypeScript
- EIP-2535 diamond
- Transparent proxy
- Uniswap V3/V2
- PancakeSwap
Result
- One router address for Uniswap V3, Uniswap V2 and PancakeSwap.
- New features ship as diamond facets, without redeploying the factory.
- Routing logic upgrades behind the same address, with tests covering the contracts.
Typical budget
$6k – $12k for similar work. Every project is quoted after a free call.