Automated Market-Making System
Built a Uniswap V2-style constant-product AMM (x*y=k formula) as a blockchain course assignment. Implemented Solidity smart contracts for: liquidity pools with LP token minting, slippage protection (max 2% deviation), front-running prevention with deadline checks. Technical challenges: Handling integer overflow in Solidity 0.7 (used SafeMath library before 0.8's built-in checks), calculating square roots on-chain for LP tokens (implemented Babylonian method in assembly for gas efficiency). Integrated MetaMask for transaction signing, deployed to Rinkeby testnet. Cost: ~0.02 ETH in deployment gas. Learned: Every operation costs money—optimization is mandatory, not optional.
ReactSolidityEthereum