When depositing to the liquidity pool or redeeming from it, the contract allows the user to provide a slippage check. But, the way the LP token shares work, there is no risk of being sandwiched or anything like that. Even if somebody frontruns your transaction to deposit a large amount of funds, you still get the same shares as you normally would.
Use call() instead of transfer() when transferring ETH
transfer() only provides a set amount of gas for the transaction. It can cause issues for contracts that have some form of logic in their receive() function if gas costs of opcodes change in the future.
Report
LiquidityPool slippage checks are unnecessary
When depositing to the liquidity pool or redeeming from it, the contract allows the user to provide a slippage check. But, the way the LP token shares work, there is no risk of being sandwiched or anything like that. Even if somebody frontruns your transaction to deposit a large amount of funds, you still get the same shares as you normally would.
Relevant code:
Use
call()
instead oftransfer()
when transferring ETHtransfer()
only provides a set amount of gas for the transaction. It can cause issues for contracts that have some form of logic in theirreceive()
function if gas costs of opcodes change in the future.Relevant links:
Relevant code: