code-423n4 / 2021-09-yaxis-findings

0 stars 0 forks source link

Vault: Redundant notHalted modifier in depositMultiple() #70

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

hickuphh3

Vulnerability details

Impact

The notHalted modifier in depositMultiple() is redundant because it is checked (multiple times) by the underlying function call to deposit().

Further optimizations may be done to implement an internal _deposit() function that will be called by both deposit() and depositMultiple() so that notHalted is only checked once.

Recommended Mitigation Steps

Remove the notHalted modifier in depositMultiple().

GalloDaSballo commented 3 years ago

Sponsor mitigated