Submitted by WatchPug, also found by 0xRajeev and cmichel.
PostAuctionLauncher.finalize() can be called by anyone, and it sends tokens directly to the pair pool to mint liquidity, even when the pair pool exists.
An attacker may control the LP price by creating the pool and then call finalize() to mint LP token with unfair price (pay huge amounts of tokens and get few amounts of LP token), and then remove the initial liquidity they acquired when creating the pool and take out huge amounts of tokens.
https://github.com/sushiswap/miso/blob/2cdb1486a55ded55c81898b7be8811cb68cfda9e/contracts/Liquidity/PostAuctionLauncher.sol#L257
In line 257, PostAuctionLauncher will mint LP with token1Amount and token2Amount. The amounts (token1Amount and token2Amount) are computed according to the auction result, without considering the current price (reserves) of the existing tokenPair.
See PostAuctionLauncher.getTokenAmounts()
PostAuctionLauncher will receive an unfairly low amount of lp token because the amounts sent to tokenPair didnt match the current price of the pair.
See UniswapV2Pair.mint()
Lose a majority share of the tokens.
To only support tokenPair created by PostAuctionLauncher or check for the token price before mint liquidity.
Clearwood (Sushi Miso) confirmed and patched:
