donateThresholdMax is not implemented in _distributeFees()
Summary
donateThresholdMax is not implemented in _distributeFees()
Vulnerability Detail
donateThresholdMax is the max amount that can be donated in a single transaction. But the problem is only donateThresholdMin is enforced in _distributeFees()
function _distributeFees(PoolKey memory _poolKey) internal {
//
// Ensure that the collection has sufficient fees available
> if (donateAmount < donateThresholdMin) {
return;
}
//
}
Impact
More token than threshold will be donated in a single transaction
utsav
Medium
donateThresholdMax
is not implemented in _distributeFees()Summary
donateThresholdMax
is not implemented in _distributeFees()Vulnerability Detail
donateThresholdMax
is the max amount that can be donated in a single transaction. But the problem is only donateThresholdMin is enforced in _distributeFees()Impact
More token than threshold will be donated in a single transaction
Code Snippet
https://github.com/sherlock-audit/2024-08-flayer/blob/main/flayer/src/contracts/implementation/UniswapImplementation.sol#L308C1-L367C1
Tool used
Manual Review
Recommendation
Enforce donateThresholdMax in distributeFees()