Closed c4-submissions closed 7 months ago
141345 marked the issue as duplicate of #703
141345 marked the issue as not a duplicate
141345 marked the issue as primary issue
a2rocket (sponsor) disputed
the check is done when the artist proposes addresses and percentages. The could no't exceed what was set by the admin.
141345 marked the issue as sufficient quality report
The Warden specifies that the percentages are not properly evaluated to sum to the expected values during the payArtist
function.
The Sponsor states that these are indeed validated when set, however, an attack vector does exist due to a proposal / accepted discrepancy as explained in #1686.
The Warden has failed to identify this attack vector and simply states that an error may be present which I consider 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/MinterContract.sol#L415-L444
Vulnerability details
Impact
This can lead to for the artist during royalty payment.
Proof of Concept
In the
payArtist(...)
function in theMinterContract.sol
contract, theartistRoyalties1
,artistRoyalties2
andartistRoyalties3
are susceptible to errors due to missing validation checks. For instance,add1Percentage
,add2Percentage
,add3Percentage
are supposed to sum up to equalcollectionRoyaltiesPrimarySplits[_collectionID].artistPercentage
_teamperc1
,_teamperc2
are supposed to sum up to equalcollectionRoyaltiesPrimarySplits[_collectionID].teamPercentage
.But as shown below, these checke is not done and for that reason, the calculated values for
artistRoyalties1
,artistRoyalties2
andartistRoyalties3
could be susceptible to errorsTools Used
Manual review
Recommended Mitigation Steps
Modify
payArtist(...)
to include checks to ensure this missing checks mentioned above are implemented as shown belowAssessed type
Invalid Validation