Skip to main content

Removing an Illiquid Market

Understand the risk of removing an Illiquid market

When a market starts reverting, the vault manager might be inclined to remove the market from the vault. If the Silo Vault has zero deposits in the market, removing it poses no risk. See Removing an Empty Market. However, if the Silo Vault has funds deposited and those funds cannot be withdrawn due to insufficient liquidity, removing the market will likely lead to the loss of those funds when the market is re-added to the vault.

Instead of removing a market with insufficient liquidity for withdrawal, we recommend setting its supply cap to zero and moving it to the bottom of the Withdraw Queue.

How Does the Vault Lose Funds When It Re-Adds a Removed Market?

When SiloVault re-adds a previously removed market with existing deposits, the assets from that market are distributed unfairly (evenly across existing depositors). This creates an opportunity for attackers to frontrun the market-add transaction and steal the re-added vault's deposited liquidity. For example, an attacker could deposit 1Mintoa1M into a 9M SiloVault and immediately receive 10% of the re-added vault deposits. The attacker could then withdraw instantly, profiting from the unfair distribution.

Proceed if you accept the risk of losing the funds when you add a removed market.

To remove a market:

  • 1- Set cap to 0 via vault.submitCap(market, 0) (operation without timelock). You can perform the action via the Vault Manager UI.
  • 2- Execute vault.setSupplyQueue(IERC4626[]) with a list of markets for the supply queue (optional)
  • 3- Execute vault.submitMarketRemoval(market), which allows to remove market with liquidity (operation with timelock)
  • 4- Wait timelock
  • 5- Execute vault.updateWithdrawQueue(indexes). Indexes is an array with markets indexes that we want to have in the new queue.

To add the market back (front-running is possible):

  • 1- Set cap for the market vault.submitCap(market, someCap)
  • 2- Wait timelock
  • 3- Execute vault.acceptCap(market) open function anyone can execute (this is the place where front-running can happen)