⚠️ WARNING: This is an old project from 2023 that is no longer maintained. It is provided as-is with no updates or support.
A decentralized exchange platform with smart contracts built on Ethereum and a React.js frontend.
VoidExchange is a DEX (Decentralized Exchange) that allows users to:
- Swap tokens
- Provide liquidity and earn fees
- Manage liquidity pool tokens
The project consists of two main components:
- Smart contracts (Hardhat project)
- Frontend application (React.js)
Follow these instructions to set up the project locally.
-
Clone the repository
git clone https://github.com/rr-adam/void-exchange.git cd VoidExchange -
Set up MetaMask
- Install the MetaMask extension from metamask.io
- Create a new wallet (use a simple password for testing)
- Skip the recovery phrase backup for testing by selecting "Remind me later"
-
Start the Hardhat environment
cd hardhat npm install npm run hardhat -
Deploy the contracts (in a new terminal window)
cd hardhat npm run localhost-deployImportant: Take note of the deployed contract addresses, especially:
- VoidFactory address
- Multicall address
- Test token addresses (TokenA and TokenB)
-
Configure MetaMask
- Import the Hardhat test account:
- Click on your account icon → Import Account
- Enter this example private key:
0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80⚠️ WARNING: This is a testing hardhat private key, never transfer real funds to these accounts.
- Import the Hardhat test account:
- Add the Hardhat network:
- Go to Networks dropdown → Add Network → Add a network manually
- Network Name: Hardhat
- RPC URL:
http://127.0.0.1:8545 - Chain ID:
31337 - Currency Symbol: ETH
-
Set up the frontend
- Update contract addresses in
frontend/src/constants/index.js:- Replace the placeholder addresses with the ones from the deployment step
- Install dependencies and start the application:
cd frontend npm install npm run dev
- Update contract addresses in
-
Access the application at http://localhost:5173/
- Navigate to the swap screen by clicking "Open app" on the landing page
- Connect your MetaMask wallet if prompted
- Select tokens to swap by clicking the blue button in each field
- Enter the test token addresses noted from the deployment step
- Enter the amount to swap
- Click "Swap" to execute the transaction
- Navigate to the "Pool" tab
- View your current liquidity positions
- Add or remove liquidity using the interface
- Note that by default, your account has LP tokens as liquidity is added during deployment
VoidExchange/
├── hardhat/ # ======== Hardhat project ========
│ ├── contracts/ # Solidity smart contracts
│ ├── scripts/ # Deployment scripts
│ └── test/ # Contract tests
└── frontend/ # ====== React.js application =====
├── public/ # Static assets
└── src/ # Source code
├── abi/ # Smart contracts ABIs
├── assets/ # Assets
├── components/ # React components
├── constants/ # Application constants
├── hooks/ # React hooks for token and pairs logic
├── pages/ # Application pages
└── util/ # Helper functions


