code-423n4 / 2022-06-infinity-findings

4 stars 0 forks source link

QA Report #216

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago
  1. Missing zero address check The following are missing zero address checks. Mistakenly inputing a zero address could lead to tokens being sent to zero address leading to loss of funds/tokens. Or it could require redeployment of a contract.

**Occurrences in: a. InfinityExchange.rescueTokens() - destination parameter - https://github.com/code-423n4/2022-06-infinity/blob/main/contracts/core/InfinityExchange.sol#L1220 b. InfinityExchange.rescueETH() - destination parameter -  https://github.com/code-423n4/2022-06-infinity/blob/main/contracts/core/InfinityExchange.sol#L1229 c. InfinityExchange.transferMultipleNFTs() - to address parameter  - https://github.com/code-423n4/2022-06-infinity/blob/main/contracts/core/InfinityExchange.sol#L371 d. InfinityExchange.constructor() - _weth and _matchExecutor parameters - https://github.com/code-423n4/2022-06-infinity/blob/main/contracts/core/InfinityExchange.sol#L115-L116 e. InfinityStaker.constructor() - _infinityTreasury parameter - https://github.com/code-423n4/2022-06-infinity/blob/main/contracts/staking/InfinityStaker.sol#L49-L52 f. InfinityStaker.rescueETH() - destination parameter -  https://github.com/code-423n4/2022-06-infinity/blob/main/contracts/staking/InfinityStaker.sol#L345 g. InfinityStaker.updateInfinityTreasury()  - _infinityTreasury parameter - https://github.com/code-423n4/2022-06-infinity/blob/main/contracts/staking/InfinityStaker.sol#L375

  1. Missing zero value check The following are missing zero value checks which may lead to possible function reverts or wrong calculations or wrong token supply or possible contract redeployment

**Occurrences in: a. InfinityStaker.updatePenalties()  - https://github.com/code-423n4/2022-06-infinity/blob/main/contracts/staking/InfinityStaker.sol#L364 b. InfinityStaker.updateStakeLevelThreshold() - https://github.com/code-423n4/2022-06-infinity/blob/main/contracts/staking/InfinityStaker.sol#L351 c. InfinityToken.constructor() - https://github.com/code-423n4/2022-06-infinity/blob/main/contracts/token/InfinityToken.sol#L37-L49

  1. Missing events and emit The following are updates to certain functionalities or operations which are missing events and equivalent emits

**Occurrences in: a. InfinityExchange.updateMatchExecutor() - https://github.com/code-423n4/2022-06-infinity/blob/main/contracts/core/InfinityExchange.sol#L1255 b. InfinityExchange.rescueETH() - https://github.com/code-423n4/2022-06-infinity/blob/main/contracts/core/InfinityExchange.sol#L1229 c. InfinityExchange.removeComplication() - https://github.com/code-423n4/2022-06-infinity/blob/main/contracts/core/InfinityExchange.sol#L1250 d. InfinityExchange.addComplication()  - https://github.com/code-423n4/2022-06-infinity/blob/main/contracts/core/InfinityExchange.sol#L1240 e. InfinityStaker.rescueETH() -  https://github.com/code-423n4/2022-06-infinity/blob/main/contracts/staking/InfinityStaker.sol#L345 f. InfinityStaker.updateInfinityTreasury() - https://github.com/code-423n4/2022-06-infinity/blob/main/contracts/staking/InfinityStaker.sol#L375 g. InfinityStaker.updatePenalties()  - https://github.com/code-423n4/2022-06-infinity/blob/main/contracts/staking/InfinityStaker.sol#L364 h. InfinityStaker.updateStakeLevelThreshold() - https://github.com/code-423n4/2022-06-infinity/blob/main/contracts/staking/InfinityStaker.sol#L351

HardlyDifficult commented 2 years ago

Merging with https://github.com/code-423n4/2022-06-infinity-findings/issues/195 and https://github.com/code-423n4/2022-06-infinity-findings/issues/197 and https://github.com/code-423n4/2022-06-infinity-findings/issues/204