Open hats-bug-reporter[bot] opened 4 months ago
This issue is essentially criticizing the mempool and fee structure that is inherent in the system. The minAmount out basically allows the user to specify with what amount the user is content with. This includes state where he has to wait for the transaction to run through. Also if he already waits a week he could just teminate his transaction and readd a new one
I would agree that a deadline parameter would be a nice to have, but thats it, a nice to have and not an issue
@FHieser Thanks, but you are preventing frontrunning, slippage, and other MEV issues by half. The other half to prevent these issues is a deadline.
same issue in different competitions:
and many many others I think this issue is valid.
Github username: @0xmahdirostami Twitter username: 0xmahdirostami Submission hash (on-chain): 0x6527a4a1918635e5e5bc8e452b168130541067cc339a7d72bd0abeb48174c691 Severity: high
Description: Description: There are multiple functions in the contract that lack deadline checks, potentially causing issues. For example, although the
buyFor
andsellFor
functions implement_minAmountOut
checks, the absence of a deadline check in these functions can result in a loss of funds for the user.Scenario:
_depositAmount
, they will receive 900 shares at time A._minAmountOut
._minAmountOut
, resulting in an execution that may not reflect the user's current expectations.Impact: The lack of deadline checks can lead to loss of funds for users due to outdated slippage parameters, especially in volatile markets or during extended transaction delays.
Mitigation: Introduce a deadline parameter to the
buyFor
andsellFor
functions to ensure that transactions are executed within an acceptable time frame.