QuantAMM

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

`minWithdrawalFeeBps` is not needed and causes user inconvenience

Summary

The UpliftOnlyExample contract implements an unnecessary minWithdrawalFeeBps that provides no additional security while negatively impacting user economics when withdrawing non-uplifted positions and positions on loss.

Vulnerability Details

The contract implements minWithdrawalFeeBps as a security measure:

/// @notice The withdrawal fee in basis points (1/10000) that will be charged if no uplift was provided.
uint64 public immutable minWithdrawalFeeBps;

However, this is redundant because:

  1. MEV attacks attempting to extract value from swap fees would trigger uplift fees since their value increased, making minWithdrawalFeeBps irrelevant

  2. Share price manipulation through getPoolLPTokenValue is prevented by design:

function getPoolLPTokenValue(
int256[] memory _prices,
address pool,
MULDIRECTION _direction
) internal view returns (uint256) {
// Price calculation uses both balances and total supply
// Any proportional liquidity addition scales both equally
}
  • The pool only allows proportional liquidity additions through the hook, meaning any attempt to manipulate reserves would equally affect both numerator (balances) and denominator (total supply), neutralizing the attack vector.

Impact

While this doesn't create direct security vulnerabilities, it:

  • Unnecessarily charges fees to users withdrawing without uplift and also for users that had their deposit value decrease due to strategy performance

Tools Used

Manual review

Recommendations

  1. Remove minWithdrawalFeeBps entirely since the protocol design already provides security against:

    • MEV attacks (through uplift fees)

    • Share price manipulation (through proportional deposits)

    • Reserve manipulation (through hook-controlled liquidity)

  2. Allow zero-fee withdrawals when no uplift has occurred to improve user experience in down markets

  3. Focus fee structure purely on capturing value from successful uplifts rather than maintaining unnecessary minimum fees

Updates

Lead Judging Commences

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

Support

FAQs

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

Give us feedback!