Platform: Code4rena
Start Date: 30/03/2022
Pot Size: $30,000 USDC
Total HM: 21
Participants: 38
Period: 3 days
Judge: Michael De Luca
Total Solo HM: 10
Id: 104
League: ETH
Rank: 22/38
Findings: 3
Award: $325.20
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: hickuphh3
Also found by: 0xDjango, kirk-baird, leastwood, m9800, minhquanym, pedroais
203.7202 USDC - $203.72
https://github.com/code-423n4/2022-03-joyn/blob/c9297ccd925ebb2c44dbc6eaa3effd8db5d2368a/core-contracts/contracts/ERC721Payable.sol#L54 https://github.com/code-423n4/2022-03-joyn/blob/c9297ccd925ebb2c44dbc6eaa3effd8db5d2368a/core-contracts/contracts/CoreCollection.sol#L175
transferFrom()
might return false instead of reverting. In this case, failed transfer allows exploiter to call mintToken
for free.#0 - sofianeOuafir
2022-04-14T15:13:57Z
In my opinion, the severity level should be 3 (High Risk) instead of 2 (Med Risk) duplicate of #52
🌟 Selected for report: kirk-baird
Also found by: 0xDjango, Dravee, Ruhum, TomFrenchBlockchain, WatchPug, defsec, hubble, hyh, leastwood, minhquanym
85.0569 USDC - $85.06
https://github.com/code-423n4/2022-03-joyn/blob/c9297ccd925ebb2c44dbc6eaa3effd8db5d2368a/royalty-vault/contracts/RoyaltyVault.sol#L40-L41 https://github.com/code-423n4/2022-03-joyn/blob/c9297ccd925ebb2c44dbc6eaa3effd8db5d2368a/royalty-vault/contracts/RoyaltyVault.sol#L67-L70
sendToSplitter
, line 40 calculate
platformShare = (balanceOfVault * platformFee) * 10000;
platformFee
to arbitrary uint256
value using setPlatformFee
function.platformFee > 10000
then platformShare
will even bigger than balanceOfVault
, make line 41 revert everytime because of arithmetic underflow and causes denial of service.platformFee <= 10000
in setPlatformFee
function.
require(platformFee <= 10000, ‘invalid platformFee’);
#0 - sofianeOuafir
2022-04-14T20:37:53Z
duplicate of #9
36.417 USDC - $36.42
CoreFactory.sol
can be optimized:uint256 length = _collections.length; for (uint256 i; i < length; ) { // do something // uncheck { ++i; } }
!= 0
costs less gass compared to > 0
for unsigned integer!= 0
costs less gass compared to > 0
for unsigned integer> 0
with != 0
.== true
when check boolean variable save gas.== true
when check boolean variable can save a tiny amount of gas.== true
.platformShare
can be 0 when balanceOfVault < 10000 / platformFee
(platformFee = 500
in default)splitterShare
can be 0 when platformFee == 10000
.platformShare != 0
and splitterShare != 0
before making the transfer to save gas.platformShare != 0
before transfer