The LikeRegistry constructor accepts a _profileNFT address parameter and wraps it directly into a SoulboundProfileNFT interface, which is then used by likeUser() to validate that both the liker and liked user hold a profile NFT before recording a like.
No zero-address check or interface validation is performed at construction time — any address, including address(0) or a completely unrelated contract, is silently accepted. The failure only surfaces at runtime when likeUser() calls profileToToken(), permanently bricking the protocol with no recovery path short of full redeployment.
Likelihood:
Low. Only triggered by deployer error — wrong address copy-paste, deploying to a new chain without redeploying the NFT contract first, or a botched migration/upgrade script.
Impact:
Medium. If _profileNFT is set to the zero address or a non-SoulboundProfileNFT contract, every likeUser() call reverts permanently. The entire protocol is bricked at deployment with no upgrade path — requires full redeployment.
The constructor blindly wraps whatever address it receives into a SoulboundProfileNFT interface. No zero-address check, no interface validation. A bad address silently passes construction and only fails at runtime when profileToToken() is called.
Create a new test contract in new test folder
Ran with command: forge test --match-path InvalidProfileNFTPoC.t.sol -vvvv
Validate the address and do a minimal interface sanity-check in the constructor.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.