Open code423n4 opened 2 years ago
Re: Public -> External -- Fixed in lifinance/lifi-contracts@26443af0142afdb131b6b3ab278fac29670b7b0e Duplicate of #197
Re: unchecked -- We internally decided to avoid unchecked statements for now.
Used in FulfillInterpreter.sol
Function is declared as public but is only called externally. This occurs in a couple of instances:
NXTPFacet
:startBridgeTokensViaNXTP
,swapAndStartBridgeTokensViaNXTP
,completeBridgeTokensViaNXTP
andswapAndCompleteBridgeTokensViaNXTP
WithdrawFacet
:withdraw
GenericSwapFacet
:swapTokensGeneric
AnyswapFacet
:swapAndStartBridgeTokensViaAnyswap
,swapAndStartBridgeTokensViaAnyswap
The
unchecked
block can be used for all the for loops. Consider adding an internal function_increment
with an unchecked block and use it to increment the counter inside the for loop.LibAsset.decreaseERC20Allowance
andLibAsset.increaseERC20Allowance
are declared but never used