Submitted by broccoli
In the IndexPool contract, pow is used in calculating price. (IndexPool.sol L255-L266).
However, Pow is easy to cause overflow. If the weightRatio is large (e.g. 10), theres always overflow.
Lp providers can still provide liquidity to the pool where no one can swap. All pools need to redeploy. I consider this a high-risk issue.
Its easy to trigger this bug by deploying a 1:10 IndexPool.
Transactions would be reverted when buying link with dai.
The weightRatio is an 18 decimals number. It should be divided by (BASE)^exp. The scale in the contract is not consistent. Recommend the dev to check all the scales/ decimals.
maxsam4 (Sushi) confirmed
