code-423n4 / 2022-01-sherlock-findings

0 stars 0 forks source link

Order of operations #277

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

pauliax

Vulnerability details

Impact

    ILendingPool lp = getLp();
    if (balanceOf() == 0) {
      return 0;
    }

Better check the balance and only then get the lending pool. When the balance is 0 it will skip the external call.

jack-the-pug commented 2 years ago

Dup #54