20,000 USDC
View results
Submission Details
Severity: high
Valid

No slippage protection and deadline is hardcoded to block.timestamp

Summary

No slippage protection as amountOutMinimum hardcoded to 0 and deadline is hardcoded to block.timestamp

Vulnerability Details

...
deadline: block.timestamp,
amountIn: amount,
amountOutMinimum: 0,
sqrtPriceLimitX96: 0
});

when the deadline is hardcoded to block.timestamp that means whenever the validator decides to include the txn in a block, it will be valid at that time, since block.timestamp will be the current timestamp.a malicious validator can hold the transaction and there is no slippage control because amountOutMinimum hardcoded to 0 , caller may receive very suboptimal amount

Impact

No slippage protection and ineffective deadline check

Tools Used

VsCode
https://code4rena.com/reports/2022-11-paraspace#m-13-interactions-with-amms-do-not-use-deadlines-for-operations

Recommendations

Add amountOutMinimum and deadline as params to the sellProfits() function

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.