code-423n4 / 2022-11-redactedcartel-findings

3 stars 2 forks source link

fn distribution feed need modifier to identify when it needed to send #301

Closed code423n4 closed 1 year ago

code423n4 commented 1 year ago

Lines of code

https://github.com/code-423n4/2022-11-redactedcartel/blob/03b71a8d395c02324cb9fdaf92401357da5b19d1/src/PirexFees.sol#L100

Vulnerability details

Proof of Concept

This fn for distributionFees need modifier since it was used for notify if was special condition was used.

Recommended Mitigation Steps

by adding modifier, at example :

    modifier Fees {
        require(
            initialized,
            "FeeDistributor: Fees cannot be distributed until Distributor got fees."
        );
        _;
    }

and adding

bool public initialized;

Tools Used

manual review

c4-judge commented 1 year ago

Picodes marked the issue as unsatisfactory: Invalid