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

AresAudits - ManagedBudget and AManagedBudget Contract Does Not Fully Implement ERC1155 Interface #388

Open
sherlock-admin3 opened this issue Sep 20, 2024 · 0 comments

Comments

@sherlock-admin3
Copy link

sherlock-admin3 commented Sep 20, 2024

AresAudits

Medium

ManagedBudget and AManagedBudget Contract Does Not Fully Implement ERC1155 Interface

Summary

duplicate of sherlock-audit/2024-04-titles-judging#287

Vulnerability Detail

The AManagedBudget contract is intended to support multiple interfaces, including ERC1155. However, the current implementation of the supportsInterface function does not correctly return true for the ERC1155 interface ID (0xd9b67a26). This non-compliance can lead to interoperability issues with other contracts and tools that expect the contract to adhere to the ERC1155 standard.

The supportsInterface function currently checks for the interface IDs of AManagedBudget, IERC1155Receiver, and IERC165, as well as any interfaces supported by ABudget. However, it does not explicitly check for the ERC1155 interface ID (0xd9b67a26).

function supportsInterface(bytes4 interfaceId) public view virtual override(ABudget, IERC165) returns (bool) {
        return interfaceId == type(AManagedBudget).interfaceId || interfaceId == type(IERC1155Receiver).interfaceId
            || interfaceId == type(IERC165).interfaceId || ABudget.supportsInterface(interfaceId);
    }

Impact

The contract is to be a strict implementation of ERC1155, but it does not implement the mandatory ERC1155.supportsInterface() function.

Code Snippet

https://github.com/sherlock-audit/2024-06-boost-aa-wallet/blob/78930f2ed6570f30e356b5529bd4bcbe5194eb8b/boost-protocol/packages/evm/contracts/budgets/AManagedBudget.sol#L51C5-L54C6

Tool used

Manual Review

Recommendation

@sherlock-admin3 sherlock-admin3 changed the title Formal Charcoal Albatross - ManagedBudget and AManagedBudget Contract Does Not Fully Implement ERC1155 Interface AresAudits - ManagedBudget and AManagedBudget Contract Does Not Fully Implement ERC1155 Interface Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant