Yieldy contest - UnusualTurtle's results

A protocol for gaining single side yields on various tokens.

General Information

Platform: Code4rena

Start Date: 21/06/2022

Pot Size: $50,000 USDC

Total HM: 31

Participants: 99

Period: 5 days

Judges: moose-code, JasoonS, denhampreen

Total Solo HM: 17

Id: 139

League: ETH

Yieldy

Findings Distribution

Researcher Performance

Rank: 70/99

Findings: 2

Award: $79.71

🌟 Selected for report: 0

🚀 Solo Findings: 0

1. approve() is not called using IERC20Upgradeable

The approve() call is not called using IERC20Upgradeable which is using SafeERC20Upgradeable

Examples of this issue in the codebase:

  1. File: contracts\Staking.sol (Line 83)

2. risk of using approve

Be aware that this is susceptible to race-condition as said in the documentation

Example of this issue in the codebase:

  1. File: contracts\Staking.sol (Line 92)

#0 - toshiSat

2022-06-27T17:28:14Z

sponsor acknowledged

1. SPLITTING REQUIRE() STATEMENTS THAT USE && SAVES GAS

Examples of this issue in the codebase:

  1. File: contracts\LiquidityReserve.sol (Line 45)

  2. File: contracts\Staking.sol (Line 575)


2. USE CUSTOM ERRORS RATHER THAN REVERT()/REQUIRE() STRINGS TO SAVE DEPLOYMENT GAS

Examples of this issue in the codebase:

  1. File: contracts\LiquidityReserve.sol (Line 62)

  2. File: contracts\LiquidityReserve.sol (Line 192)


3. USING > 0 COSTS MORE GAS THAN != 0 WHEN USED ON A UINT IN A REQUIRE() STATEMENT

Examples of this issue in the codebase:

  1. File: contracts\Staking.sol (Line 410)

  2. File: contracts\Yieldy.sol (Line 83)


4. MINIMIZE THE NUMBER OF EXPENSIVE SLOAD CALL

Examples of this issue in the codebase:

  1. File: contracts\BatchRequests.sol contracts can be cached (Line 18)

  2. File: contracts\BatchRequests.sol contracts can be cached (Line 37)


#0 - toshiSat

2022-06-27T17:37:39Z

sponsor acknowledged + some duplicates

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