I recommend adding check of 0-address for immutable addresses.
Not doing so might lead to non-functional contract when it is updated to 0-address accidentally.
Several function adds return statement even thought named returns variable are used.
Remove unnecessary named returns variable to improve code readability.
Also keeping the use of named returns or return statement consistent through out the whole project if possible is recommended.
Issue found at
StableSwap.sol (remove returns variable availableTokenAmount)
Questions/Issues in the code should be resolved before the deployment.
Issue found at
./connext/facets/BridgeFacet.sol:492: // TODO: do we want to store a mapping of custodied token balances here?
./connext/facets/BridgeFacet.sol:579: // TODO: do we need to keep this
./connext/facets/BridgeFacet.sol:1027: // TODO: Should we call approve(0) and approve(totalRepayAmount) instead? or with a try catch to not affect gas on all cases?
./connext/libraries/LibConnextStorage.sol:303: // BridgeFacet (cont.) TODO: can we move this
./connext/helpers/Executor.sol:7:// TODO: see note in below file re: npm
[L-01] Immutable addresses should 0-Check
I recommend adding check of 0-address for immutable addresses. Not doing so might lead to non-functional contract when it is updated to 0-address accidentally.
Issue found at
[L-02] abi.encodePacked should not be used with dynamic types
This is because using abi.encodePacked with dynamic types will cause a hash collisions. link: https://docs.soliditylang.org/en/v0.8.13/abi-spec.html#non-standard-packed-mode I recommend using abi.encode instead.
[L-03] safeApprove is Deprecated
safeApprove is deprecated. Please use safeIncreaseAllowance and safeDecreaseAllowance instead. link: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/bfff03c0d2a59bcd8e2ead1da9aed9edf0080d05/contracts/token/ERC20/utils/SafeERC20.sol#L38-L45
[N-01] Event is missing indexed fields
Each event should have 3 indexed fields if there are 3 or more fields.
Issue found at
[N-02] Unnecessary use of named returns
Several function adds return statement even thought named returns variable are used. Remove unnecessary named returns variable to improve code readability. Also keeping the use of named returns or return statement consistent through out the whole project if possible is recommended.
Issue found at StableSwap.sol (remove returns variable availableTokenAmount)
[N-03] nonReentrant modifier should occur before all other modifiers
This is best practice to protect against reentrancy in other modifiers.
[N-04] Should Resolve TODOs before Deployment
Questions/Issues in the code should be resolved before the deployment.
Issue found at