```\n    function takeOverPool(GoatTypes.InitParams memory initParams) external {\n        if (_vestingUntil != _MAX_UINT32) {\n            revert GoatErrors.ActionNotAllowed();\n        }\n\n        GoatTypes.InitialLPInfo memory initialLpInfo = _initialLPInfo;\n\n        GoatTypes.LocalVariables_TakeOverPool memory localVars;\n        address to = msg.sender;\n        localVars.virtualEthOld = _virtualEth;\n        localVars.bootstrapEthOld = _bootstrapEth;\n        localVars.initialTokenMatchOld = _initialTokenMatch;\n\n        (localVars.tokenAmountForPresaleOld, localVars.tokenAmountForAmmOld) = _tokenAmountsForLiquidityBootstrap(\n            localVars.virtualEthOld,\n            localVars.bootstrapEthOld,\n            initialLpInfo.initialWethAdded,\n            localVars.initialTokenMatchOld\n        );\n\n        // new token amount for bootstrap if no swaps would have occured\n        (localVars.tokenAmountForPresaleNew, localVars.tokenAmountForAmmNew) = _tokenAmountsForLiquidityBootstrap(\n            initParams.virtualEth, initParams.bootstrapEth, initParams.initialEth, initParams.initialTokenMatch\n        );\n\n        // team needs to add min 10% more tokens than the initial lp to take over\n        localVars.minTokenNeeded =\n            ((localVars.tokenAmountForPresaleOld + localVars.tokenAmountForAmmOld) * 11000) / 10000;\n\n481     if ((localVars.tokenAmountForAmmNew + localVars.tokenAmountForPresaleNew) < localVars.minTokenNeeded) {\n            revert GoatErrors.InsufficientTakeoverTokenAmount();\n        }\n\n        localVars.reserveEth = _reserveEth;\n\n        // Actual token amounts needed if the reserves have updated after initial lp mint\n        (localVars.tokenAmountForPresaleNew, localVars.tokenAmountForAmmNew) = _tokenAmountsForLiquidityBootstrap(\n            initParams.virtualEth, initParams.bootstrapEth, localVars.reserveEth, initParams.initialTokenMatch\n        );\n        localVars.reserveToken = _reserveToken;\n\n        // amount of tokens transferred by the new team\n        uint256 tokenAmountIn = IERC20(_token).balanceOf(address(this)) - localVars.reserveToken;\n\n        if (\n496          tokenAmountIn\n497             < (\n498                 localVars.tokenAmountForPresaleOld + localVars.tokenAmountForAmmOld - localVars.reserveToken\n499                     + localVars.tokenAmountForPresaleNew + localVars.tokenAmountForAmmNew\n500             )\n        ) {\n            revert GoatErrors.IncorrectTokenAmount();\n        }\n\n        localVars.pendingLiquidityFees = _pendingLiquidityFees;\n        localVars.pendingProtocolFees = _pendingProtocolFees;\n\n        // amount of weth transferred by the new team\n        uint256 wethAmountIn = IERC20(_weth).balanceOf(address(this)) - localVars.reserveEth\n            - localVars.pendingLiquidityFees - localVars.pendingProtocolFees;\n\n        if (wethAmountIn < localVars.reserveEth) {\n            revert GoatErrors.IncorrectWethAmount();\n        }\n\n        _handleTakeoverTransfers(\n            IERC20(_weth), IERC20(_token), initialLpInfo.liquidityProvider, localVars.reserveEth, localVars.reserveToken\n        );\n\n        uint256 lpBalance = balanceOf(initialLpInfo.liquidityProvider);\n        _burn(initialLpInfo.liquidityProvider, lpBalance);\n\n        // new lp balance\n        lpBalance = Math.sqrt(uint256(initParams.virtualEth) * initParams.initialTokenMatch) - MINIMUM_LIQUIDITY;\n        _mint(to, lpBalance);\n\n        _updateStateAfterTakeover(\n            initParams.virtualEth,\n            initParams.bootstrapEth,\n            initParams.initialTokenMatch,\n            wethAmountIn,\n            tokenAmountIn,\n            lpBalance,\n            to,\n            initParams.initialEth\n        );\n    }\n```\n