Platform: Code4rena
Start Date: 12/08/2022
Pot Size: $50,000 USDC
Total HM: 15
Participants: 120
Period: 5 days
Judge: Justin Goro
Total Solo HM: 6
Id: 153
League: ETH
Rank: 50/120
Findings: 2
Award: $67.11
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: 0x1f8b
Also found by: 0x52, 0xA5DF, 0xDjango, 0xNazgul, 0xNineDec, 0xSmartContract, 0xmatt, 0xsolstars, Aymen0909, Bnke0x0, CertoraInc, Chom, CodingNameKiki, Deivitto, Dravee, ElKu, EthLedger, Funen, IllIllI, JC, Junnon, Lambda, LeoS, MiloTruck, Noah3o6, PaludoX0, ReyAdmirado, Rohan16, RoiEvenHaim, Rolezn, SaharAP, Sm4rty, SooYa, The_GUILD, TomJ, Waze, Yiko, _Adam, __141345__, a12jmx, ak1, asutorufos, auditor0517, ayeslick, ballx, beelzebufo, berndartmueller, bin2chen, brgltd, c3phas, cRat1st0s, cccz, cryptonue, cryptphi, d3e4, delfin454000, dipp, djxploit, durianSausage, dy, erictee, fatherOfBlocks, gogo, gzeon, hyh, ignacio, kyteg, ladboy233, medikko, mics, minhquanym, oyc_109, pfapostol, rbserver, reassor, ret2basic, robee, sach1r0, simon135, sryysryy, tabish, yac, yash90, zzzitron
45.9364 USDC - $45.94
FraxlendPairCore
L480 - When defining the value of _feesShare, it is divided by (_totalAsset.amount - _feesAmount), but it is not validated that this is != 0, if it were equal to zero, it would revert without knowing the reason why, therefore It should validate before and show the corresponding message.
L539 - When defining the value of _exchangeRate, it is divided by oracleNormalization, but it is not validated that this is != 0, if it were equal to zero, it would revert without knowing the reason why, therefore it should be validated before and show the corresponding message.
FraxlendPair
FraxlendPairConstants
VaultAccountingLibrary
🌟 Selected for report: IllIllI
Also found by: 0x1f8b, 0xA5DF, 0xDjango, 0xNazgul, 0xSmartContract, 0xackermann, 0xbepresent, 0xc0ffEE, 0xkatana, 2997ms, Amithuddar, Aymen0909, Bnke0x0, Chinmay, Chom, CodingNameKiki, Deivitto, Diraco, Dravee, ElKu, EthLedger, Fitraldys, Funen, IgnacioB, JC, Junnon, Lambda, LeoS, Metatron, MiloTruck, Noah3o6, NoamYakov, PaludoX0, Randyyy, ReyAdmirado, Rohan16, Rolezn, Ruhum, SaharAP, Sm4rty, SooYa, TomJ, Tomio, Waze, Yiko, _Adam, __141345__, a12jmx, ajtra, ak1, asutorufos, ballx, brgltd, c3phas, cRat1st0s, carlitox477, chrisdior4, d3e4, delfin454000, dharma09, djxploit, durianSausage, erictee, fatherOfBlocks, find_a_bug, flyx, francoHacker, gerdusx, gogo, gzeon, hakerbaya, ignacio, jag, kyteg, ladboy233, ltyu, m_Rassska, medikko, mics, mrpathfindr, newfork01, nxrblsrpr, oyc_109, pfapostol, rbserver, reassor, ret2basic, robee, sach1r0, saian, simon135, sryysryy, zeesaw
21.1714 USDC - $21.17
FraxlendPairCore
L265/270 - It is not necessary to create a variable and set it to its default value, this generates an extra gas expense without providing greater understanding.
L265/270 - Within a for loop, gas could be saved if instead of consulting the size of the array "array.length" in each iteration, a variable in memory of the length of the array is created.
L330/342/351/359 - The modifier can generate much less gas cost if you use private view functions.
L477/754/835/1002/1094 - It is less expensive to validate that: "variable != 0" than to validate: "variable > 0".
L1089/1090/1175/1176 - Instead of variable - 1 or variable--, much more gas is saved by doing: --variable.
L1195/1199 - When a variable is used only once, it is not necessary to create a variable in memory, it can be used directly where it is to be used.
FraxlendPairDeployer
L126/127/150/152/402 - It is not necessary to create a variable and set it to its default value, this generates an extra gas expense without providing greater understanding.
L130/158/408 - Instead of variable + 1 or variable ++, much more gas is saved by doing: ++variable.
L205/228/253/365/368 - When a message has a size greater than 32 bytes, it generates a higher expense if it has 32 characters or less.
L379/380 - It is less expensive to validate that: "variable != 0" than to validate: "variable > 0".
FraxlendPair
L289/308 - It is not necessary to create a variable and set it to its default value, this generates an extra gas expense without providing greater understanding.
L289/308 - Instead of variable + 1 or variable ++, much more gas is saved by doing: ++variable.
L289/308 - Within a for loop, gas could be saved if instead of consulting the size of the array "array.length" in each iteration, a variable in memory of the length of the array is created.
FraxlendPairConstants
FraxlendWhitelist
L51/66/81 - It is not necessary to create a variable and set it to its default value, this generates an extra gas expense without providing greater understanding.
L51/66/81 - Instead of variable + 1 or variable ++, much more gas is saved by doing: ++variable.
L51/66/81 - Within a for loop, gas could be saved if, instead of consulting the size of the array "array.length" in each iteration, a variable in memory of the length of the array is created.
VaultAccountingLibrary
LinearInterestRate
L33 - It is not necessary to create a variable and set it to its default value, this generates an extra gas expense without providing greater understanding.
L59/63/67 - When a message has a size greater than 32 bytes, it generates a higher expense if it has 32 characters or less.
L57/61/65 - The require and the modifier can generate much less gas cost if you use if and custom errors and also private view functions.
L66 - It is less expensive to validate that: "variable != 0" than to validate: "variable > 0".
L83/84/85/86/87/88/89/90 - The mathematical operations found in these lines have no way of generating overflows or underflows, therefore it could be defined as unchecked.
SafeERC20
L22 - It is not necessary to create a variable and set it to its default value, this generates an extra gas expense without providing greater understanding.
L24/27 - Instead of variable + 1 or variable ++, much more gas is saved by doing: ++variable.
#0 - gititGoro
2022-10-09T14:29:59Z
Please group by issue type, not file analyzed.