Cache factory.ownerSplit() #89
Labels
bug
Warden finding
G (Gas Optimization)
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
pauliax
Vulnerability details
Impact
function handleFees calls factory.ownerSplit() twice. To save some gas and reduce the number of external calls, you should save the value after the first call and re-use it later.
Recommended Mitigation Steps
Cache factory.ownerSplit() in a local variable and re-use it.
The text was updated successfully, but these errors were encountered: