NFTBridge
60,000 USDC
View results
Submission Details
Severity: low
Invalid

transferFrom used instead of safetransferFrom when deposit get called.

Summary

under _depositIntoEscrow function transferFrom is used which is unsafe since it do not check the result if the call made is successfull or not.

Vulnerability Details

under _depositIntoEscrow function transferFrom is used which is unsafe since it do not check the result if the call made is successfull or not.unless one is sure the given token reverts in case of a failure. Failure to do so will cause silent failures of transfers and affect token accounting in contract.

function _depositIntoEscrow(
CollectionType collectionType,
address collection,
uint256[] memory ids
)
internal
{
assert(ids.length > 0);
for (uint256 i = 0; i < ids.length; i++) {
uint256 id = ids[i];
if (collectionType == CollectionType.ERC721) {
IERC721(collection).transferFrom(msg.sender, address(this), id);

Impact
silent failure can revert in case of unsuccessfull call.

Tools Used

Recommendations
Consider using safeTransferFrom consistently like used under _withdrawFromEscrow function.

Updates

Lead Judging Commences

n0kto Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational / Gas

Please, do not suppose impacts, think about the real impact of the bug and check the CodeHawks documentation to confirm: https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity A PoC always helps to understand the real impact possible.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.