The nftPool
is a public mapping in the UpliftOnlyExample
contract . It is a mapping of tokenId
to pool address.
It is expected to be deleted or set to zero address when the tokenId
is burned as evident from the tests in UpliftOnlyExample.t.sol
However this assertion has passed because nftTokenId
is initialized with 0 and has never changed it’s value. Since the valid tokenIDs in LPNFT start from 1, the expression upliftOnlyRouter.nftPool(0)
will always evaluate to 0.
Recommended Mitigation:
In the function UpliftOnlyExample::onAfterRemoveLiquidity
consider burning the NftPool
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.