buyPresent is documented as a function to "Buy a present for someone else." The caller passes a presentReceiver address as the intended gift recipient, and the NFT should be delivered to that address.
However, _mintAndIncrement always mints to msg.sender, regardless of the presentReceiver argument. The recipient parameter is only used for the burn call (which is itself wrong, see H-3). The end result is that the caller buys a present and keeps it for themselves, while the designated recipient receives nothing.
Likelihood:
Every call to buyPresent exhibits this behavior — the recipient parameter is never used for minting
There is no code path in buyPresent that delivers the NFT to presentReceiver
Impact:
The gifting feature is entirely non-functional
Users who intend to buy presents for others are misled by the function signature and NatSpec
Recipients are denied NFTs they were supposed to receive
A user calls buyPresent(recipient) expecting the recipient to receive an NFT. After the call, the recipient's NFT balance is 0 while the caller holds the NFT.
Mint directly to presentReceiver inside buyPresent rather than delegating to _mintAndIncrement, which hardcodes msg.sender as the recipient.
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.