QuantAMM

QuantAMM
49,600 OP
View results
Submission Details
Severity: low
Invalid

The `HookUpliftWithdrawalFeePercentageChanged` event and the `TakeFeeLocalData` struct are not utilized anywhere in the `UpliftOnlyExample` contract or across the project.

Summary

The HookUpliftWithdrawalFeePercentageChanged event and TakeFeeLocalData struct are unused in both the UpliftOnlyExample contract and the project.

Vulnerability Details

  1. According to the NatSpec documentation, the HookUpliftWithdrawalFeePercentageChanged event is intended to emit when the uplift withdrawal fee percentage is changed. However, this event is not used anywhere in the contract. Additionally, the uplift withdrawal fee variable and its corresponding calculations are not implemented in the contract.

  2. The TakeFeeLocalData struct is also not utilized in any calculations or logic within the contract.

1. /**
* @notice The uplift withdrawal fee percentage has been changed.
* @dev Note that the initial fee will be zero, and no event is emitted on deployment.
* @param hooksContract The hooks contract charging the fee
* @param hookFeePercentage The new hook swap fee percentage
*/
//@written low/info -use this event at appropriate place.
event HookUpliftWithdrawalFeePercentageChanged(address indexed hooksContract, uint256 hookFeePercentage);
/**
2. struct TakeFeeLocalData {
address nftHolder;
address pool;
uint256[] amountsOutRaw;
uint256 currentFee;
IERC20[] tokens;
uint256[] accruedFees;
}

Tools Used

Manual review

Recommendations

  1. Use HookUpliftWithdrawalFeePercentageChanged in appropriate position and if uplift withdrawal fee variable and its corresponding calculations missing implement them in the contract.

  2. Use `TakeFeeLocalData` in the place needed.

If both are redundant remove them from the contract to save gas and misinformations.

Updates

Lead Judging Commences

n0kto Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational or Gas / Admin is trusted / Pool creation is trusted / User mistake / Suppositions

Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelyhood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.

Support

FAQs

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

Give us feedback!