If the dao removes a bridge, user's deposited tokens for that bridge will be lost.
If the dao removes a bridge for any (non-malicious) reason, user's deposited tokens for that bridge will be lost.\\nIn the `OwnerFacet.sol` the dao of the system has the option to remove a bridge by calling the `deleteBridge()` function. There is no check if there are any assets in the bridge. Also users may deposit funds in the bridge during the voting period.\\nPOC Add the following function in the `BridgeRouter.t.sol`\\n```\\nfunction test_DeleteBridgeWithAssets() public {\\n        console.log("Sender ethEscrowed in vault 2 before deposit: ", diamond.getVaultUserStruct(2, sender).ethEscrowed);\\n        deal(_rethA, sender, 10000 ether);\\n\\n        vm.startPrank(sender);\\n        uint88 deposit1 = 1000 ether;\\n        uint88 withdrawAmount = 100 ether;\\n        diamond.deposit(_bridgeRethToBeDeleted, deposit1);\\n        console.log("Sender ethEscrowed in vault2 after deposit: ", diamond.getVaultUserStruct(2, sender).ethEscrowed);\\n        diamond.withdraw(_bridgeRethToBeDeleted, withdrawAmount);\\n        console.log("Sender ethEscrowed after withdraw: ", diamond.getVaultUserStruct(2, sender).ethEscrowed);\\n        vm.stopPrank();\\n\\n        console.log("Balance of reth in the bridgeRethToBeDeleted: ", rethA.balanceOf(_bridgeRethToBeDeleted));\\n\\n        /// INFO: DAO deletes the bridge after a vote has been passed\\n        vm.startPrank(owner) ;\\n        diamond.deleteBridge(_bridgeRethToBeDeleted);\\n        vm.stopPrank();\\n\\n        vm.startPrank(sender);\\n        vm.expectRevert();\\n        diamond.withdraw(_bridgeRethToBeDeleted, withdrawAmount);\\n        console.log("Balance of reth in the bridgeRethToBeDeleted: ", rethA.balanceOf(_bridgeRethToBeDeleted));\\n        vm.stopPrank();\\n    }\\n```\\n\\nIn order to run this test, you also have to add\\n```\\n rethA.approve(\\n                _bridgeRethToBeDeleted,\\n                0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\\n            );\\n```\\n\\nto `setUp()` function of the `BridgeROuter.t.sol` contract\\nIn `DeployHelper.sol` another bridge and vault have to be added in order for the test to run:\\n```\\n/// INFO: added by auditor\\n    IBridge public bridgeRethToBeDeleted;\\n    address public _bridgeRethToBeDeleted;\\n    IAsset public zethToBeDeletedVault;\\n    address public _zethToBeDeletedVault;\\n    IRocketStorage public rocketStorageA;\\n    address public _rocketStorageA;\\n    IRocketTokenRETH public rethA;\\n    address public _rethA;\\n```\\n\\nAdd the following to `deployContracts()` function\\n```\\nif (chainId == 31337) {\\n            //mocks\\n            _immutableCreate2Factory = deployCode("ImmutableCreate2Factory.sol");\\n\\n            if (isMock) {\\n                _steth = deployCode("STETH.sol");\\n                _unsteth = deployCode("UNSTETH.sol", abi.encode(_steth));\\n                _rocketStorage = deployCode("RocketStorage.sol");\\n                _reth = deployCode("RocketTokenRETH.sol");\\n                reth = IRocketTokenRETH(_reth);\\n                _ethAggregator = deployCode("MockAggregatorV3.sol");\\n                /// INFO: added by auditor\\n                _rocketStorageA = deployCode("RocketStorage.sol");\\n                _rethA = deployCode("RocketTokenRETH.sol");\\n                rethA = IRocketTokenRETH(_rethA);\\n            }\\n\\n            rocketStorage = IRocketStorage(_rocketStorage);\\n            /// INFO: added by auditor\\n            rocketStorageA = IRocketStorage(_rocketStorageA);\\n            steth = ISTETH(_steth);\\n            unsteth = IUNSTETH(payable(_unsteth));\\n            ethAggregator = IMockAggregatorV3(_ethAggregator);\\n        }\\n\\n/// INFO: Added by auditor \\n        _zethToBeDeletedVault = factory.safeCreate2(\\n            salt,\\n            abi.encodePacked(\\n                vm.getCode("Asset.sol:Asset"), abi.encode(_diamond, "Zebra ETH Two", "ZETHT")\\n            )\\n        );\\n\\n      _bridgeRethToBeDeleted = factory.safeCreate2(\\n            salt,\\n            abi.encodePacked(\\n                vm.getCode("BridgeReth.sol:BridgeReth"),\\n                abi.encode(_rocketStorageA, _diamond)\\n            )\\n        );\\n\\n        bridgeRethToBeDeleted = IBridge(_bridgeRethToBeDeleted);\\n            MTypes.CreateVaultParams memory vaultParams;\\n            vaultParams.zethTithePercent = 10_00;\\n            vaultParams.dittoMatchedRate = 1;\\n            vaultParams.dittoShorterRate = 1;\\n            diamond.createVault({zeth: _zeth, vault: Vault.CARBON, params: vaultParams});\\n\\n            MTypes.CreateVaultParams memory vaultParamsTwo;\\n            vaultParamsTwo.zethTithePercent = 9_00;\\n            vaultParamsTwo.dittoMatchedRate = 1;\\n            vaultParamsTwo.dittoShorterRate = 1;\\n            zethToBeDeletedVault = IAsset(_zethToBeDeletedVault);\\n            diamond.createVault({zeth: _zethToBeDeletedVault, vault: 2, params: vaultParamsTwo});\\n            STypes.Vault memory carbonVaultConfigTwo = diamond.getVaultStruct(2);\\n            assertEq(carbonVaultConfigTwo.zethTithePercent, 9_00);\\n\\n             diamond.createBridge({\\n                bridge: _bridgeRethToBeDeleted,\\n                vault: 2,\\n                withdrawalFee: 150,\\n                unstakeFee: 0\\n            });\\n            \\n            if (isMock) {\\n                rocketStorage.setDeposit(_reth);\\n                rocketStorage.setReth(_reth);\\n                /// INFO: added by auditor\\n                rocketStorageA.setDeposit(_rethA);\\n                rocketStorageA.setReth(_rethA);\\n                _setETH(4000 ether);\\n            }\\n```\\n\\nTo run the test use `forge test -vvv --mt test_DeleteBridgeWithAsset`
In `deleteBridge()` make sure that the contract doesn't have any assets
User's deposited `RETH` or `STETH` in that bridge will be lost, as the user doesn't have the option to withdraw them. Because the withdraw functions can only be called trough the `Diamond.sol`
```\\nfunction test_DeleteBridgeWithAssets() public {\\n        console.log("Sender ethEscrowed in vault 2 before deposit: ", diamond.getVaultUserStruct(2, sender).ethEscrowed);\\n        deal(_rethA, sender, 10000 ether);\\n\\n        vm.startPrank(sender);\\n        uint88 deposit1 = 1000 ether;\\n        uint88 withdrawAmount = 100 ether;\\n        diamond.deposit(_bridgeRethToBeDeleted, deposit1);\\n        console.log("Sender ethEscrowed in vault2 after deposit: ", diamond.getVaultUserStruct(2, sender).ethEscrowed);\\n        diamond.withdraw(_bridgeRethToBeDeleted, withdrawAmount);\\n        console.log("Sender ethEscrowed after withdraw: ", diamond.getVaultUserStruct(2, sender).ethEscrowed);\\n        vm.stopPrank();\\n\\n        console.log("Balance of reth in the bridgeRethToBeDeleted: ", rethA.balanceOf(_bridgeRethToBeDeleted));\\n\\n        /// INFO: DAO deletes the bridge after a vote has been passed\\n        vm.startPrank(owner) ;\\n        diamond.deleteBridge(_bridgeRethToBeDeleted);\\n        vm.stopPrank();\\n\\n        vm.startPrank(sender);\\n        vm.expectRevert();\\n        diamond.withdraw(_bridgeRethToBeDeleted, withdrawAmount);\\n        console.log("Balance of reth in the bridgeRethToBeDeleted: ", rethA.balanceOf(_bridgeRethToBeDeleted));\\n        vm.stopPrank();\\n    }\\n```\\n