Open code423n4 opened 2 years ago
2 invalid, we need to be able to set 0 address for some of these 4 sort of invalid, sort of just 'acknowledged' here; time delay feature should come from dao implementation (governor = owner) in the future 6 open TODOs here aren't hinting at errors, but a good note - resolved these 8 same as 4 9 invalid -approval needs to be reset to 0 and then increased, so we are stuck using this method
Event is missing indexed fields
description
Each event should use three indexed fields if there are three or more fields
findings
missing checks for zero address
description
Checking addresses against zero-address during initialization or during setting is a security best-practice. However, such checks are missing in address variable initializations/changes in many places.
Impact: Allowing zero-addresses will lead to contract reverts and force redeployments if there are no setters for such address variables.
findings
missing/incomplete NATSPEC
description
lack of time delay period for removing assets
description
the owner can call
AssetFacet.removeAssetId
to remove any approved assets and poolsrecommend adding a time delay to this so that users will not lose funds due to assets being removed
findings
The nonReentrant modifier should occur before all other modifiers
description
This is a best-practice to protect against reentrancy in other modifiers
findings
open TODOs
description
Open TODOs can hint at programming or architectural errors that still need to be fixed.
Recommend resolving the TODO and bubble up the error.
findings
No Transfer Ownership Pattern
description
Recommend considering implementing a two step process where the owner nominates an account and the nominated account needs to call an acceptOwnership() function for the transfer of ownership to fully succeed. This ensures the nominated EOA account is a valid and active account.
findings
admin can increase fee with no time delay
description
in
StableSwap.sol
the admin can increase fees by callingsetAdminFee
andsetSwapFee
with no time delaya malicious admin can front run transactions to jack up the fee
recommend adding a time delay for any fee changes
safeApprove() is deprecated
description
Deprecated in favor of safeIncreaseAllowance() and safeDecreaseAllowance()
findings