The lpNFT
contract lacks proper validation when transferring tokens to contract addresses, allowing the use of unsafe transfer methods that could result in irreversible token lockup.
The lpNFT
contract extends ERC721
but doesn't enforce safe transfer practices :
https://github.com/Cyfrin/2024-12-quantamm/blob/a775db4273eb36e7b4536c5b60207c9f17541b92/pkg/pool-hooks/contracts/hooks-quantamm/LPNFT.sol#L49-L56
Key issues:
Direct use of transferFrom
remains possible
No validation of contract recipients' ability to handle ERC721
tokens
Irreversible loss of LP positions if tokens are sent to incompatible contracts
VSCode
Implement strict transfer controls:
This ensures only safeTransferFrom
can be used for contract recipients, preventing accidental token lockup while maintaining the protocol's core functionality.
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelyhood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
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.