Protocol fee from Market.sol is locked
Here is `MarketFactory#fund` function:\\n```\\n  function fund(IMarket market) external {\\n        if (!instances(IInstance(address(market)))) revert FactoryNotInstanceError();\\n      market.claimFee();\\n    }\\n```\\n\\nThis is `Market#claimFee` function:\\n```\\n    function claimFee() external {\\n        Global memory newGlobal = _global.read();\\n\\n        if (_claimFee(address(factory()), newGlobal.protocolFee)) newGlobal.protocolFee = UFixed6Lib.ZERO;\\n        // rest of code\\n    }\\n```\\n\\nThis is the internal `_claimFee` function:\\n```\\n    function _claimFee(address receiver, UFixed6 fee) private returns (bool) {\\n        if (msg.sender != receiver) return false;\\n\\n        token.push(receiver, UFixed18Lib.from(fee));\\n        emit FeeClaimed(receiver, fee);\\n        return true;\\n    }\\n```\\n\\nAs we can see, when `MarketFactory#fund` is called, Market#claimFee gets called which will send the protocolFee to msg.sender(MarketFacttory). When you check through the MarketFactory contract, there is no place where another address(such as protocol multisig, treasury or an EOA) is approved to spend MarketFactory's funds, and also, there is no function in the contract that can be used to transfer MarketFactory's funds. This causes locking of the protocol fees.
Consider adding a `withdraw` function that protocol can use to get the protocolFee out of the contract. You can have the `withdraw` function transfer the MarketFactory balance to the treasury or something.
Protocol fees cannot be withdrawn
```\\n  function fund(IMarket market) external {\\n        if (!instances(IInstance(address(market)))) revert FactoryNotInstanceError();\\n      market.claimFee();\\n    }\\n```\\n