Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Implementation of ERC721 Standard #97

Open
howlbot-integration bot opened this issue Sep 16, 2024 · 5 comments
Open

Incorrect Implementation of ERC721 Standard #97

howlbot-integration bot opened this issue Sep 16, 2024 · 5 comments
Labels
bug Something isn't working downgraded by judge Judge downgraded the risk level of this issue duplicate-49 grade-b Q-09 QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax 🤖_56_group AI based duplicate group recommendation sufficient quality report This report is of sufficient quality

Comments

@howlbot-integration
Copy link

Lines of code

https://github.com/code-423n4/2024-08-superposition/blob/4528c9d2dbe1550d2660dac903a8246076044905/pkg/sol/OwnershipNFTs.sol#L13

Vulnerability details

Vulnerability Details

The contract claims to implement IERC721Metadata, but it's missing several required functions from the ERC721 standard, such as supportsInterface(bytes4 interfaceId). This makes the contract non-compliant with the ERC721 standard.

Impact

Non-compliance with the ERC721 standard can lead to compatibility issues with wallets, marketplaces, and other contracts expecting a standard ERC721 token. This could result in tokens not being recognized or displayed correctly, potentially leading to loss of value or functionality for token holders.

Proof of Concept

The contract is missing the following required functions:

  • supportsInterface(bytes4 interfaceId)
  • totalSupply()
  • tokenByIndex(uint256 index)
  • tokenOfOwnerByIndex(address owner, uint256 index)

Tools Used

Manual Review

Recommended Mitigation Steps

Implement all required functions of the ERC721 standard. Consider using OpenZeppelin's ERC721 implementation as a base and extending it with your custom logic.

Assessed type

ERC721

@howlbot-integration howlbot-integration bot added 3 (High Risk) Assets can be stolen/lost/compromised directly 🤖_56_group AI based duplicate group recommendation bug Something isn't working duplicate-49 sufficient quality report This report is of sufficient quality labels Sep 16, 2024
howlbot-integration bot added a commit that referenced this issue Sep 16, 2024
@c4-judge c4-judge added downgraded by judge Judge downgraded the risk level of this issue QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax and removed 3 (High Risk) Assets can be stolen/lost/compromised directly labels Sep 23, 2024
@c4-judge
Copy link
Contributor

alex-ppg changed the severity to QA (Quality Assurance)

@c4-judge
Copy link
Contributor

alex-ppg marked the issue as grade-c

@c4-judge c4-judge added grade-c unsatisfactory does not satisfy C4 submission criteria; not eligible for awards labels Sep 23, 2024
@c4-judge c4-judge reopened this Oct 7, 2024
@c4-judge c4-judge removed downgraded by judge Judge downgraded the risk level of this issue QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax labels Oct 7, 2024
@c4-judge
Copy link
Contributor

c4-judge commented Oct 7, 2024

This previously downgraded issue has been upgraded by alex-ppg

@c4-judge c4-judge added 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value downgraded by judge Judge downgraded the risk level of this issue QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax and removed 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value labels Oct 7, 2024
@c4-judge
Copy link
Contributor

c4-judge commented Oct 7, 2024

alex-ppg changed the severity to QA (Quality Assurance)

@c4-judge c4-judge closed this as completed Oct 7, 2024
@c4-judge
Copy link
Contributor

c4-judge commented Oct 7, 2024

alex-ppg marked the issue as grade-b

@c4-judge c4-judge added grade-b and removed grade-c unsatisfactory does not satisfy C4 submission criteria; not eligible for awards labels Oct 7, 2024
@C4-Staff C4-Staff reopened this Oct 7, 2024
@C4-Staff C4-Staff added the Q-09 label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working downgraded by judge Judge downgraded the risk level of this issue duplicate-49 grade-b Q-09 QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax 🤖_56_group AI based duplicate group recommendation sufficient quality report This report is of sufficient quality
Projects
None yet
Development

No branches or pull requests

2 participants