Illuminate contest - Nyamcil's results

Your Sole Source For Fixed-Yields.

General Information

Platform: Code4rena

Start Date: 21/06/2022

Pot Size: $55,000 USDC

Total HM: 29

Participants: 88

Period: 5 days

Judge: gzeon

Total Solo HM: 7

Id: 134

League: ETH

Illuminate

Findings Distribution

Researcher Performance

Rank: 87/88

Findings: 1

Award: $62.46

🌟 Selected for report: 0

🚀 Solo Findings: 0

Variables that use default Values shouldn't be defined

If a variable is not set/initialized, it is assumed to have the default value (0, false, 0x0 etc. depending on the data type). Explicitly initializing it wastes gas.

I would recommend leaving the initialized variables with the default values on the following lines:

Lender.sol:265:    for (uint256 i = 0; i < o.length; ) {

Prefix Increments cost less gas than postfix increments

++i costs less gas compared to i++ or i += 1 for unsigned integers, as pre-increment is cheaper (about 5 gas per iteration). This statement is true even with the optimizer enabled.

I would recommend changing the increment from postfix to prefix in the following lines:

Lender.sol:96:     i++;
Lender.sol:120:    i++;
Lender.sol:289:    i++;

Public functions not called by the contract should be external

External functions are cheaper than public functions

I would recommend chanding the following to external functions

Lender.sol#167-183
Lender.sol#192-235
Lender.sol#247-305
Lender.sol#317-367
Lender.sol#377-420
Lender.sol#433-473
Lender.sol#486-534
Lender.sol#545-589
Lender.sol#597-632
Redeemer.sol#107-151
Redeemer.sol#158-198
Redeemer.sol#206-231
Redeemer.sol#240-266
Redeemer.sol#275-296
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