A logic vulnerability has been identified in the FeeConversionKeeper
contract's fee distribution mechanism. The issue stems from an overly restrictive comparison operator in the checkFeeDistributionNeeded()
function:
The function employs a strict greater than (>
) comparison when evaluating whether fees should be distributed. This implementation creates a boundary condition where fees exactly matching the minFeeDistributionValueUsd
threshold are incorrectly excluded from distribution.
The issue manifests when accumulated fees convert to a USD value precisely equal to the minimum threshold. In such cases, the checkUpkeep()
function returns false
, preventing fee conversion despite meeting the intended minimum value requirement. This behavior can lead to fees remaining unconverted in the system unnecessarily, with the potential for cumulative impact across multiple occurrences of this edge case.
The solution requires modifying the comparison operator from strict greater than (>
) to greater than or equal to (>=
):
This modification ensures that fee distribution occurs at or above the minimum threshold, aligning with the expected system behavior and preventing unintended fee retention.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.