DatingDapp

First Flight #33
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Severity: low
Invalid

Immutable FIXEDFEE with No Update Mechanism in LikeRegistry

Summary

The FIXEDFEE in LikeRegistry is declared as immutable without any mechanism to update it, potentially causing issues if fee adjustments are needed in the future.

Vulnerability Details

Current implementation:

uint256 immutable FIXEDFEE = 10;

Impact

  • No ability to adjust fees based on market conditions

  • Contract would need to be redeployed to change fee structure

  • Potential loss of flexibility in business model

  • Could lead to contract abandonment if fee structure becomes unsuitable

Tools Used

  • VScode

  • Dev Container

Recommendations

  1. Implement an updatable fee structure with admin controls:

uint256 private _fixedFee;
event FeeUpdated(uint256 oldFee, uint256 newFee);
function updateFee(uint256 newFee) external onlyOwner {
require(newFee <= 100, "Fee cannot exceed 100%");
uint256 oldFee = _fixedFee;
_fixedFee = newFee;
emit FeeUpdated(oldFee, newFee);
}

2. Add timelock for fee changes

3. Consider implementing a fee calculation interface for more complex fee structures

Updates

Appeal created

n0kto Lead Judge 3 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.