The quant amm admin will be unable to withdraw accounted fees because no nfts are registered to him
When someone removes liquidity, the onAfterRemoveLiquidity hook is called in the UpliftOnlyExample. This function computes a fee based on the amount that the user wants to remove and differentiates 2 fees. The first fee is the quant amm admin fee. This fee is set in the UpdateWeightRunner and it is a percentage. This percentage will be taken from the whole fee and will be added as liquidity for the admin address:
The rest of the fee is donated to the pool which will be distributed among LPs.
The problem is that this liquidity is added on behalf of the quant admin but without calling the addLiquidityProportional function. What this function does is the creation of nfts representing the positions in order to compute fees later on. Hence, the quant amm admin will receive BPT from the pool but without any nft minted to him.
If he wants to remove this liquidity from the pool, he will only be able to call the removeLiquidityProportional because is the only supported method to remove liquidity from the allowed router.
As we can see it ensures that the user has some nfts registered to his account, but in this case it will not have any. So the end result will be the quant amm having his fees locked
High, lose of funds and high likelihood
Manual review
It has no trivial solution, but maybe registering the nft for the quant amm admin could be a solution
Likelihood: High, won’t be able to withdraw. Impact: High, funds stuck.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.