// calculate lp token supply:
uint256 lpTokenSupply = calcLpTokenSupply(scaledReserves, abi.encode(18, 18));

// lpTokenSupply / 2 gives the reserves at parity:
uint256 parityReserve = lpTokenSupply / 2;

// update `scaledReserves` based on whether targetPrice is closer to low or high price:
if (pd.lutData.highPrice - pd.targetPrice > pd.targetPrice - pd.lutData.lowPrice) {
    // targetPrice is closer to lowPrice.
    scaledReserves[i] = parityReserve * pd.lutData.lowPriceI / pd.lutData.precision;
    scaledReserves[j] = parityReserve * pd.lutData.lowPriceJ / pd.lutData.precision;
    // initialize currentPrice:
    pd.currentPrice = pd.lutData.lowPrice;
} else {
    // targetPrice is closer to highPrice.
    scaledReserves[i] = parityReserve * pd.lutData.highPriceI / pd.lutData.precision;
    scaledReserves[j] = parityReserve * pd.lutData.highPriceJ / pd.lutData.precision;
    // initialize currentPrice:
    pd.currentPrice = pd.lutData.highPrice;
}
