{
    "Function": "getVariableFee",
    "File": "src/libraries/FeeHelper.sol",
    "Parent Contracts": [],
    "High-Level Calls": [],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function getVariableFee(FeeParameters memory _fp) internal pure returns (uint256 variableFee) {\n        if (_fp.variableFeeControl != 0) {\n            // Can't overflow as the max value is `max(uint24) * (max(uint24) * max(uint16)) ** 2 < max(uint104)`\n            // It returns 18 decimals as:\n            // decimals(variableFeeControl * (volatilityAccumulated * binStep)**2 / 100) = 4 + (4 + 4) * 2 - 2 = 18\n            unchecked {\n                uint256 _prod = uint256(_fp.volatilityAccumulated) * _fp.binStep;\n                variableFee = (_prod * _prod * _fp.variableFeeControl) / 100;\n            }\n        }\n    }"
}