```\n// BBLendingCommon.sol\n\nfunction _computeVariableOpeningFee(uint256 amount) internal returns (uint256) {\n        if (amount == 0) return 0; \n \n        //get asset <> USDC price ( USDO <> USDC ) \n        (bool updated, uint256 _exchangeRate) = assetOracle.get(oracleData); \n        if (!updated) revert OracleCallFailed();\n   \n        if (_exchangeRate >= minMintFeeStart) { \n            return (amount * minMintFee) / FEE_PRECISION;\n        }\n        if (_exchangeRate <= maxMintFeeStart) { \n            return (amount * maxMintFee) / FEE_PRECISION;\n        }\n     \n        uint256 fee = maxMintFee\n            - (((_exchangeRate - maxMintFeeStart) * (maxMintFee - minMintFee)) / (minMintFeeStart - maxMintFeeStart)); \n \n        if (fee > maxMintFee) return (amount * maxMintFee) / FEE_PRECISION;\n        if (fee < minMintFee) return (amount * minMintFee) / FEE_PRECISION;\n\n        if (fee > 0) {\n            return (amount * fee) / FEE_PRECISION;\n        }\n        return 0;\n    }\n```\n