QuantAMM

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

Protocol Fees Diminished Due to Admin Fee Payment on Liquidity Removal

Summary

When removing liquidity, the protocol admin is charged fees that reduce the protocol's yield, as tokens are minted to the admin address which then incurs fees on removal. This occurs even when not using the UpliftOnlyExample contract, as fees are charged by the vault itself depending on the kind of remove liquidity.

Vulnerability Details

In the UpliftOnlyExample contract, tokens are minted to the protocol admin address:

to: IUpdateWeightRunner(_updateWeightRunner).getQuantAMMAdmin()

When these tokens are later removed, fees are charged. This means that when the admin removes liquidity, they pay fees that reduce the protocol's overall yield.

For example:
Protocol yield from fees = 100
Fee to remove liquidity = 1%

The protocol will receive 99 from the yield. Even though they were entitled to 100.

This is separate from profit and loss of a LP position. This is a reduction in yield for the protocol regardless of the value that the LP position is worth.

Impact

Loss of yield - The protocol receives less yield than intended due to fees being charged on admin liquidity removal.

Tools Used

Manual Review

Recommendations

When calculating fee rates for liquidity removal, implement logic to account for fees that will be paid by the admin. This ensures the protocol receives its full intended yield by adjusting the fee rate when the admin removes liquidity.

Updates

Lead Judging Commences

n0kto Lead Judge 10 months ago
Submission Judgement Published
Validated
Assigned finding tags:

finding_admin_pay_fees_during_withdrawing

Likelihood: Low/Medium, only impact admin. Impact: Medium, pay the same fees than other people and will collect them later. But admin fees will be decreased because of uplift fees. But this bug won't happen because of H-12: deserves a Low.

Appeal created

rzizah Auditor
10 months ago
n0kto Lead Judge
9 months ago
n0kto Lead Judge 9 months ago
Submission Judgement Published
Validated
Assigned finding tags:

finding_admin_pay_fees_during_withdrawing

Likelihood: Low/Medium, only impact admin. Impact: Medium, pay the same fees than other people and will collect them later. But admin fees will be decreased because of uplift fees. But this bug won't happen because of H-12: deserves a Low.

Support

FAQs

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