Yieldy contest - rfa'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: 10/99

Findings: 1

Award: $1,817.55

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: 0x1f8b

Also found by: BowTiedWardens, Lambda, StErMi, berndartmueller, csanuragjain, neumo, rfa

Labels

bug
duplicate
3 (High Risk)

Awards

1817.5513 USDC - $1,817.55

External Links

Lines of code

https://github.com/code-423n4/2022-06-yieldy/blob/main/src/contracts/BatchRequests.sol#L93

Vulnerability details

Impact

The contracts length will always increase because the removeAddress() function just deleting the value inside the array and never decrease the length by calling pop() method. This can lead to Dos when calling functions that doing loop on contracts storage: https://github.com/code-423n4/2022-06-yieldy/blob/main/src/contracts/BatchRequests.sol#L16 https://github.com/code-423n4/2022-06-yieldy/blob/main/src/contracts/BatchRequests.sol#L36 https://github.com/code-423n4/2022-06-yieldy/blob/main/src/contracts/BatchRequests.sol#L91

Implement the pop() method for dynamic array so we can avoid unnecessary storage reading for zero value in the future

#0 - Picodes

2022-06-27T16:08:59Z

As addAddress is only owner, this is a low issue at best as the array length cannot be arbitrarily increased

#1 - toshiSat

2022-06-27T17:48:11Z

disagree with severity: low severity due to onlyOwner function.

#2 - 0x1f8b

2022-07-03T19:55:15Z

@toshiSat @Picodes It's onlyOwner method but the logic is wrong, so you don't need to attack nothing or have a bad actor here, if the owner try to remove an address, the service will be denied, that's cannot be low...

#3 - Picodes

2022-08-01T16:41:18Z

@0x1f8b indeed, but it seems in the important function of the contract it won't revert due to the test contracts[i] != address(0)

https://github.com/code-423n4/2022-06-yieldy/blob/524f3b83522125fb7d4677fa7a7e5ba5a2c0fe67/src/contracts/BatchRequests.sol#L18

#4 - 0x1f8b

2022-08-05T05:46:59Z

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