Tally contest - elprofesor's results

The community owned and operated Web3 wallet.

General Information

Platform: Code4rena

Start Date: 20/10/2021

Pot Size: $30,000 ETH

Total HM: 5

Participants: 15

Period: 3 days

Judge: 0xean

Total Solo HM: 3

Id: 44

League: ETH

Tally

Findings Distribution

Researcher Performance

Rank: 8/15

Findings: 2

Award: $461.32

🌟 Selected for report: 1

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: elprofesor

Also found by: JMukesh, Koustre, WatchPug, cmichel, pauliax

Labels

bug
2 (Med Risk)
sponsor acknowledged

Awards

240.9613 USDC - $240.96

External Links

Handle

elprofesor

Vulnerability details

Impact

The use of .transfer() in Swap.sol may have unintended outcomes on the eth being sent to the receiver. Eth may be irretrievable or undelivered if the msg.sender or feeRecipient is a smart contract. Funds can potentially be lost if;

  1. The smart contract fails to implement the payable fallback function
  2. The fallback function uses more than 2300 gas units

The latter situation may occur in the instance of gas cost changes. The impact would mean that any contracts receiving funds would potentially be unable to retrieve funds from the swap.

Proof of Concept

This issue directly impacts the following lines of code: L257, L173, L158

Examples of similar issues ranked as medium can be found here and here, just search for 'M04'. A detailed explanation of why relying on payable().transfer() may result in unexpected loss of eth can be found here

Tools Used

Manual review

Re-entrancy has been accounted for in all functions that reference Solidity's transfer() . This has been done by using a re-entrancy guard, therefore, we can rely on msg.sender.call.value(amount)` or using the OpenZeppelin Address.sendValue library

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