20,000 USDC
View results
Submission Details
Severity: medium

Fees can possibly be left stuck in contract

Vulnerability Details

the Fees can be locked forever if the owner set the feeReceiver accidentally to the wrong address ( due to a typo in the address).

function setFeeReceiver(address _feeReceiver) external onlyOwner {
feeReceiver = _feeReceiver;
}

Impact

the Fees can be locked forever

Recommendations

using two step to change the the feeReceiver by creating two function with grant and claim mechanism

address grantedFeeReceiver ;
function grantFeeReceiver(address _feeReceiver) external onlyOwner {
grantedFeeReceiver = _feeReceiver ;
}
function claimFeeReceiver() external {
if (msg.sender != grantedFeeReceiver) revert();
feeReceiver = msg.sender ;
}

Support

FAQs

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