The CallyNft contract does not override the transferFrom function, resulting in an underflow in the transferFrom function #2
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
withdrawn by warden
Special case: warden has withdrawn this submission and it can be ignored
Lines of code
https://github.com/code-423n4/2022-05-cally/blob/1849f9ee12434038aa80753266ce6a2f2b082c59/contracts/src/CallyNft.sol#L12-L12
Vulnerability details
Impact
The CallyNft contract inherits from the ERC721 contract and removes the modification to _balanceOf to save gas.
The CallyNft contract overrides the _mint and _burn functions, but does not override the transferFrom function, which causes an underflow when the user calls the transferFrom and safeTransferFrom functions of the CallyNft contract
Proof of Concept
https://github.com/code-423n4/2022-05-cally/blob/1849f9ee12434038aa80753266ce6a2f2b082c59/contracts/src/CallyNft.sol#L12-L12
Tools Used
None
Recommended Mitigation Steps
Override transferFrom function
The text was updated successfully, but these errors were encountered: