Open code423n4 opened 3 years ago
This is not a bug, it is intentionally set this way. There is a setMaxSwapSlippage
setter in globals where we can update this value.
Unsafe defaults warrant a Note.
Note meaning an informational section issue right?
I mean that I'm rating it at 0/Note/Non-Critical. I assume that goes in the informational section, but I don't know how the final report will be constructed.
Handle
janbro
Vulnerability details
Summary
Default slippage value too high.
Risk Rating
Medium
Vulnerability Details
MapleGlobals.sol Line 87: maxSwapSlippage = 1000; // 10 % The default slippage value of 10% is vulnerable to sandwich attackers which would shift larger costs onto stakers and LPs after a liquidation event. Flash loans can be utilized to manipulate the Uniswap price to an unfavorable rate for liquidation. This is effectively a liquidation penalty that gets distributed to front runners.
Impact
Liquidation event could cause more loss to stakers and liquidity providers than expected.
Proof of Concept
See https://cmichel.io/de-fi-sandwich-attacks/
Tools Used
Manual code review
Recommended Mitigation Steps
Set the default slippage to a lower value.