This repository has been archived by the owner on Jan 12, 2025. It is now read-only.
sh0velware - safeTransferFrom() function will never work as intended #264
Labels
Excluded
Excluded by the judge without consulting the protocol or the senior
Non-Reward
This issue will not receive a payout
sh0velware
Medium
safeTransferFrom() function will never work as intended
Summary
The
safeTransferFrom()
function will never work as intended because of the usage ofnonReentrantModifier()
.Vulnerability Detail
The
nonReentrant
modifier is used intransferFrom()
andsafeTransferFrom()
functions. Since there is an additional public call tosafeTransferFrom(from, to, tokenId, "")
insafeTransferFrom()
, thenonReentrant
modifier will prevent this second call to be performed, leading to an unexpected revert every time thatsafeTransferFrom()
is called.Impact
The
safeTransferFrom()
function will revert every time withReentrancyGuardReentrantCall()
, not working as intended.Code Snippet
https://github.com/sherlock-audit/2024-06-magicsea/blob/main/magicsea-staking/src/MlumStaking.sol#L336
Tool used
Manual Review
Recommendation
Remove
nonReentrant
modifier.Duplicate of #489
The text was updated successfully, but these errors were encountered: