MinterContract.burnToMint
lacks of check setMintingCosts
#1683
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate-1866
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/MinterContract.sol#L258-L272
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/MinterContract.sol#L196-L254
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/MinterContract.sol#L326-L365
Vulnerability details
Impact
While
MinterContract.getPrice
is called by MinterContract.mint, before the call, the function will check setMintingCosts to make sure the minting cost has been set.Same thing happens to
MinterContract.burnOrSwapExternalToMint
, before calling MinterContract.getPrice, setMintingCosts is also checked.But for MinterContract.burnToMint, the function doesn't check
setMintingCosts
for _mintCollectionID, without this check, if the minting cost hasn't be set, the user can mint_mintCollectionID
token freeProof of Concept
MinterContract.burnToMint:
Tools Used
VIM
Recommended Mitigation Steps
Assessed type
Other
The text was updated successfully, but these errors were encountered: