Skip to content
Request an audit

‹ All findings

Unnecessary extra condition in if statement

Low/InfoFuji Finance·Three Sigma · Lending aggregator · 6th May, 20233S-FUJI-N16

Description

On the BorrowingVault.sol contract in the function _withdraw(...) the if statement checks the following conditions: if (totalDebt_ == 0 && supply > 0 && supply > totalDebt_) If the first two conditions are true the third will always be true, therefore there is no need to check it.

Recommendation

Remove the third check in the if statement.

Status

Addressed here: Fujicracy/fuji-v2#625