Submitted by dontonka
https://github.com/code-423n4/2023-11-zetachain/blob/main/repos/protocol-contracts/contracts/zevm/ZRC20.sol#L241-L244 
https://github.com/code-423n4/2023-11-zetachain/blob/main/repos/protocol-contracts/contracts/zevm/ZRC20.sol#L257 
https://github.com/code-423n4/2023-11-zetachain/blob/main/repos/node/x/fungible/keeper/msg_server_update_system_contract.go#L38-L58
Zeta protocol allow to update SystemContract.sol using UpdateSystemContract function which require Admin Group 2 access (so the highest access).
There is a problem in this function which I consider Medium severity as it doesnt update one key state variable gasPriceByChainId during the upgrade.
As shown in the code snippet below, it does update the two other state variable gasCoinZRC20ByChainId and gasZetaPoolByChainId by calling respectively setGasCoinZRC20 and setGasZetaPool, but missing the call to setGasPrice.
UpdateSystemContract doesnt update gasPriceByChainId state variable on the new system contract instance which will have a temporary and unexpected negative impact after a system contract update as withdraw on all ZRC20 token will revert, so halted, until the situation is mitigated by Observers calling GasPriceVoter on all the supported chains.
I added the following unit test inside TestKeeper_UpdateSystemContract, which confirm that gasPriceByChainId is not being copied on the new system contract, as the last line of the test fail because require.Equal(t, big.NewInt(41), queryGasPrice(chainID1, contract)) since the amount returned is 0, instead of 41.
Now that this is confirmed, if we examine ZRC20::withdraw it will first call withdrawGasFee which will then call ISystem(SYSTEM_CONTRACT_ADDRESS).gasPriceByChainId(CHAIN_ID) which will return 0 as proven already by the unit test. As we can see after the condition will make this transaction revert as gasPrice == 0.
I would recommend to fix the problem in UpdateSystemContract to include gasPriceByChainId as follow. These changes will make the unit test pass.
lumtis (ZetaChain) confirmed
