A decentralized exchange (DEX) powered by a Constant Product AMM. Seamlessly swap tokens, provide liquidity, and utilize token faucets. Stake ETH with the Synthetic Staking Rewards Contract to earn rewards. Join SwapEx for a secure, censorship-resistant, and intermediary-free trading experience.
The contract is deployed on Goerli Network:
Main Contract, Faucet 0, Faucet 1, Staker Contract
- Smart contract deployment and interaction using Hardhat in Typescript
- Smart contract tests in Typescript
- User-friendly interface built with ReactJS in Typescript
- Web3 integration with Wagmi and EthersJS for seamless interaction with Ethereum network
Before running the dApp, ensure that you have the following installed:
- Node.js
- npm (Node Package Manager)
- MetaMask extension for your browser
Follow the steps below to get the dApp up and running:
- Clone this repository to your local machine.
- Install the project dependencies by running
npm install
in the root directory as well as inclient
directory. - Configure your MetaMask extension to connect to the desired Ethereum network.
- Deploy the smart contracts to the Ethereum network using Hardhat:
npx hardhat run scripts/deploy.js --network <network-name>
. - Update the addresses in files in
client/src/contracts/
. - Start the client:
cd client && npm run dev
. - Access the dApp by opening your browser and visiting
http://localhost:5173
.
- Connect your desired wallet and approve the connection.
- Get the tokens from the faucet.
- Swap the tokens.
- Provide the liqudity and earn rewards.
- Stake ETH and earn rewards.
- View transaction history and account details.
To contribute to the development of this dApp, follow the steps below:
- Fork this repository and clone it to your local machine.
- Create a new branch for your changes:
git checkout -b my-new-feature
. - Get the dApp up and running following steps in Getting Started.
- Make the necessary modifications and additions.
- Test Smart Contract with
npx hardhat test
in the root directory. - Commit and push your changes:
git commit -m 'Add some feature' && git push origin my-new-feature
. - Submit a pull request detailing your changes and their benefits.
For any questions or inquiries, please contact Nika Khachiashvili.