This project allows users to swap tokens, add liquidity to pools, and manage their decentralized finance (DeFi) assets programmatically on UniswapV3. The application leverages the Uniswap V3 architecture and provides a user-friendly interface for interacting with the Ethereum blockchain.
The project follows a modular architecture, with distinct components for swapping tokens, managing liquidity, and handling user interactions. The key components include:
app/swaps/: This directory contains the core logic for swapping tokens. It includes modules for:- Quote Generation: Determining the optimal exchange rate for a given token pair.
- Transaction Preparation: Constructing the necessary transaction parameters for interacting with the Uniswap V3 smart contracts.
- Execution: Submitting the transaction to the Ethereum blockchain.
app/liquidity/: Includes modules for adding and removing liquidity from pools, as well as managing pool parameters.config/: Stores configuration files, such as token lists and network settings.abi/: Contains ABI files for interacting with Ethereum smart contracts, including ERC20 tokens, Uniswap V3 Factory, Pool, Quoter, and Router contracts.types/: Defines TypeScript types for data structures used throughout the application.utils/: Provides utility functions for common tasks, such as handling blockchain interactions and data formatting.images/: Contains images used in the application, such as logos and screenshots.
graph LR
A[App] --> B(Swaps);
A --> C(Liquidity);
A --> D(Config);
B --> E(ABI);
C --> E;
D --> F(Types);
E --> F;
F --> G(Utils);
G --> H(Images);
To install dependencies:
bun install- Navigate to the "Swap" page.
- Select the input and output tokens.
- Enter the amount of input tokens to swap.
- Review the quote and confirm the transaction.
- Navigate to the "Add Liquidity" page.
- Select the tokens for the liquidity pool.
- Enter the desired amounts of each token.
- Approve the transaction and confirm.
This image shows the main page of the Echos of Uni application, displaying the swap interface.
The swapping feature allows users to exchange one token for another. It works by interacting with Uniswap V3 pools, which are smart contracts that hold reserves of different tokens. When a user initiates a swap, the application calculates the optimal exchange rate and routes the transaction through the appropriate pool.
Contributions are welcome! Please follow these guidelines:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Write tests for your code.
- Submit a pull request.

