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

1 stars 0 forks source link

Gas Optimizations #68

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

https://github.com/code-423n4/2022-02-tribe-turbo/blob/66f27fe51083f49f7935e3fe594ab2380b75dee8/src/TurboSafe.sol#L310

https://github.com/code-423n4/2022-02-tribe-turbo/blob/66f27fe51083f49f7935e3fe594ab2380b75dee8/src/TurboSafe.sol#L335

In this 2 cases, the nonReentrant modifier is useless as it the function does not change the state of the contract, so could be removed.

GalloDaSballo commented 2 years ago

Because the token input could be untrusted, am not comfortable with this recommendation.

Will give it a 25 gas value

25