code-423n4 / 2021-09-yaxis-findings

0 stars 0 forks source link

Be aware that transactions can be frontrun to exactly the estimated amount. #153

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

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.

GalloDaSballo commented 3 years ago

Agree with the finding, would like code link and example rather than vague statement