code-423n4 / 2022-10-juicebox-findings

2 stars 0 forks source link

QA Report #99

Open code423n4 opened 1 year ago

code423n4 commented 1 year ago

_SAFEMINT() SHOULD BE USED RATHER THAN _MINT() WHEREVER POSSIBLE

_mint() is discouraged in favor of _safeMint() which ensures that the recipient is either an EOA or implements IERC721Receiver. Both OpenZeppelin and solmate have versions of this function

https://github.com/jbx-protocol/juice-nft-rewards/blob/f9893b1497098241dd3a664956d8016ff0d0efd0/contracts/JBTiered721Delegate.sol#L461 https://github.com/jbx-protocol/juice-nft-rewards/blob/f9893b1497098241dd3a664956d8016ff0d0efd0/contracts/JBTiered721Delegate.sol#L635

reference : https://code4rena.com/reports/2022-06-nibbl/#l-05-_safemint-should-be-used-rather-than-_mint-wherever-possible

c4-judge commented 1 year ago

Picodes marked the issue as grade-b