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

QA Report #366

Open
code423n4 opened this issue Aug 6, 2022 · 0 comments
Open

QA Report #366

code423n4 opened this issue Aug 6, 2022 · 0 comments
Labels
bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax valid

Comments

@code423n4
Copy link
Contributor

Overall, there has been a ton of thought and detail into the architecture of this protocol. Unfortunately, we had not had enough time to dig deep into this contest so we are just noting once low risk bug issue that we found.


Issue:
It is discouraged to use _mint. Should use _safeMint instead. If the recipient of the HomeFi project is a smart contract, _safeMint() will check if the contract can handle an ERC721 receive. The minted ERC721 can get lost in the current state if mint is called upon a smart contract.

https://github.com/OpenZeppelin/openzeppelin-contracts/blob/d4d8d2ed9798cc3383912a23b5e8d5cb602f7d4b/contracts/token/ERC721/ERC721.sol#L271

This has come up before in C4:
code-423n4/2021-11-vader-findings#27

Recommended Mitigation:
Use _safeMint.

@code423n4 code423n4 added bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax labels Aug 6, 2022
code423n4 added a commit that referenced this issue Aug 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax valid
Projects
None yet
Development

No branches or pull requests

2 participants