In the UpliftOnlyExample.sol
contract, the nftPool
mapping is used to associate NFT token IDs with pool addresses. This mapping is populated when liquidity is added:
However, when liquidity is removed and the NFT is burned, this mapping entry is never cleared. While this doesn't pose a functional security risk since token IDs are strictly increasing and can never be reused (as implemented in LPNFT.sol's
mint
function), it does lead to unnecessary state bloat in the contract.
Add cleanup logic in the remove liquidity function to clear the mapping entry when an NFT is burned
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.