To complete the task, you should
- npm install
- Paste your Alchemy key in hardhat.config.ts.
- Go to test/sandwich.ts.
- Look into the victim tx, figure out how much USDC the victim should receive without sandwich attack.
- Calculate the victim tx's slippage tolerance based on previous answer.
- Calculate how much ETH can you frontrun the victim tx.
- Paste your answer as frontrunAmount and run the command below
FORK=true npx hardhat test test/sandwich.ts