QA Report #197
Labels
bug
Something isn't working
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Rounding issue in ConvexStakingWrapper
rouding issue ConvexStakingWrapper might lead to revert
https://github.com/code-423n4/2022-02-concur/blob/72b5216bfeaa7c52983060ebfc56e72e0aa8e3b0/contracts/ConvexStakingWrapper.sol#L178
fix by changing to
Lack input validation in constructor of ConvexStakingWrapper
masterChef can be set to address(0) which will require redeployment
https://github.com/code-423n4/2022-02-concur/blob/72b5216bfeaa7c52983060ebfc56e72e0aa8e3b0/contracts/ConvexStakingWrapper.sol#L71
Cast to uint192 is unsafe
Cast to uint192 is unsafe, user trying to deposit more than 2^192 would recevie less deposits balance.
https://github.com/code-423n4/2022-02-concur/blob/72b5216bfeaa7c52983060ebfc56e72e0aa8e3b0/contracts/ConvexStakingWrapper.sol#L235
Lack input validation in constructor of ConcurRewardPool
rewardNotifier can be set to address(0) which will require redeployment
https://github.com/code-423n4/2022-02-concur/blob/72b5216bfeaa7c52983060ebfc56e72e0aa8e3b0/contracts/ConcurRewardPool.sol#L15
USDMPegRecovery withdraw does not check if user have sufficient balance
USDMPegRecovery withdraw does not check if user have sufficient balance. While it would revert later in the procedure due to an overflow when deducting from user.usdm/user.pool3, it is better to have the check at the begining.
https://github.com/code-423n4/2022-02-concur/blob/72b5216bfeaa7c52983060ebfc56e72e0aa8e3b0/contracts/USDMPegRecovery.sol#L110
Use struct reference instead of memory copy
A lot of pattern in the code is like
it might be better to use
gas-wise they should be the same, but using reference make it less likely to forget commit back to storage.
Typo
RADSs should be CONCURs
https://github.com/code-423n4/2022-02-concur/blob/72b5216bfeaa7c52983060ebfc56e72e0aa8e3b0/contracts/MasterChef.sol#L25
No need to use SafeMath in Solidity >=0.8.0
Math is safe by default in Solidity >=0.8.0
https://github.com/code-423n4/2022-02-concur/blob/72b5216bfeaa7c52983060ebfc56e72e0aa8e3b0/contracts/MasterChef.sol#L14
Also need to replace SafeMath function to normal arithmetic in the MasterChef contract.
The text was updated successfully, but these errors were encountered: