Closed c4-submissions closed 11 months ago
141345 marked the issue as duplicate of #2039
141345 marked the issue as duplicate of #51
141345 marked the issue as duplicate of #1742
alex-ppg marked the issue as not a duplicate
The Warden has marked a few instances where re-entrancy could occur and some of them do indeed lead to fund loss, such as in the AuctionDemo
contract and #1547.
However, the Warden has simply marked these instances as a static analyzer would and has failed to elaborate on the why and how. As such, I consider this exhibit to have insufficient proof.
alex-ppg marked the issue as unsatisfactory: Insufficient proof
Lines of code
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/NextGenCore.sol#L231 https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/hardhat/smart-contracts/ERC721.sol#L193 https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/MinterContract.sol#L434-L438 https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/MinterContract.sol#L464 https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/hardhat/smart-contracts/AuctionDemo.sol#L112-L116
Vulnerability details
Impact
This can lead to massive loss of funds and asset in Nextgen.
Proof of Concept
There are multiple instances of reentrancy in
NextGenCore.sol
,MinterContract.sol
andAuctionMemo.sol
. These reentrancy is due to_safeMint(...)
for token transfer which implements a_checkOnERC721Received(...)
andsafeTransferFrom
return value check on therecipient
contract thereby handing transfer over to the recipient contract.call()
function to transfer value to external recipients thereby handing transfer over tot these contracts. for example in thepayArtist(...)
function of theMinterContract.sol
contract.In both scenarios, a malicious user can perform malicious tasks that could lead to huge loss for the protocol
Tools Used
Manual
Recommended Mitigation Steps
Implement a reentrancy guard in all state altering and state reading functions in the
NextGenCore.sol
,MinterContract.sol
andAuctionMemo.sol
contracts respectivelyAssessed type
Reentrancy