Uniswap V2 swap formula.
amountIn * 997* reserveOutreserveIn * 1000 + amountInWithFee// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
contract AMM {
function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut) external pure returns (uint256) {
// TODO
}
}