Users who transfer the lpNFT to themselves stand the risk of losing their entire balance which can lead to fund loss and accounting issues.
lpNFT's _update function doesn't check that the from and to parameters are different. Neither that the base ERC721's transferFrom and safeTransferFrom functions. As a result, a user can successfully transfer their lpNFT to themselves. However, in doing this, the user stands the risk of losing the FeeData.amount associated with the lpNFT which is the expected amountOut for the user when liquidity is added.
To prove this, the following test can be added to UpliftExample.sol and ran. It shows that the bob loses their balance when he transfers the lpNFT to himself.
Loss of feeData amount
Manual Review
Revert if from == to when transferring lpNFT.
Likelihood: Low, when users wants to transfer tokens they already own to themselves. Impact: High, funds loss.
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.