TrunkSwap is a decentralized exchange (DEX) that allows users to swap tokens, add liquidity, and remove liquidity in a seamless and user-friendly manner.
https://trunkswap.vercel.app/swap
- Swap tokens with real-time pricing
- Add liquidity to earn LP rewards
- Remove liquidity with detailed breakdowns
- Dynamic price updates every 10 seconds
- Responsive, intuitive UI
- Next.js for frontend
- Ethers.js for blockchain interactions
- Smart Contracts for liquidity pool management
- Chainlink Price Feeds for accurate pricing
- Select two tokens
- Input token amounts
- View pool share and price impact
- Confirm and send transaction
- Approve tokens
- Call
addLiquidity(token0, token1, amountA, amountB) - Receive LP tokens
- Select token pair
- Input LP amount to remove
- Show estimated return in tokens
- Confirm and receive tokens
- Approve LP tokens
- Call
removeLiquidity(token0, token1, lpAmount) - Receive original tokens proportionally
git clone https://github.com/sammed-21/trunkswap.git
cd trunkswap
npm install
npm run devPull requests are welcome! For major changes, open an issue first to discuss what you would like to change.
MIT
- Twitter: @0xSam_21