Axelar Network v2 contest - fatherOfBlocks's results

Decentralized interoperability network.

General Information

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

Axelar Network

Findings Distribution

Researcher Performance

Rank: 17/75

Findings: 2

Award: $120.01

🌟 Selected for report: 0

🚀 Solo Findings: 0

AxelarGasServiceProxy

  • L6 - The IUpgradable interface is imported but is never used.

DepositBase

  • L7 - The IWETH9 interface is imported but is never used.

#0 - re1ro

2022-08-05T02:10:29Z

Good spot. Was left over after some refactoring

#2 - GalloDaSballo

2022-08-31T23:30:44Z

1 Valid Refactoring

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

  • L32/37 - When a variable is used more than once, in the case of symbolBytes.length a variable could be created in memory, in this way the cost of gas is reduced.

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

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter