Axelar Network v2 contest - codexploder'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: 58/75

Findings: 1

Award: $56.13

🌟 Selected for report: 0

🚀 Solo Findings: 0

Lines of code

https://github.com/code-423n4/2022-07-axelar/blob/main/contracts/deposit-service/ReceiverImplementation.sol#L51

Vulnerability details

Impact

The transfer function is limited to 2300 gas units. If transfer requires more than that then the transaction will fail always. call which does not come with a hardcoded limit can help in this case

Proof of Concept

  1. Observe the receiveAndSendNative function at ReceiverImplementation.sol
if (address(this).balance > 0) refundAddress.transfer(address(this).balance);
  1. As we can see that the ETH balance of the contract is transferred using transfer function. If refundAddress is a contract requiring more than 2300 gas unit then the above transaction will always fail resulting in receiveAndSendNative being blocked

Use call instead of transfer for sending ETH

#0 - GalloDaSballo

2022-08-03T21:36:31Z

See #203

#1 - re1ro

2022-08-05T06:18:54Z

Duplicate of #4

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