The developer should be aware that in many cases where it is profitable, MEV bots will frontrun
the transactions until the output amount is exactly the expected amount, giving the worst execution possible.
In this case, if the expected amount is too low, the protocl losses funds.
Recommendations
The developer should keep in mind that the expected amount is the lower bound, and setting it too low will result in a loss of funds in most cases. When manually inputting transactions, do not ignore this fact.
Handle
tensors
Vulnerability details
Impact
The developer should be aware that in many cases where it is profitable, MEV bots will frontrun the transactions until the output amount is exactly the expected amount, giving the worst execution possible. In this case, if the expected amount is too low, the protocl losses funds.
Recommendations
The developer should keep in mind that the expected amount is the lower bound, and setting it too low will result in a loss of funds in most cases. When manually inputting transactions, do not ignore this fact.