Submitted by unforgiven, also found by 8olidity
https://github.com/code-423n4/2022-11-redactedcartel/blob/03b71a8d395c02324cb9fdaf92401357da5b19d1/src/PirexGmx.sol#L733-L816
https://github.com/code-423n4/2022-11-redactedcartel/blob/03b71a8d395c02324cb9fdaf92401357da5b19d1/src/PirexGmx.sol#L228-L267
https://github.com/code-423n4/2022-11-redactedcartel/blob/03b71a8d395c02324cb9fdaf92401357da5b19d1/src/PirexRewards.sol#L332-L348
Function claimRewards() in PirexGmx claims WETH and esGMX rewards and multiplier points (MP) from GMX protocol. it uses _calculateRewards() to calculate the unclaimed reward token amounts produced for each token type. But because of the lack of checks, function _calculateRewards() would revert when RewardTracker.distributor.totalSupply() is zero so if any of the 4 RewardTrackers has zero totalSupply() then function claimRewards() would revert too and function harvest() in PirexRewards contract would revert too because it calls PirexGmx.claimRewards(). 
harvest() is used in claim() function so claim() would not work too. This bug would harvest rewards for PirexRewards contract and claim rewards for users from PirexRewards when supply of one of RewardTrackers contracts in GMX protocol is zero.
Function claimRewards() is written based on GMX code, but the logic is not correctly copied because  GMX protocol contract checks for totalSupply() and it prevents this bug from happening.
This is function _calculateRewards()s code in PirexGmx:
As you can see in the line uint256 cumulativeRewardPerToken = r.cumulativeRewardPerToken() + ((blockReward * precision) / r.totalSupply()) if totalSupply() was zero then code would revert because of division by zero error. So if RewardTracker.distributor.totalSupply() was zero then function _calculateRewards would revert and wont work and other function using _calculateRewards() would be break too.
This is part of function claimRewards()s code in PirexGmx contract:
As you can see it calls _calculateRewards() to calculate  the unclaimed reward token amounts  produced for each token type in GMX protocol. so function claimRewards() would revert too when totalSupply() of one of these 4 RewardTrackers distributers was zero.
This is part of functions harvest() and claim() code in PirexReward contract:
As you can see harvest() calls claimRewards() and claim() calls harvest() so these two functions would revert and wont work when totalSupply() of one of these 4 RewardTrackers distributers in GMX protocol was zero. In that situation the protocol cant harvest and claim rewards from GMX because of this bug and users wont be able to claim their rewards from the protocol. The condition for this bug could happen from time to time as GMX decided to prevent it by checking the value of totalSupply().
 This is function _updateRewards() code in RewardTracker in GMX protocol (https://github.com/gmx-io/gmx-contracts/blob/65e62b62aadea5baca48b8157acb9351249dbaf1/contracts/staking/RewardTracker.sol#L272-L286):
As you can see it checks that supply > 0 before using it as denominator in division. So GMX protocol handles the case when totalSupply() is zero and contract logics wont break when this case happens but function _calculateRewards(), which tries to calculate GMX protocol rewards beforehand, dont handle this case(the case where totalSupply() is zero) so the logics would break when this case happens and it would cause function harvest() and claim() to be unfunctional.
VIM
Check that totalSupply() is not zero before using it.
drahrealm (Redacted Cartel) confirmed 
