Submitted by broccoli
The _computeSingleOutGivenPoolIn function of IndexPool uses the raw multiplication (i.e., *) to calculate the zaz variable. However, since both (BASE - normalizedWeight) and _swapFee are in WAD, the _mul function should be used instead to calculate the correct value of zaz. Otherwise, zaz would be 10 ** 18 times larger than the expected value and causes an integer underflow when calculating amountOut. The incorrect usage of multiplication prevents anyone from calling the function successfully.
Referenced code:
IndexPool.sol#L282
Change (BASE - normalizedWeight) * _swapFee to _mul((BASE - normalizedWeight), _swapFee).
 maxsam4 (Sushi) confirmed
