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

0 stars 0 forks source link

debt = balance #276

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

pauliax

Vulnerability details

Impact

The condition could be inclusive >= to avoid the useless computation:

  if (debt > balance) return 0;
  return balance - debt;