sherlock-audit / 2024-04-titles-judging

1 stars 1 forks source link

alexzoid - Limitation of Revenue Due to Hardcoded `MAX_PROTOCOL_FEE` #403

Closed sherlock-admin4 closed 2 months ago

sherlock-admin4 commented 2 months ago

alexzoid

medium

Limitation of Revenue Due to Hardcoded MAX_PROTOCOL_FEE

Summary

The hardcoded MAX_PROTOCOL_FEE in the FeeManager contract could restrict revenue generation on different blockchain networks where the value of ether significantly differs, such as on the DEGEN chain.

Vulnerability Detail

The FeeManager contract sets MAX_PROTOCOL_FEE to 0.1 ether. On blockchain networks like the DEGEN chain, where 0.1 ether equates to only $0.0028 (https://explorer.degen.tips/), this limitation drastically reduces potential revenue from fees.

Impact

This is a medium severity issue as it directly affects the economic model of the platform on chains with a lower ether value.

Code Snippet

https://github.com/sherlock-audit/2024-04-titles/blob/main/wallflower-contract-v2/src/fees/FeeManager.sol#L70-L71

    /// @dev The maximum protocol fee in wei. Applies to both flat and percentage fees.
    uint64 public constant MAX_PROTOCOL_FEE = 0.1 ether;

Tool used

Manual Review

Recommendation

Consider making MAX_PROTOCOL_FEE adjustable.