code-423n4 / 2022-05-cudos-findings

1 stars 0 forks source link

Gas Optimizations #157

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

An if could be added before transferring the totalBalance with if(totalBalance!= 0).

V-Staykov commented 2 years ago

This seems totally not worth it, since this function is to be used in very rare cases, i.e. changing the contract, and only by admin, who would not do it if he is not sure there are funds worth withdrawing from the contract. That said, adding a check would only cause more gas consumed.

JeeberC4 commented 2 years ago

Adding to warden's main Gas Optimization #156