Open code423n4 opened 2 years ago
[1] Multiple address mappings can be combined into a single mapping of an address to a struct, where appropriate
address
struct
Swivel.sol#L21 Swivel.sol#L23
[2] Add zero-address checks in constructors and setter functions
Consider adding something like require(newAddr != address(0));.
require(newAddr != address(0));
Swivel.sol#L68 Swivel.sol#L428
[3] Avoid using ecrecover
ecrecover
Best practice is using OpenZeppelin's ECDSA.recover instead as it solves some minor problem that exist within ecrecover.
ECDSA.recover
Sig.sol#L30 Sig.sol#L41
[4] Natspec is incomplete
Add @notice
Sig.sol#L20 Sig.sol#L38 Sig.sol#L48
Add @return
Creator.sol#L30 VaultTracker.sol#L113
[5] Contracts have missing License Identifiers
Add license to SPDX-License-Identifier.
SPDX-License-Identifier
[6] Use a more recent version of Solidity
Use a Solidity version of at least 0.8.13 to get the ability to use using for with a list of free functions.
using for
LibCompound.sol#L2
license and compiler issues addressed via other tickets
QA Report
[1] Multiple
address
mappings can be combined into a single mapping of anaddress
to astruct
, where appropriateSwivel.sol#L21 Swivel.sol#L23
[2] Add zero-address checks in constructors and setter functions
Consider adding something like
require(newAddr != address(0));
.Swivel.sol#L68 Swivel.sol#L428
[3] Avoid using
ecrecover
Best practice is using OpenZeppelin's
ECDSA.recover
instead as it solves some minor problem that exist within ecrecover.Sig.sol#L30 Sig.sol#L41
[4] Natspec is incomplete
Add @notice
Sig.sol#L20 Sig.sol#L38 Sig.sol#L48
Add @return
Creator.sol#L30 VaultTracker.sol#L113
[5] Contracts have missing License Identifiers
Add license to
SPDX-License-Identifier
.[6] Use a more recent version of Solidity
Use a Solidity version of at least 0.8.13 to get the ability to use
using for
with a list of free functions.LibCompound.sol#L2