Immutable platform fee configuration leads to inflexible fee structure and forced upgrades
Platform fee can only be set at initialization and cannot be updated, forcing costly upgrades for any future fee adjustment.
Description
The platform fee percentage can only be set once during contract initialization and cannot be updated afterward. The contract lacks any administrative function to modify the platformFeePercent value after deployment, making the fee structure permanently fixed.
function initialize(address payable _treasury, uint32 _fee) public initializer {if (_treasury == address(0)) revert ZeroAddress();if (_fee > 10000) revert InvalidFee();platformTreasury = _treasury;platformFeePercent = _fee; // Set once during initialization, no update mechanism}
This creates several operational challenges:
- Market adaptation: Unable to adjust fees based on changing market conditions or user feedback.
- Competitive response: Cannot respond to competitor pricing strategies or industry standards.
- Revenue optimization: No ability to experiment with different fee structures to optimize platform revenue.
The immutable fee structure may force the platform to choose suboptimal initial fees due to uncertainty about future market conditions, or alternatively require costly contract upgrades solely for fee adjustments.
Impact
Operational rigidity; future fee changes require a full upgrade cycle even though fees are operational parameters.
Recommendation
Implement an administrative function to update platform fees with appropriate access controls and safety measures:
event PlatformFeeUpdated(uint32 oldFee, uint32 newFee);function updatePlatformFee(uint32 _newFee) external onlyOwner {if (_newFee > 10000) revert InvalidFee();uint32 oldFee = platformFeePercent;platformFeePercent = _newFee;emit PlatformFeeUpdated(oldFee, _newFee);}
Resolution
Ipal Network: Confirmed. We agreed with the recommendation.
Zealynx: Not Fixed: The platform fee percentage can only be set once during contract initialization and cannot be updated afterward.
UPDATE: Fixed.

