code-423n4 / 2021-12-yetifinance-findings

0 stars 0 forks source link

_isBeforeFeeBootstrapPeriod inside the loop #296

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

pauliax

Vulnerability details

Impact

_isBeforeFeeBootstrapPeriod() is re-evaluated again and again inside the loop, although its value could be cached outside the loop and re-used to reduce gas costs.

kingyetifinance commented 2 years ago

@LilYeti : In _getTotalVariableDepositFee bops