MEDIUM severity: The vulnerability is related to the incorrect removal of an operator's ID from the heap when their s. The vulnerability is related to the incorrect removal of an operator's ID from the heap when their strategy cap is reset to "0". This issue arises when an operator's strategy cap is set to "0" using the `setOperatorStrategyCap` function, which removes the operator from the heap. However, the heap's...

Vulnerable code:
```\nfunction setOperatorStrategyCap(\n    RioLRTOperatorRegistryStorageV1.StorageV1 storage s,\n    uint8 operatorId,\n    IRioLRTOperatorRegistry.StrategyShareCap memory newShareCap\n) internal {\n    OperatorUtilizationHeap.Data memory utilizationHeap = s.getOperatorUtilizationHeapForStrategy(newShareCap.strategy);\n\n    if (currentShareDetails.cap > 0 && newShareCap.cap == 0) {\n        if (currentShareDetails.allocation > 0) {\n            operatorDetails.queueOperatorStrategyExit(operatorId, newShareCap.strategy);\n        }\n        utilizationHeap.removeByID(operatorId);\n    }\n\n    utilizationHeap.store(s.activeOperatorsByStrategyShareUtilization[newShareCap.strategy]);\n}\n```\n```\nfunction _remove(Data memory self, uint8 i) internal pure {\n    self.operators[i] = self.operators[self.count--];\n}\n```\n```\nfunction test_removingDoesNotUpdatesStoredHeap() public {\n    OperatorUtilizationHeap.Data memory heap = OperatorUtilizationHeap.initialize(5);\n\n    heap.insert(OperatorUtilizationHeap.Operator({id: 1, utilization: 50}));\n    heap.store(heapStore);\n\n    heap.insert(OperatorUtilizationHeap.Operator({id: 2, utilization: 60}));\n    heap.store(heapStore);\n\n    heap.insert(OperatorUtilizationHeap.Operator({id: 3, utilization: 70}));\n    heap.store(heapStore);\n\n    console.log("Heaps count", heap.count);\n    console.log("1st", heap.operators[1].id);\n    console.log("2nd", heap.operators[2].id);\n    console.log("3rd", heap.operators[3].id);\n\n    heap.removeByID(3);\n    heap.store(heapStore);\n\n    console.log("Heaps count", heap.count);\n    console.log("1st", heap.operators[1].id);\n    console.log("2nd", heap.operators[2].id);\n    console.log("3rd", heap.operators[3].id);\n}\n```\n```\nfunction rebalance(address asset) external checkRebalanceDelayMet(asset) {\n    (\n        uint256 sharesReceived,\n        bool isDepositCapped\n    ) = depositPool().depositBalanceIntoEigenLayer(asset);\n}\n```\n```\nfunction depositBalanceIntoEigenLayer(address asset) external onlyCoordinator returns (uint256, bool) {\n    uint256 amountToDeposit = asset.getSelfBalance();\n    if (amountToDeposit == 0) {\n        return (0, false);\n    }\n    // -> return (OperatorOperations.depositTokenToOperators(operatorRegistry(), asset, strategy, sharesToAllocate), isDepositCapped);\n    return (OperatorOperations.depositTokenToOperators(operatorRegistry(), asset, strategy, sharesToAllocate), isDepositCapped);\n}\n```\n```\nfunction depositTokenToOperators(\n    IRioLRTOperatorRegistry operatorRegistry,\n    address token,\n    address strategy,\n    uint256 sharesToAllocate\n) internal returns (uint256 sharesReceived) {\n    (\n        uint256 sharesAllocated,\n        IRioLRTOperatorRegistry.OperatorStrategyAllocation[] memory allocations\n    ) = operatorRegistry.allocateStrategyShares(\n        strategy,\n        sharesToAllocate\n    );\n    //...\n```\n```\nfunction allocateStrategyShares(address strategy, uint256 sharesToAllocate) external onlyDepositPool returns (uint256 sharesAllocated, OperatorStrategyAllocation[] memory allocations) {\n    OperatorUtilizationHeap.Data memory heap = s.getOperatorUtilizationHeapForStrategy(strategy);\n}\n```\n```\nfunction getOperatorUtilizationHeapForStrategy(\n    RioLRTOperatorRegistryStorageV1.StorageV1 storage s,\n    address strategy\n) internal view returns (OperatorUtilizationHeap.Data memory heap) {\n    uint8 numActiveOperators = s.activeOperatorCount;\n    if (numActiveOperators == 0) {\n        return OperatorUtilizationHeap.Data(new OperatorUtilizationHeap.Operator[](0), 0);\n    }\n\n    heap = OperatorUtilizationHeap.initialize(MAX_ACTIVE_OPERATOR_COUNT);\n    LibMap.Uint8Map storage operators = s.activeOperatorsByStrategyShareUtilization[strategy];\n\n    IRioLRTOperatorRegistry.OperatorShareDetails memory operatorShares;\n    unchecked {\n        uint8 i;\n        for (i = 0; i < numActiveOperators; ++i) {\n            uint8 operatorId = operators.get(i);\n\n            if (operatorId == 0) {\n                break;\n            }\n\n            operatorShares = s.operatorDetails[operatorId].shareDetails[strategy];\n            heap.operators[i + 1] = OperatorUtilizationHeap.Operator({\n                id: operatorId,\n                utilization: operatorShares.allocation.divWad(operatorShares.cap)\n            });\n        }\n        heap.count = i;\n    }\n}\n```\n```\nutilization = operatorShares.allocation.divWad(operatorShares.cap)\n```\n```\nfunction test_Capped0ValidatorBricksFlow() public {\n    // Add 3 operators\n    addOperatorDelegators(reLST.operatorRegistry, address(reLST.rewardDistributor), 3);\n\n    uint256 AMOUNT = 1002e18;\n\n    // Allocate to cbETH strategy.\n    cbETH.approve(address(reLST.coordinator), type(uint256).max);\n    uint256 lrtAmount = reLST.coordinator.deposit(CBETH_ADDRESS, AMOUNT);\n\n    // Push funds into EigenLayer.\n    vm.prank(EOA, EOA);\n    reLST.coordinator.rebalance(CBETH_ADDRESS);\n\n    // Build the empty caps\n    IRioLRTOperatorRegistry.StrategyShareCap[] memory zeroStrategyShareCaps = new IRioLRTOperatorRegistry.StrategyShareCap[](1);\n    zeroStrategyShareCaps[0] = IRioLRTOperatorRegistry.StrategyShareCap({strategy: CBETH_STRATEGY, cap: 0});\n\n    // Set the caps of CBETH_STRATEGY for operator 2 as "0"\n    reLST.operatorRegistry.setOperatorStrategyShareCaps(2, zeroStrategyShareCaps);\n\n    // Try an another deposit, we expect revert when we do the rebalance\n    reLST.coordinator.deposit(CBETH_ADDRESS, 10e18);\n\n    // Push funds into EigenLayer. Expect revert, due to division by "0"\n    vm.startPrank(EOA, EOA);\n    vm.expectRevert(bytes4(keccak256("DivWadFailed()")));\n    reLST.coordinator.rebalance(CBETH_ADDRESS);\n    vm.stopPrank();\n}\n```