code-423n4 / 2022-02-tribe-turbo-findings

1 stars 0 forks source link

Gas Optimizations #43

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

[L-00] slurp SLOAD Gas Optimization

Severity: Gas Optimization Likelihood: High Status: {Not Submitted} Scope: slurp()

There are two sloads of getTotalFeiBoostedForVault[vault] that can be gas golfed using an mload to reduce gas by 100 - 3.

slurp Gas Golf

[L-03] save SLOAD Gas Optimization

Severity: Gas Optimization Likelihood: Medium Status: {Not Submitted} Scope: save()

There are two calls of pool.oracle() that can be gas golfed using an mload to reduce gas by 100 - 3.

TurboSavior save function

transmissions11 commented 2 years ago

good finds, ty

GalloDaSballo commented 2 years ago

L-00 Agree with finding, each time we're reading from memory we're saving 97 gas at the cost of 3 for the initial cache. - 191

L-03 Same idea - 94

285 gas saved