SwapUtils.sol#getD()
Remove unnecessary variable and internal call can make the code simpler and save some gas
#238
Labels
bug
Something isn't working
G (Gas Optimization)
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
WatchPug
Vulnerability details
https://github.com/code-423n4/2021-11-bootfinance/blob/f102ee73eb320532c5a7c1e833f225c479577e39/customswap/contracts/SwapUtils.sol#L620-L623
a
is unnecessary as it's being used only once. The result of_xp(self)
can be cached to avoid calling it twice.Recommendation
Change to:
The text was updated successfully, but these errors were encountered: