A complete full-stack Web3 DeFi application deployed on Sepolia testnet. This project demonstrates end-to-end blockchain development skills, from Solidity smart contracts to a production-ready React frontend.
CharonSwap is a comprehensive DeFi ecosystem featuring an Automated Market Maker (AMM), staking mechanisms, and a fully custom frontend. Named after Charon, the ferryman who crosses the river Styx, this protocol moves liquidity across the blockchain—just as Charon moves souls across the river.
This is a portfolio project showcasing my ability to build complete Web3 applications from scratch.
This repository contains everything I built:
- ✅ Smart Contracts - Custom Solidity contracts for AMM, staking, and token management
- ✅ Frontend - Full React application with wallet integration
- ✅ Tests - Comprehensive Foundry test suite
- ✅ Live Demo - Deployed on Sepolia testnet (see contract addresses below)
You can test all functionality directly on the live site - connect your wallet and try swapping, staking, and using the faucet!
- Constant product formula (x * y = k) implementation
- 0.3% swap fee
- Liquidity pool management with LP tokens
- Real-time price calculations and slippage protection
- CHR ↔ FETH trading pair
- Flexible Staking: Stake CHR to earn CHR rewards with dynamic APR
- Locked Staking: Three lock pools (30/90/180 days) with boosted rewards
- Real-time reward calculations
- Admin controls for reward rate management
- Get free test tokens (CHR and FETH) for testing
- 12-hour cooldown per wallet
- Owner-configurable drip amounts
- Modern, responsive UI built with React + Tailwind CSS
- Wallet integration via RainbowKit and Wagmi
- Real-time on-chain data fetching
- Smooth animations with Framer Motion
- Price charts and analytics dashboard
- Admin panel for contract management
- Solidity ^0.8.20
- OpenZeppelin contracts (ReentrancyGuard, Ownable, ERC20)
- Hardhat for development and deployment
- Foundry for testing
- React 18 with Vite
- Wagmi v2 + RainbowKit for wallet connections
- Viem for Ethereum interactions
- Tailwind CSS for styling
- Framer Motion for animations
- Recharts for data visualization
Network: Sepolia Testnet
- CHR Token:
0x1Cf7355a7cfD8Fa9718ABF77873D384995eed6aa - FETH Token:
0xeF84b001145F02937020bC757f771075f6bB1923 - DEX:
0x2BdA2Ab20D679f8EE829DFe531De3659D4c260Ae - Faucet:
0xC6C85531c7cFA380A669eddf1a22213c268c7A90 - Staking:
0x89519D9E2aE3B945a5Bdeb18C24eAE0c85feD9bD
- Connect your wallet (MetaMask, WalletConnect, etc.) to Sepolia testnet
- Visit the Faucet page to get free CHR and FETH tokens
- Try swapping tokens on the Swap page
- Add liquidity to earn LP tokens
- Stake your CHR tokens to earn rewards
- Check the Analytics dashboard for pool statistics
- CharonDex / CharonDexV2 - AMM with constant product formula
- CharonStaking - Flexible staking with dynamic rewards
- CharonStakingLocked - Time-locked staking pools (30/90/180 days)
- CharonFaucet / CharonFaucetV2 - Token distribution for testing
- Charon (Token.sol) - ERC20 token with ERC20Permit support
- FakeETH - Test ERC20 token
- ReentrancyGuard on all state-changing functions
- OpenZeppelin's battle-tested libraries
- Access control (Ownable pattern)
- Pausable functionality for emergency stops
- Input validation throughout
All contracts are thoroughly tested using Foundry. Test files are located in foundry_tests/test/:
CharonDex.t.sol- AMM functionality testsCharonStake.t.sol- Staking mechanism tests- Additional test coverage for edge cases
This project showcases:
- Solidity Development: Custom AMM, staking, and token contracts from scratch
- DeFi Protocol Design: Understanding of liquidity pools, constant product AMMs, reward distribution
- Full-Stack Web3: Smart contracts + React frontend integration
- Web3 Tooling: Wagmi, RainbowKit, Viem for wallet and contract interactions
- Smart Contract Auditing: Comprehensive Foundry test suite
- Deployment: Hardhat deployment scripts and network configuration
- UI/UX Design: Custom design system with smooth animations
- Product Ownership: End-to-end development from concept to deployment
- Token Swapping: Trade CHR ↔ FETH with real-time price calculations
- Liquidity Provision: Add/remove liquidity and earn LP tokens
- Staking: Stake CHR in flexible or locked pools to earn rewards
- Faucet: Claim test tokens (12-hour cooldown)
- Clean, well-commented Solidity code
- Modular React components
- Proper error handling
- Event emissions for off-chain tracking
- Gas-optimized where possible
- Following best practices and security patterns
luka.earth
- GitHub: @lukaearth
- Built as a portfolio project to demonstrate full-stack Web3 development capabilities
MIT License
- OpenZeppelin for secure contract libraries
- Uniswap V2 for AMM design inspiration
- The Ethereum community for excellent tooling
Built with ❤️ to showcase my full-stack Web3 development skills
"Crossing the river, one block at a time."