Backd Tokenomics contest - JC's results

Maximize the power of your assets and start earning yield

General Information

Platform: Code4rena

Start Date: 27/05/2022

Pot Size: $75,000 USDC

Total HM: 20

Participants: 58

Period: 7 days

Judge: GalloDaSballo

Total Solo HM: 15

Id: 131

League: ETH

Backd

Findings Distribution

Researcher Performance

Rank: 17/58

Findings: 1

Award: $737.78

🌟 Selected for report: 0

πŸš€ Solo Findings: 0

Findings Information

🌟 Selected for report: peritoflores

Also found by: JC, StyxRave

Labels

bug
duplicate
2 (Med Risk)

Awards

737.784 USDC - $737.78

External Links

Lines of code

https://github.com/code-423n4/2022-05-backd/blob/2a5664d35cde5b036074edef3c1369b984d10010/protocol/contracts/swappers/SwapperRouter.sol#L280

Vulnerability details

This is a classic Code4rena issue:

https://github.com/code-423n4/2021-04-meebits-findings/issues/2 https://github.com/code-423n4/2021-10-tally-findings/issues/20 https://github.com/code-423n4/2022-01-openleverage-findings/issues/75

Impact

The use of the deprecated transfer() function for an address will inevitably make the transaction fail when:

The claimer smart contract does not implement a payable function. The claimer smart contract does implement a payable fallback which uses more than 2300 gas unit. The claimer smart contract implements a payable fallback function that needs less than 2300 gas units but is called through proxy, raising the call’s gas usage above 2300. Additionally, using higher than 2300 gas might be mandatory for some multisig wallets.

Proof of Concept

https://github.com/code-423n4/2022-01-openleverage-findings/issues/75

Tools Used

/swappers/SwapperRouter.sol 140: payable(msg.sender).transfer(amountIn_); 280: payable(msg.sender).transfer(amount_);

I recommend using call() instead of transfer().

ps: this file is probably out of scope but I prefer to mention this issue nonetheless.

#0 - chase-manning

2022-06-06T10:46:52Z

Duplicate of #180

#1 - GalloDaSballo

2022-06-19T21:05:15Z

Dup of #180

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