Submitted by ladboy233, also found by rvierdiiev
https://github.com/code-423n4/2024-01-init-capital-invitational/blob/a01c4de620be98f9e57a60cf6a82d4feaec54f58/contracts/wrapper/WLpMoeMasterChef.sol#L145 
https://github.com/code-423n4/2024-01-init-capital-invitational/blob/a01c4de620be98f9e57a60cf6a82d4feaec54f58/contracts/core/InitCore.sol#L284
LP unwrap / wrap is fully broken if master chef contract has insufficient reward token.
We need to take a look at the external master chef contract that is not in the control of the init capital protocol team.
When deposit / withdraw / harvest / claim, this function _modify is called, which is this code
As we can see, when deposit / withdraw / harvest, the pending reward is transferred from master chef contract to msg.sender (which is the lp wrapper contract).
When calling extraRewarder.onModify, the reward is transferred from extra rewarder to wrapper contract.
But someone needs to transfer the moe token into the master chef to ensure there is sufficient reward token balance.
Someone needs to transfer the reward token into extraReward contract to ensure there is sufficient reward token balance.
In case when there are insufficient reward token in master chef contract and extraReward, the code will revert:
Suppose the reward accounting update is that the wlp contract is entitled to get 10000 moe token and 100 usdc token as extra reward, but in master chef there are only 9000 token, attempting to transfer the 10000 more tokens will revert.
The impact is severe because this revert would block lp unwrap and block original lp owner attemps to decollateralize wlp and make liquidation revert as well.
When regular withdraw failed, the code should call emergencyWithdraw.
This function does not claim reward, but at least this function can ensure withdraw wlp when decollateralize lp or liquidation transaction does not revert.
fez-init (INIT) acknowledged
For this audit, 4 reports were submitted by wardens detailing low risk and non-critical issues. The report highlighted below by ladboy233 received the top score from the judge.
The following wardens also submitted reports: 0x73696d616f, sashik_eth, and rvierdiiev.
