Skip to Content
Withdrawals

Withdrawals

Most exits are instant. An exit larger than what can leave right now waits in a queue.

Instant exits

An exit takes BTC from these places, in order:

  1. The idle buffer. It holds 3% of the BTC by design, 2% on testnet.
  2. The trove. The vault releases collateral and repays debt from savings. The ratio goes back to 250%.
  3. Closing the loan. If the loan would fall under Mezo’s 2,000 MUSD minimum, the vault closes it.

Every exit takes a clean pro-rata slice of BTC and MUSD. Take an exit of a share φ\varphi of the vault. It releases φC\varphi C of collateral and repays φD\varphi D of debt, so for those who stay

CR′=(1−φ) C⋅P(1−φ) D=CR\text{CR}' = \frac{(1 - \varphi)\, C \cdot P}{(1 - \varphi)\, D} = \text{CR}

Nobody who stays is left holding leverage from someone who left.

maxWithdraw and maxRedeem move every second, because Mezo accrues interest live. Leave about 0.001% of room when you exit everything.

When exits are limited

maxWithdraw covers only what can leave right now. It shrinks in these cases:

CaseWhat happens
BTC locked in veBTCLocked BTC counts at face value but cannot leave before its lock ends
Mezo’s Recovery ModeMezo blocks collateral withdrawals, so instant exits are limited to idle BTC
Mezo refuses a closeExits release collateral only down to the line that keeps the trove at target and the system at 150%
The oracle is staleIf the price is over 60 seconds old, deposits and exits revert and the max views read 0

The exit queue

An exit beyond maxWithdraw goes through the RedeemQueue.

requestRedeem(shares)processQueue() fills in arrival orderclaim(ids) sends the BTCShares wait in escrow and keep earningHolderRedeemQueueVaultHolderRedeemQueueVault
  1. requestRedeem moves your shares into escrow. They keep earning, and keep their risk, until paid.
  2. Requests are paid first come, first served, ahead of instant exits. Each fill pays the share price of that moment.
  3. processQueue() can free collateral to pay them. Anyone can call it.
  4. claim(ids) sends each filled request’s BTC to its receiver. Anyone can call it. The keeper claims for holders in batches, about 10 to 15 minutes after a fill.

A request cannot be cancelled. While one waits, the vault takes no new debt and locks no new BTC.

How long it takes

Why it waitsTypical wait
BTC in veBTCUntil the next lock ends, usually one week, at most lockWeeks weeks
Recovery ModeUntil Mezo leaves Recovery Mode and liquidity returns
A refused closeUntil the system ratio recovers

Value per share stays equal for everyone. Only the order changes. In a long restricted state, the earliest requests take the liquid BTC first.