```\n            function getTokenPriceFromStablePool(\n        address lookupToken_,\n        uint8 outputDecimals_,\n        bytes calldata params_\n    ) external view returns (uint256) {\n\n                // rest of code..\n\n                try pool.getLastInvariant() returns (uint256, uint256 ampFactor) {\n                   \n                   // @audit the amplification factor as of the last invariant calculation is used\n                    lookupTokensPerDestinationToken = StableMath._calcOutGivenIn(\n                        ampFactor,\n                        balances_,\n                        destinationTokenIndex,\n                        lookupTokenIndex,\n                        1e18,\n                        StableMath._calculateInvariant(ampFactor, balances_) // Sometimes the fetched invariant value does not work, so calculate it\n                    );\n```\n