{
    "Function": "updateVariableFeeParameters",
    "File": "src/libraries/FeeHelper.sol",
    "Parent Contracts": [],
    "High-Level Calls": [
        "SafeCast"
    ],
    "Internal Calls": [
        "updateVolatilityAccumulated"
    ],
    "Library Calls": [
        "safe40"
    ],
    "Low-Level Calls": [],
    "Code": "function updateVariableFeeParameters(FeeParameters memory _fp, uint256 _activeId) internal view {\n        uint256 _deltaT = block.timestamp - _fp.time;\n\n        if (_deltaT >= _fp.filterPeriod || _fp.time == 0) {\n            _fp.indexRef = uint24(_activeId);\n            if (_deltaT < _fp.decayPeriod) {\n                unchecked {\n                    // This can't overflow as `reductionFactor <= BASIS_POINT_MAX`\n                    _fp.volatilityReference = uint24(\n                        (uint256(_fp.reductionFactor) * _fp.volatilityAccumulated) / Constants.BASIS_POINT_MAX\n                    );\n                }\n            } else {\n                _fp.volatilityReference = 0;\n            }\n        }\n\n        _fp.time = (block.timestamp).safe40();\n\n        updateVolatilityAccumulated(_fp, _activeId);\n    }"
}