code-423n4 / 2021-10-union-findings

0 stars 0 forks source link

Gas: `AssetManager.deposit` cam be simplified #70

Closed code423n4 closed 3 years ago

code423n4 commented 3 years ago

Handle

cmichel

Vulnerability details

The if (ceiling <= supply) continue; can be removed as the statement that follows already covers this case and more: if (supply + amount > ceiling) continue;. If ceiling <= supply then ceiling < supply + amount (as amount > 0).

GalloDaSballo commented 3 years ago

Duplicate of #29