{
    "Function": "_k",
    "File": "contracts/contracts/VelodromeLibrary.sol",
    "Parent Contracts": [],
    "High-Level Calls": [],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function _k(uint x, uint y, bool stable, uint decimals0, uint decimals1) internal pure returns (uint) {\n        if (stable) {\n            uint _x = x * 1e18 / decimals0;\n            uint _y = y * 1e18 / decimals1;\n            uint _a = (_x * _y) / 1e18;\n            uint _b = ((_x * _x) / 1e18 + (_y * _y) / 1e18);\n            return _a * _b / 1e18;  // x3y+y3x >= k\n        } else {\n            return x * y; // xy >= k\n        }\n    }"
}