Open code423n4 opened 2 years ago
Czar102
To save gas it is recommended it call function internally, if possible.
Function BasketFacet::getLock() is defined externally and calls from BasketFacet::joinPool(...) and BasketFacet::exitPool(...) are not internal, but message calls.
BasketFacet::getLock()
BasketFacet::joinPool(...)
BasketFacet::exitPool(...)
The same applies to function BasketFacet::getCap() usage in BasketFacet::joinPool(...).
BasketFacet::getCap()
Consider changing visibility of BasketFacet::getLock() to public and calling the above function internally. Alternative solution shall be implemented with BasketFacet::getCap().
Handle
Czar102
Vulnerability details
Impact
To save gas it is recommended it call function internally, if possible.
Proof of Concept
Function
BasketFacet::getLock()
is defined externally and calls fromBasketFacet::joinPool(...)
andBasketFacet::exitPool(...)
are not internal, but message calls.The same applies to function
BasketFacet::getCap()
usage inBasketFacet::joinPool(...)
.Recommended Mitigation Steps
Consider changing visibility of
BasketFacet::getLock()
to public and calling the above function internally. Alternative solution shall be implemented withBasketFacet::getCap()
.