The Standard

The Standard
DeFiHardhat
20,000 USDC
View results
Submission Details
Severity: low
Invalid

Undeleted test code , will cause code redundancy

Summary

The SmartVaultManagerV5:_afterTokenTransfer is a test code snippet, used for callback after token transfered, but it is an internal method , useless here .

Vulnerability Details

This code snippet execute a callback, set owner address , but it is just for test case, will never be called on mainnet environment .

https://github.com/Cyfrin/2023-12-the-standard/blob/main/contracts/SmartVaultManagerV5.sol#L139-L143

function _afterTokenTransfer(address _from, address _to, uint256 _tokenId, uint256) internal override {
smartVaultIndex.transferTokenId(_from, _to, _tokenId);
if (address(_from) != address(0)) ISmartVault(smartVaultIndex.getVaultAddress(_tokenId)).setOwner(_to);
emit VaultTransferred(_tokenId, _from, _to);
}

Impact

This will cause code redundancy, and influence code structure's functionality .

Tools Used

Mannual Review, VScode

Recommendations

Delete this code snippet , and this does not affect any other methods .

Updates

Lead Judging Commences

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

informational/invalid

Support

FAQs

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