Platform: Code4rena
Start Date: 29/07/2022
Pot Size: $50,000 USDC
Total HM: 6
Participants: 75
Period: 5 days
Judge: GalloDaSballo
Total Solo HM: 3
Id: 149
League: ETH
Rank: 17/75
Findings: 2
Award: $120.01
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: oyc_109
Also found by: 0x1f8b, 0x52, 0xNazgul, 0xSmartContract, 0xf15ers, 8olidity, Aymen0909, Bnke0x0, CertoraInc, Chom, CodingNameKiki, Deivitto, Dravee, ElKu, IllIllI, JC, Lambda, Noah3o6, NoamYakov, RedOneN, Respx, ReyAdmirado, Rohan16, Rolezn, Ruhum, Sm4rty, TomJ, Twpony, Waze, Yiko, __141345__, ajtra, apostle0x01, ashiq0x01, asutorufos, bardamu, benbaessler, berndartmueller, bharg4v, bulej93, c3phas, cccz, ch13fd357r0y3r, codexploder, cryptonue, cryptphi, defsec, djxploit, durianSausage, fatherOfBlocks, gogo, hansfriese, horsefacts, ignacio, kyteg, lucacez, mics, rbserver, robee, sashik_eth, simon135, sseefried, tofunmi, xiaoming90
60.7712 USDC - $60.77
AxelarGasServiceProxy
DepositBase
#0 - re1ro
2022-08-05T02:10:29Z
Good spot. Was left over after some refactoring
#1 - re1ro
2022-08-23T02:11:51Z
#2 - GalloDaSballo
2022-08-31T23:30:44Z
1 Valid Refactoring
🌟 Selected for report: IllIllI
Also found by: 0x1f8b, 0xNazgul, 0xsam, 8olidity, Aymen0909, Bnke0x0, Chom, CodingNameKiki, Deivitto, Dravee, ElKu, Fitraldys, JC, Lambda, MiloTruck, Noah3o6, NoamYakov, RedOneN, Respx, ReyAdmirado, Rohan16, Rolezn, Ruhum, Sm4rty, TomJ, Tomio, Waze, __141345__, a12jmx, ajtra, ak1, apostle0x01, asutorufos, benbaessler, bharg4v, bulej93, c3phas, defsec, djxploit, durianSausage, erictee, fatherOfBlocks, gerdusx, gogo, kyteg, lucacez, medikko, mics, owenthurm, oyc_109, rbserver, robee, sashik_eth, simon135, tofunmi
59.2384 USDC - $59.24
AxelarGateway
L56 - The modifier generates gas expenses that can be reduced using a private view function.
L205/207 - When we are traversing an array within a for, we can save gas by creating a length variable instead of having the length in each iteration.
L209/213 - When a variable is only used once, it doesn't make sense to create a variable since it will only be used once.
L255/613 - Instead of "variable > 0" it is possible to validate "variable != 0" and less gas cost would be generated.
L209 and 213/245 and 253/490 and 493 - When you create a variable and use it much lower down, being that in the middle between the two codes there is code that can reverse, you could save gas by creating the variable just before that It is used.
AxelarGasService
L123 - When we are traversing an array within a for, we can save gas by creating a length variable instead of having the length in each iteration.
L128/131 - Instead of "variable > 0" it is possible to validate "variable != 0" and less gas cost would be generated.
AxelarDepositService
L114/168/204 - When we are looping through an array inside a for, we can save gas by creating a length variable instead of having the length in each iteration.
L118/121/208/210 - When a variable is used more than once, in the case of refundTokens[i] a variable could be created in memory, thus reducing the gas cost.
L165 - Instead of "variable > 0" it is possible to validate "variable != 0" and less gas cost would be generated.
L24 and 29 - When a variable is created and used much further down, being that in the middle between the two codes there is code that can reverse, gas could be saved by creating the variable just before it is used.
DepositBase
ReceiverImplementation
L23/51/71 - Instead of "variable > 0" it is possible to validate "variable != 0" and less gas cost would be generated.
L25 and 33/57 and 63/73 and 80 - When a variable is created and used much further down, being that in the middle between the two codes there is code that can reverse, gas could be saved by creating the variable just before that It is used.
AxelarAuthWeighted
L17/98/116 - When we are looping through an array inside a for, we can save gas by creating a length variable instead of having the length in each iteration.
L68/69/94/95/98 - It is not necessary to create a variable and set it to its default value, this generates an extra gas cost.
L76 - Instead of "variable > 0" it is possible to validate "variable != 0" and less gas cost would be generated.
L78/116/117 - Instead of doing "variable + 1", "variable - 1" or "variable++" you can save gas by doing "++variable" or "--variable".
#0 - re1ro
2022-08-05T02:09:40Z
Good spot. A lot of this are duplicates of #2 and #3
#1 - GalloDaSballo
2022-08-25T01:32:51Z
Less than 500 gas
Would recommend grouping by Issue, not by File to make the report less repetitive