Submitted by danb, also found by leastwood
When an account is liquidated, there is no minimum amount of the swap, which makes it vulnerable for sandwich attacks.
Alices long position can be liquidated, bob notices it and creates a short position,
then liquidates her position, thus swapping the base asset to the quote asset,
therefore reducing the base asset price,
then he redeems his short position and profits because the price went down.
Set quoteAssetLimit in _reducePosition to prevent the attack.
atvanguard (Hubble) disputed and commented:
moose-code (judge) decreased severity to Medium and commented:
