Submitted by Limbooo
In the Router.sol file of the mimswap, theres a method to create a pool for native tokens by wrapping them to their wrapped counterpart before sending them to the newly created pool.
However, the transfer done using address(weth).safeTransferFrom (see line 92). This works fine on most chains (Ethereum, Optimism, Polygon, BSC) which uses the standardWETH9contract that handles the case when src == msg.sender:
The problem is that theWETHimplementation onBlastusesa different contract, and does not have thissrc == msg.senderhandling.
Also, the issue is presented in Wrapped Arbitrum and Wrapped Fantom.
The failure to approve the Router contract to spend WETH tokens will prevent the protocol from creating native tokens pools on multiple chains like Blast.
Run test using this command:
To address this issue, its recommended to modify the Router.sol file as follows:
0xCalibur (Abracadabra) acknowledged, and commented:
