Setting maxFundingFeePerBlock to a lower value than abs(lastFundingRate) will brick getPendingAccFundingFees()
Description
getPendingAccFundingFees() computes the number of blocks to the limit by subtracting absLastFundingRate to maxFundingFeePerBlock.
setMaxFundingFeePerBlock() allows setting the max to any value below MAX_FUNDING_FEE.
If maxFundingFeePerBlock is set to a value smaller than absLastFundingRate it will underflow, bricking getPendingAccFundingFees() and it can only be fixed by calling setPairFundingFees().
Here is a POC.
Recommendation
Revert if setMaxFundingFeePerBlock() is called with maxFundingFeePerBlock smaller than absLastFundingRate.
Status