Platform: Code4rena
Start Date: 10/02/2022
Pot Size: $30,000 USDC
Total HM: 5
Participants: 24
Period: 3 days
Judge: harleythedog
Total Solo HM: 3
Id: 86
League: ETH
Rank: 24/24
Findings: 1
Award: $75.57
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: pauliax
Also found by: 0x1f8b, Dravee, GreyArt, Omik, ShippooorDAO, Tomio, bobi, cmichel, csanuragjain, defsec, gzeon, kenta, kenzo, m_smirnova2020, rfa, robee, sirhashalot, ye0lde
75.5694 USDC - $75.57
Use cached variable value
The _submitOutOrders()
function sets batchLength = _batchedOrders.orders.length
, but in the for loop the value "_batchedOrders.orders.length" is used instead of "batchLength". Using the cached variable could save gas.
The for loop on line 369 could use the batchLength variable. This approach is used in the similar for loop on line 327.
Use the cached "batchLength" variable
#0 - harleythedogC4
2022-03-13T04:12:07Z
My personal judgments:
#1 - harleythedogC4
2022-03-13T06:18:24Z
Now, here is the methodology I used for calculating a score for each gas report. I first assigned each submission to be either small-optimization (1 point), medium-optimization (5 points) or large-optimization (10 points), depending on how useful the optimization is. The score of a gas report is the sum of these points, divided by the maximum number of points achieved by a gas report. This maximum number was 10 points, achieved by #67.
The number of points achieved by this report is 1 points. Thus the final score of this gas report is (1/10)*100 = 10.