Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: low
Invalid

```Streets::stake``` anyone can stake NFT of other users

Summary

The Streets::stake exhibits the absence of ownership verification. This oversight allows any user to initiate the staking process for any NFT, provided they have been granted transfer approval, without verifying if the caller is the legitimate owner of the NFT.

Vulnerability Details

@> function stake(uint256 tokenId) external {
stakes[tokenId] = Stake(block.timestamp, msg.sender);
emit Staked(msg.sender, tokenId, block.timestamp);
oneShotContract.transferFrom(msg.sender, address(this), tokenId);
}

Impact

The absence of ownership verification in the staking process lead to unauthorized staking actions. Individuals other than the NFT owner can stake NFTs without the owner's consent (if they have been granted a transfer approval before).

Tools Used

Manual review

Recommendations

Implement the ownership verification in the stake function.

Updates

Lead Judging Commences

inallhonesty Lead Judge
over 1 year ago
inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.