Platform: Code4rena
Start Date: 01/07/2022
Pot Size: $75,000 USDC
Total HM: 17
Participants: 105
Period: 7 days
Judge: Jack the Pug
Total Solo HM: 5
Id: 143
League: ETH
Rank: 51/105
Findings: 2
Award: $128.44
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: IllIllI
Also found by: 0v3rf10w, 0x1f8b, 0x29A, 0xDjango, 0xNazgul, 0xNineDec, 0xdanial, 0xf15ers, Bnke0x0, Ch_301, Chandr, Chom, Funen, GimelSec, Hawkeye, JC, Kaiziron, Lambda, Meera, MiloTruck, Noah3o6, Picodes, ReyAdmirado, Rohan16, Sm4rty, TerrierLover, TomJ, Waze, _Adam, __141345__, asutorufos, aysha, berndartmueller, brgltd, cccz, codexploder, defsec, delfin454000, djxploit, durianSausage, fatherOfBlocks, hake, horsefacts, hubble, jayfromthe13th, joestakey, jonatascm, m_Rassska, oyc_109, pashov, rajatbeladiya, rbserver, robee, sach1r0, sahar, samruna, simon135, svskaushik, zzzitron
90.2101 USDC - $90.21
JBTokenStore.sol
change to ‘its’:
line 122:// If the project has a current token, add it's total supply to the total.
JBSplitStore.sol
‘they are cumulatively ’
line226:// Add up all the percents to make sure they cumulative are under 100%.
spit - >split
line 284:Unpack splits' packed stored values into easy-to-work-with spit structs.
JBDirectory.sol
its - >it's
line132:// If a primary terminal for the token was specifically set and its one of the project's terminals, return it.
JBFundingCycleStore.sol
its⇒it's
line 811: // Otherwise if the ballot's duration hasn't passed, its still active.
JBSingleTokenPaymentTerminalStore.sol
Remove apostrophe from Mint's :
line 295:Mint's the project's tokens according to values provided by a configured data source. If no data source is configured, mints tokens proportional to the amount of the contribution.
“convenience”
line837:// If the fee is zero or if the fee is being used by an address that doesn't incur fees, set the discount to 100% for convinience.
JBDirectory.sol
Within the setTerminalsOf()
function, the comment that is mentioned below can be removed since the mapping is being overwritten and not deleted:
line270:// Delete the stored terminals for the project.
JBController.sol
If the condition is fulfilled, it will be reverted with “minting not allowed”. Therefore, the comment within the implementation should match but currently, it is doesn't.
line653:// If the message sender is not a terminal or a datasource, the current funding cycle must allow minting.
#0 - mejango
2022-07-13T04:39:52Z
Love this. thank you!!
🌟 Selected for report: 0xA5DF
Also found by: 0v3rf10w, 0x09GTO, 0x1f8b, 0x29A, 0xDjango, 0xKitsune, 0xNazgul, 0xdanial, 0xf15ers, Aymen0909, Bnke0x0, Ch_301, Cheeezzyyyy, Chom, ElKu, Funen, Hawkeye, IllIllI, JC, JohnSmith, Kaiziron, Lambda, Limbooo, Meera, Metatron, MiloTruck, Noah3o6, Picodes, Randyyy, RedOneN, ReyAdmirado, Rohan16, Saintcode_, Sm4rty, TomJ, Tomio, Tutturu, UnusualTurtle, Waze, _Adam, __141345__, ajtra, apostle0x01, asutorufos, brgltd, c3phas, cRat1st0s, codexploder, defsec, delfin454000, djxploit, durianSausage, exd0tpy, fatherOfBlocks, hake, horsefacts, ignacio, jayfromthe13th, joestakey, jonatascm, kaden, kebabsec, m_Rassska, mektigboy, mrpathfindr, oyc_109, rajatbeladiya, rbserver, rfa, robee, sach1r0, sashik_eth, simon135
38.2306 USDC - $38.23
Use unchecked block for gas savings
JBTokenStore.sol#L353
uint256 _unclaimedTokensToBurn = _amount - _claimedTokensToBurn;
Cannot realistically underflow since _claimedTokensToBurn
will be either be less or equal to amount
from the prior calculation :
No need to initialise to zero :
JBSplitsStore.sol
JBOperatorStore.sol
JBFundingCycleStore.sol
JBController.sol
JBSingleTokenPaymentTerminalStore.sol