Open code423n4 opened 2 years ago
address(0)
1. File: Redeemer.sol#L54-55
pendleAddr = p; tempusAddr = t;
2. File: MarketPlace.sol#L55-56
redeemer = r; lender = l;
3. File: Lender.sol#L68-69
1. File: Redeemer.sol#L62-65
function setAdmin(address a) external authorized(admin) returns (bool) { admin = a; return true; }
2. File: Lender.sol#L129-132
3. File: MarketPlace.sol#L109-112
1. File: MarketPlace.sol
2. File: MarketPlace.sol
@notice
swivelAddr
feenominator
1. File: Lender.sol#L153-159
/// @notice sets the feenominator to the given value /// @param s the address of the Swivel.sol Router /// @return bool true if successful function setSwivel(address s) external authorized(admin) returns (bool) { swivelAddr = s; return true; }
LOW
Missing
address(0)
check when setting immutable address variables.The gas cost for this check is very minimal compared to the gas cost of redeployment if an
address(0)
is accidentally passed in.1. File: Redeemer.sol#L54-55
2. File: MarketPlace.sol#L55-56
3. File: Lender.sol#L68-69
QA
Critical changes should use two-step procedure
1. File: Redeemer.sol#L62-65
2. File: Lender.sol#L129-132
3. File: MarketPlace.sol#L109-112
Variable names should be meaningful and give an idea of its purpose.
This is an issue persistent throughout almost the entire codebase.
Using a single letter as a variable name makes reading and understanding much more difficult.
Multiple files should not have the same name
1. File: MarketPlace.sol
2. File: MarketPlace.sol
Incorect
@notice
Natspec commentThis function sets
swivelAddr
notfeenominator
1. File: Lender.sol#L153-159