Skip to content
This repository has been archived by the owner on Mar 24, 2024. It is now read-only.

twcctop - Protocol fee can still be locked #28

Closed
sherlock-admin opened this issue Sep 23, 2023 · 1 comment
Closed

twcctop - Protocol fee can still be locked #28

sherlock-admin opened this issue Sep 23, 2023 · 1 comment
Labels
Excluded Excluded by the judge without consulting the protocol or the senior Non-Reward This issue will not receive a payout

Comments

@sherlock-admin
Copy link
Contributor

sherlock-admin commented Sep 23, 2023

twcctop

high

Protocol fee can still be locked

Summary

Protocol fee can still be locked, it seems that the issue doesn't get fixed in this codespace.

Vulnerability Detail

The previous contest issue Protocol fee from Market.sol is locked
sherlock-audit/2023-07-perennial-judging#52
seems still exist in this contest codebase.

    function _claimFee(address receiver, UFixed6 fee) private returns (bool) {
        if (msg.sender != receiver) return false;

        token.push(receiver, UFixed18Lib.from(fee));
        emit FeeClaimed(receiver, fee);
        return true;
    }

Nothing changes in function _claimfee and the issue still exist

Impact

Protocol fees cannot be withdrawn

Code Snippet

https://github.com/sherlock-audit/2023-09-perennial/blob/main/perennial-v2/packages/perennial/contracts/Market.sol#L145-L151

Tool used

Manual Review

Recommendation

It's mentioned in previous contest .
sherlock-audit/2023-07-perennial-judging#52

@github-actions github-actions bot added the Excluded Excluded by the judge without consulting the protocol or the senior label Sep 24, 2023
@sherlock-admin
Copy link
Contributor Author

3 comment(s) were left on this issue during the judging contest.

panprog commented:

invalid because claimFee now sends fee to factory owner instead of factory itself

n33k commented:

invalid, fixed in equilibria-xyz/perennial-v2#79

polarzero commented:

See #7.

@sherlock-admin2 sherlock-admin2 changed the title Sparkly Dijon Lemur - Protocol fee can still be locked twcctop - Protocol fee can still be locked Sep 26, 2023
@sherlock-admin2 sherlock-admin2 added the Non-Reward This issue will not receive a payout label Sep 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Excluded Excluded by the judge without consulting the protocol or the senior Non-Reward This issue will not receive a payout
Projects
None yet
Development

No branches or pull requests

2 participants