QuantAMM

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

Potential Error in Fee Calculation Based on Deposit Value Change

Summary

In

  1. /pkg

  2. /pool-hooks

  3. /contracts

  4. /hooks-quantamm

This submission identifies an error in UpliftOnlyExample.sol the fee calculation logic for feePerLP. The comment specifies that the fee should be calculated based on the deposit value, but the implementation incorrectly calculates it based on lpTokenDepositValueChange.

Vulnerability Details

In UpliftOnlyExample.sol in line 479 comment says that fee should be calculated in based on deposit value but in line 482 it is being calculated on change value `lpTokenDepositValueChange` .

Impact

Calculating the fee based on lpTokenDepositValueChange instead of the deposit value can result in inaccurate fee charges, especially when there is little or no change in the token value. This miscalculation may lead to either overcharging or undercharging users, undermining the integrity of the fee structure and user trust in the system.

Tools Used

Manual review

Recommendations

Correction should be made in UpliftOnlyExample.sol on line 482 and fee should be calculated on based on Value deposited .

Updates

Lead Judging Commences

n0kto Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Too generic

Support

FAQs

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