AlphaSwap is a decentralized exchange (DEX) aggregator designed to provide users with the best token swap rates while offering protection against MEV (Maximal Extractable Value). It leverages the CoW Protocol to batch orders and find the most efficient execution paths.
- Best Execution: Aggregates liquidity from multiple sources to ensure optimal swap rates.
- MEV Protection: Protects users from front-running and sandwich attacks via CoW Protocol.
- Gas-less Orders: Users sign messages instead of submitting transactions, saving on gas fees for failed trades.
- Dynamic Token List: Fetches and displays an extensive list of tokens with logos, similar to major DEX interfaces.
- User-Friendly Interface: A clean, modern UI built with React and Vite, featuring a seamless swap experience.
- Framework: React with Vite
- Language: TypeScript
- Styling: CSS Modules / Vanilla CSS
- Web3 Integration: Ethers.js, CoW SDK
- Runtime: Node.js
- Framework: Express
- Language: TypeScript
- Utilities: CoW SDK for quote fetching and order placement
Before you begin, ensure you have the following installed:
-
Clone the repository:
git clone <repository-url> cd alpha_swap
-
Install Root Dependencies:
npm install
-
Install Frontend Dependencies:
cd web npm install cd ..
To run both the backend server and the frontend application concurrently:
npm startThis command will:
- Start the backend server on
http://localhost:3000 - Start the frontend development server (usually on
http://localhost:5173)
alpha_swap/
├── src/ # Backend source code
│ ├── controllers/ # Request handlers
│ ├── routes/ # API route definitions
│ ├── services/ # Business logic and external API integration
│ └── server.ts # Entry point for the backend
├── web/ # Frontend source code
│ ├── src/ # React components, hooks, and styles
│ ├── public/ # Static assets
│ └── vite.config.ts # Vite configuration
├── package.json # Root configuration and scripts
└── README.md # Project documentation
This project is licensed under the ISC License.