code-423n4 / 2022-07-swivel-findings

0 stars 1 forks source link

QA Report #47

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

QA Report

[1] Multiple address mappings can be combined into a single mapping of an address to a struct, where appropriate

Swivel.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

robrobbins commented 2 years ago

license and compiler issues addressed via other tickets