Stable BPT valuation is incorrect and can be exploited to cause protocol insolvency
StableBPTOracle.sol#L48-L53\\n```\\n    uint256 minPrice = base.getPrice(tokens[0]);\\n    for(uint256 i = 1; i != length; ++i) {\\n        uint256 price = base.getPrice(tokens[i]);\\n        minPrice = (price < minPrice) ? price : minPrice;\\n    }\\n    return minPrice.mulWadDown(pool.getRate());\\n```\\n\\nThe above block is used to calculate the price. Finding the min price of all assets in the pool then multiplying by the current rate of the pool. This is nearly identical to how stable curve LP is priced. Balancer pools are a bit different and this methodology is incorrect for them. Lets look at a current mainnet pool to see the problem. Take the wstETH/aETHc pool. Currently getRate() = 1.006. The lowest price is aETHc at 2,073.23. This values the LP at 2,085.66. The issue is that the LPs actual value is 1,870.67 (nearly 12% overvalued) which can be checked here.\\nOvervaluing the LP as such can cause protocol insolvency as the borrower can overborrow against the LP, leaving the protocol with bad debt.
Stable BPT oracles need to use a new pricing methodology
Protocol insolvency due to overborrowing
```\\n    uint256 minPrice = base.getPrice(tokens[0]);\\n    for(uint256 i = 1; i != length; ++i) {\\n        uint256 price = base.getPrice(tokens[i]);\\n        minPrice = (price < minPrice) ? price : minPrice;\\n    }\\n    return minPrice.mulWadDown(pool.getRate());\\n```\\n