https://github.com/heintayzar-hm/singleswap
SingleSwap involves building a decentralized exchange (DEX) focused on the ETH/Crypto Dev asset pair, implementing a 1% fee on swaps and rewarding liquidity providers with Crypto Dev LP tokens based on their Ether contributions. It utilizes Next.js and Hardhat frameworks for development.
https://github.com/heintayzar-hm/singleswap
hardhat nextjs web3
Last synced: 3 months ago
JSON representation
SingleSwap involves building a decentralized exchange (DEX) focused on the ETH/Crypto Dev asset pair, implementing a 1% fee on swaps and rewarding liquidity providers with Crypto Dev LP tokens based on their Ether contributions. It utilizes Next.js and Hardhat frameworks for development.
- Host: GitHub
- URL: https://github.com/heintayzar-hm/singleswap
- Owner: heintayzar-hm
- License: mit
- Created: 2023-05-21T06:47:34.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-21T09:39:36.000Z (about 2 years ago)
- Last Synced: 2025-02-07T23:46:01.484Z (4 months ago)
- Topics: hardhat, nextjs, web3
- Language: JavaScript
- Homepage: https://exchange-ykcl.vercel.app
- Size: 6.15 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 📗 Table of Contents
- [📖 About the Project](#about-project)
- [🛠 Built With](#built-with)
- [Tech Stack](#tech-stack)
- [Key Features](#key-features)
- [Kanban Board](#kanban-board)
- [🚀 Live Demo](#live-demo)
- [💻 Getting Started](#getting-started)
- [Setup](#setup)
- [Prerequisites](#prerequisites)
- [Install](#install)
- [Usage](#usage)
- [Run tests](#run-tests)
- [Deployment](#triangular_flag_on_post-deployment)
- [👥 Authors](#authors)
- [🔭 Future Features](#future-features)
- [🤝 Contributing](#contributing)
- [⭐️ Show your support](#support)
- [🙏 Acknowledgements](#acknowledgements)
- [❓ FAQ](#faq)
- [📝 License](#license)SingleSwap involves building a decentralized exchange (DEX) focused on the ETH/Crypto Dev asset pair, implementing a 1% fee on swaps and rewarding liquidity providers with Crypto Dev LP tokens based on their Ether contributions. It utilizes Next.js and Hardhat frameworks for development.
Nextjs
Server
- Built an exchange with only one asset pair (Eth / Crypto Dev)
- Decentralized Exchange take a fee of 1% on swaps
- When user adds liquidity, they should be given Crypto Dev LP tokens (Liquidity Provider tokens)
- CD LP tokens should be given proportional to the Ether user is willing to add to the liquidity
- [Deployed Link](https://exchange-ykcl-2c8arisqh-heintayzar-hm.vercel.app/)
To get a local copy up and running, follow these steps.
### Prerequisites
In order to run this project you need:
- basic knowledge of web3 and blockchain.
- basic knowledge or next or react.
### Setup
Clone this repository to your desired folder(`web3`):
```sh
git clone https://github.com/heintayzar-hm/singleswap.git
```
### Install
Install Exchange Project with:
```sh
cd singleswap
npm install
```
For the env file,
- Go to the respective folder where you clone.
- At the root folder of your app, Make new file called `.env` and add the following.
```sh
QUICKNODE_HTTP_URL = https://floral-thrumming-sailboat.ethereum-sepolia.discover.quiknode.pro/cb8537a2a780891ac7ea2b8154945d3cf3b1feff/
PRIVATE_KEY =
```
- Run the following.
```
npm install
npm run dev
```
### Setup hardhat (Optional)
- There are functions in `scripts/deploy.js`, you can call new functions that you want to call in `main` function
- Currently there are 4 main contracts you can make.
- The network run on sepolia (you can open new `metamask` account) and get some free coins from alchemy or similar website for test.
- Run the following for deploying contracts after you replace the function
```sh
npx hardhat complie
npx hardhat run scripts/deploy.js --network sepolia
```
### Run tests
To run tests, run the following command:
```
npx hardhat test
```
👤 **Hein Tay Zar**
- GitHub: [@Hein Tay](https://github.com/heintayzar-hm)
- Twitter: [@Hein Tay](https://twitter.com/heintayzarhm)
- LinkedIn: [Hein Tay](https://www.linkedin.com/in/hein-tay-zar)
- Fully Functional Auth Pages including email verifications and forgot password pages
- Make multiple admins
Contributions, issues, and feature requests are welcome!
Feel free to check the [issues page](../../issues/).
If you like this project, Please give it a ⭐️
Thanks [@Learweb3.](https://learnweb3.io/) for providing this amazing curriculum.
Thanks microvers for giving this oppournity.
This project is [MIT](./LICENSE) licensed.