Definition
The documentation describes cross margin as allowing maximal capital efficiency by sharing collateral between all other cross margin positions. It is also where money lands: a deposit is credited first to the address's cross margin balance, and a position opens in cross unless isolated margin is chosen for it. The sharing runs both ways. Unrealized profit on a cross position is automatically available as initial margin for a new one; unrealized loss is just as automatically taken from the collateral standing behind all the others.
The liquidation test reads the account, not the position: a cross position is liquidated when the account value, unrealized profit and loss included, is less than the maintenance margin times the total open notional. A backstop liquidation is therefore an account-wide event, since all of the trader's cross positions and cross margin are transferred to the liquidator, and a trader holding no isolated position ends with zero account equity.
Not everything can be taken back out. The initial margin is used by the position and cannot be withdrawn for cross margin positions. Unrealized profit can be, but only if what remains is at least 10% of the total notional of every open position and still meets the initial margin requirement. Transferring, there, means any action that removes margin other than trading: a withdrawal, a transfer to the spot wallet, an isolated margin transfer.
Across several perp dexes, what cross shares depends on the account abstraction: for a unified account and for portfolio margin, cross positions on dexes with the same collateral all share margin, while the standard abstraction keeps cross within the assets of one dex. And cross is not offered everywhere: on a dex deployed under HIP-3 it has to be enabled asset by asset by the deployer, and those dexes also support a no cross mode, which allows isolated margin with removal but no cross at all.
Formula
A cross position is liquidated when the account value, unrealized profit and loss included, falls under maintenance_margin * total_open_notional. What may be taken out is bounded by transfer_margin_required = max(initial_margin_required, 0.1 * total_position_value).
Example
An example, in round figures. An account holds $10,000 and carries two cross positions of $50,000 of notional each, on markets whose maintenance margin is 1.25% of the notional. The requirement is 1.25% of $100,000, so $1,250, and the account is liquidated when its value, unrealized profit and loss included, falls under it: a combined loss of $8,750 does it, and it does not matter which of the two markets it came from.