This repository has been archived by the owner on Jan 12, 2025. It is now read-only.
nikhil840096 - MlumStaking:safeTransferFrom
will not work as expected hence failing in transfer of TokenId.
#489
Labels
Excluded
Excluded by the judge without consulting the protocol or the senior
Non-Reward
This issue will not receive a payout
nikhil840096
Medium
MlumStaking:safeTransferFrom
will not work as expected hence failing in transfer of TokenId.Summary
MlumStaking:safeTransferFrom
is made to transfer the Position's tokenId .Vulnerability Detail
MlumStaking:safeTransferFrom
overridesERC721Upgradeable and IERC721
, alsoMlumStaking:transferFrom
overridesERC721Upgradeable, IERC721
Now let's go with the execution. Aslo note thatMlumStaking:safeTransferFrom
andMlumStaking:transferFrom
hasnonReentrant
modifier.https://github.com/sherlock-audit/2024-06-magicsea/blob/main/magicsea-staking/src/MlumStaking.sol#L336-L342
https://github.com/sherlock-audit/2024-06-magicsea/blob/main/magicsea-staking/src/MlumStaking.sol#L325-L331
ERC721Upgradeable.safeTransferFrom
callsERC721Upgradeable.transferFrom
this function is overriden by theMlumStaking:transferFrom
so the execution will get here and will fail due to non-reentrant modifier. As if user tries to burn usingsafeTransferFrom
, sending it to address(0), this functionality will not work, due to above explained reasons.Impact
Code Snippet
https://github.com/sherlock-audit/2024-06-magicsea/blob/main/magicsea-staking/src/MlumStaking.sol#L336-L342
https://github.com/sherlock-audit/2024-06-magicsea/blob/main/magicsea-staking/src/MlumStaking.sol#L325-L331
Tool used
Manual Review
Recommendation
The text was updated successfully, but these errors were encountered: