```\nFile: Boosted3TokenPoolMixin.sol\n    function _underlyingPoolContext(ILinearPool underlyingPool) private view returns (UnderlyingPoolContext memory) {\n        (uint256 lowerTarget, uint256 upperTarget) = underlyingPool.getTargets();\n        uint256 mainIndex = underlyingPool.getMainIndex();\n        uint256 wrappedIndex = underlyingPool.getWrappedIndex();\n\n        (\n            /* address[] memory tokens */,\n            uint256[] memory underlyingBalances,\n            /* uint256 lastChangeBlock */\n        ) = Deployments.BALANCER_VAULT.getPoolTokens(underlyingPool.getPoolId());\n\n        uint256[] memory underlyingScalingFactors = underlyingPool.getScalingFactors();\n        // The wrapped token's scaling factor is not constant, but increases over time as the wrapped token increases in\n        // value.\n        uint256 wrappedScaleFactor = underlyingScalingFactors[mainIndex] * underlyingPool.getWrappedTokenRate() /\n            BalancerConstants.BALANCER_PRECISION;\n\n        return UnderlyingPoolContext({\n            mainScaleFactor: underlyingScalingFactors[mainIndex],\n            mainBalance: underlyingBalances[mainIndex],\n            wrappedScaleFactor: wrappedScaleFactor,\n            wrappedBalance: underlyingBalances[wrappedIndex],\n            virtualSupply: underlyingPool.getVirtualSupply(),\n            fee: underlyingPool.getSwapFeePercentage(),\n            lowerTarget: lowerTarget,\n            upperTarget: upperTarget    \n        });\n    }\n```\n