Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utsav - donateThresholdMax is not implemented in _distributeFees() #792

Open
sherlock-admin4 opened this issue Sep 15, 2024 · 0 comments
Open

Comments

@sherlock-admin4
Copy link
Contributor

sherlock-admin4 commented Sep 15, 2024

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()

    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

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()

@sherlock-admin2 sherlock-admin2 changed the title Muscular Pebble Walrus - donateThresholdMax is not implemented in _distributeFees() utsav - donateThresholdMax is not implemented in _distributeFees() Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant