This repository has been archived by the owner on Jan 12, 2025. It is now read-only.
minhquanym - safeTransferFrom()
always revert because of nonReentrant
modifier
#338
Labels
Excluded
Excluded by the judge without consulting the protocol or the senior
Non-Reward
This issue will not receive a payout
minhquanym
Medium
safeTransferFrom()
always revert because ofnonReentrant
modifierSummary
MlumStaking
override thesafeTransferFrom()
function but adding anonReentrant
modifier, which will make this function always revert.Vulnerability Detail
In
MlumStaking
contract, functionsafeTransferFrom
andtransferFrom
are overriden to add anonReentrant
modifier to them.However, because of adding a
nonReentrant
modifier, the functionsafeTransferFrom
will produce all calls to this function to revert, since internallysafeTransferFrom
function calls totransferFrom
and this functions also implements anonReentrant
modifier.Impact
safeTransferFrom()
always revert.Code Snippet
https://github.com/sherlock-audit/2024-06-magicsea/blob/main/magicsea-staking/src/MlumStaking.sol#L325-L342
In MlumStaking.sol
In OZ lib ERC721Upgradeable.sol
Tool used
Manual Review
Recommendation
Consider removing these overriden functions.
Duplicate of #489
The text was updated successfully, but these errors were encountered: