/// @param d Decimals of the new market zcToken
function create (
uint8 p,
address u,
uint256 m,
address c,
address sw,
string memory n,
string memory s,
uint8 d
) external authorized(marketPlace) returns (address, address) {
/// @param a Address of a new admin
function setAdmin(address a) external authorized(admin) returns (bool) {
admin = a;
return true;
}
Lock pragmas to specific compiler version
Contracts should be deployed with the same compiler version and flags that they have been tested the most with. Locking the pragma helps ensure that contracts do not accidentally get deployed using, for example, the latest compiler which may have higher risks of undiscovered bugs. Contracts may also be deployed by others and the pragma indicates the compiler version intended by the original authors.
// TODO as stated elsewhere, we may choose to simply return true in all and not attempt to measure against any expected return
if (p == uint8(Protocols.Compound)) { // TODO is Rari a drop in here?
QA
Natspec is incomplete
File: Creator.sol line 39
Missing @return
File: Creator.sol line 46-50
Missing @return
Lock pragmas to specific compiler version
Contracts should be deployed with the same compiler version and flags that they have been tested the most with. Locking the pragma helps ensure that contracts do not accidentally get deployed using, for example, the latest compiler which may have higher risks of undiscovered bugs. Contracts may also be deployed by others and the pragma indicates the compiler version intended by the original authors.
File: ZcToken.sol line 2
Unused named return
Using both named returns and a return statement isn’t necessary in a function.To improve code quality, consider using only one of those.
File: MarketPlace.sol line 148-168
File: ZcToken.sol line 43-48
File: ZcToken.sol line 52-57
File: ZcToken.sol line 61-66
File: ZcToken.sol line 70-75 File: ZcToken.sol line 79-84 File: ZcToken.sol line 88-93
Open TODOs
File: Swivel.sol line 33
File: Swivel.sol line 120
File: Swivel.sol line 157
File: Swivel.sol line 192
File: Swivel.sol line 221
File: Swivel.sol line 707-708
File: Swivel.sol line 286 File: Swivel.sol line 317 File: Swivel.sol line 347 File: Swivel.sol line 716 File: Swivel.sol line 721 File: Swivel.sol line 748
Missing checks for address(0x0) when assigning values to address state variables
File: VaultTracker.sol line 35