The DeliveryPlace contract's settleAskMaker and settleAskTaker functions lack slippage protection mechanisms. This omission can lead to unfavorable trades for users in volatile market conditions, potentially resulting in significant financial losses.
The vulnerability stems from the use of a fixed tokenPerPoint value when calculating the settled amount, without considering market price fluctuations between offer creation and settlement.
See
Similarly, in the settleAskTaker function:
In both functions, marketPlaceInfo.tokenPerPoint is used as a fixed value to calculate the settled amount. This approach doesn't account for potential market price changes between the time an offer is made and when it's settled.
The lack of slippage protection can lead to several negative outcomes:
Financial losses for users due to unfavorable trade execution in volatile markets.
Potential for market manipulation, where malicious actors could exploit price fluctuations to their advantage.
Reduced user trust in the platform due to unexpected trade outcomes.
In extreme cases, significant value loss for the protocol if large trades are executed at unfavorable rates.
Manual review
Modify the settlement functions to accept a minimum acceptable rate parameter:
pseudo fix below
Also consider implementing a getCurrentTokenPerPoint() function that fetches the current market rate from a reliable oracle or price feed.
Add similar protection to the settleAskTaker function.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.