sherlock-audit / 2023-07-blueberry-judging

2 stars 1 forks source link

JP_Courses - IchiSpell#_deposit: `ichiVaultShare` local variable isn't actually used anywhere other than being assigned the result of the vault.deposit. #130

Closed sherlock-admin2 closed 1 year ago

sherlock-admin2 commented 1 year ago

JP_Courses

false

IchiSpell#_deposit: ichiVaultShare local variable isn't actually used anywhere other than being assigned the result of the vault.deposit.

Summary

I know only H/M findings, but this should probably be reported and looked at, and I obviously dont expect any rewards for this.

Vulnerability Detail

N/A

Impact

QA/GAS only.

Code Snippet

L118-L123

    uint ichiVaultShare;
    if (isTokenA) {
        ichiVaultShare = vault.deposit(borrowBalance, 0, address(this));
    } else {
        ichiVaultShare = vault.deposit(0, borrowBalance, address(this));
    }

Tool used

VSC, Manual Review

Recommendation

Should/can be changed to:

    if (isTokenA) {
        vault.deposit(borrowBalance, 0, address(this));
    } else {
        vault.deposit(0, borrowBalance, address(this));
    }
sherlock-admin2 commented 1 year ago

4 comment(s) were left on this issue during the judging contest.

0xyPhilic commented:

invalid because as mentioned by the auditor this is a QA/GAS issue

darkart commented:

Low/Invalid

0xJohnnyLaw commented:

invalid low informational local variable isn't used

Kral01 commented:

Invalid