We are seeking an experienced blockchain developer to create a SimpleSwap decentralized exchange (DEX) smart contract, comprehensive tests, and an off-chain monitoring script. The project involves three main components:1. Smart Contract Development: Implement a SimpleSwap contract using Solidity 0.8.x. Enable users to add liquidity with two erc-20 tokens and receive lp tokens in return. Facilitate token swaps from Token A to Token B, incorporating a 0.3% pool fee. Allow users to remove liquidity by burning LP tokens. Include an onlyOwner modifier for collecting accumulated fees. Ensure robust reentrancy protection using either Reentrancy Guard or the Checks-Effects-Interactions pattern.2. Testing and Deployment: Develop a minimal yet effective set of tests using Hardhat or Foundry. Tests must cover three critical scenarios: successful liquidity addition, accurate output token amount calculation during a swap, and proper liquidity removal with fees accounted for. Deploy the completed contract to a designated testnet (Sepolia or BSC Testnet). Provide the deployed contract address along with transaction hashes for both the initial liquidity addition and a sample swap operation.3. Off-Chain Monitoring Script: Create an off-chain script using
Node.js or Python. The script must connect to the blockchain via WebSocket to listen for 'Swap' events emitted by the deployed contract. Implement logic to detect and print a warning to the console if three or more swaps occur within the last 10 blocks. The warning should include the total trading volume for the last hour.Additionally, the project requires written answers to specific security questions, detailing reentrancy protection, the importance of minAmountOut for front-running prevention, and precision issues with the x*y=k formula for tokens with varying decimals.
Delivery term: Not specified