Managing Imbalances & Rebalancing
When one leg closes unexpectedly, you need to act fast. Here's how ArchiNeutral detects and fixes imbalances.
Managing Imbalances & Rebalancing
At some point, one leg of your delta-neutral position will close while the other stays open. It's not a question of if — it's when. What you do in the next few minutes determines whether it's a minor setback or a real loss.
This guide explains what causes imbalances, how ArchiNeutral detects them, and the three options available to you when one happens.
What Causes an Imbalance
A delta-neutral position depends on two legs being equal in size and opposite in direction. If one leg changes — or disappears entirely — the position is no longer neutral. You now have directional exposure.
The most common causes:
Stop-loss or take-profit triggered on one side. A configured SL or TP fires on the short DEX but not the long. Your long remains open, your short is gone. You're now net long on the full notional. This is the most frequent scenario.
Partial or full liquidation of one leg. If margin on one DEX runs thin and the liquidation engine closes part or all of one position, the size mismatch creates immediate exposure.
Manual close on a DEX. You — or someone with access to your DEX account — closes a position directly on the exchange. ArchiNeutral doesn't control what happens on the DEX itself, only what it places and tracks.
DEX downtime during a volatile period. One exchange goes offline during a sharp move. Orders on the live DEX execute; orders on the offline DEX don't. When the offline DEX comes back, the sizes no longer match.
The result is always the same: your position that was built to be market-neutral is now carrying directional risk. The longer it stays that way, the more that risk compounds.
How ArchiNeutral Detects It
Detection is automatic. Every time your position status is checked, the backend reads live data from both DEXs and compares it against the expected sizes stored in the database. If the sizes don't match beyond a tolerance threshold, the system acts.
The status transitions happen without any input from you:
- ACTIVE → IMBALANCED when the live data diverges from expected sizes
- IMBALANCED → CLOSED if the remaining leg is also gone by the time of the next check
- IMBALANCED → ACTIVE if the sizes reconcile on their own — for example, if you rebalanced directly on the DEX
When an imbalance is detected, a position_imbalanced alert fires immediately via Telegram (if monitoring is configured on your account). You don't need to be watching the dashboard to know something happened.
The imbalance card shows:
- Which leg is missing or reduced
- Current sizes on both sides, compared against expected sizes
- The directional exposure you now carry as a result
Read this card carefully before taking action. The direction of exposure tells you how to prioritize — a net long in a falling market is more urgent than a net short in a stable one.
Your Options
ArchiNeutral gives you three paths when a position is imbalanced. None of them require going to the DEX directly. All three operate through the same rebalancing interface.
Option 1: Rebalance — Increase
This opens more on the weak side to restore equal sizing at your original target.
If your short was closed by a stop-loss, the "Increase" option opens a new short position to match your existing long. If the weak side was partially reduced rather than fully closed, it opens the difference to bring both sides back to parity.
When to use this: you want to continue running the position, conditions are still favorable, and the funding rate opportunity that made the trade attractive still exists. You're essentially re-entering the missing piece.
The system will auto-retry on partial fills — if the order doesn't fill in one iteration, it continues attempting until the target size is reached or you stop it manually.
Option 2: Rebalance — Decrease
This closes part of the strong side to match the reduced weak side.
If your short went from $5,000 to $3,000, the "Decrease" option closes $2,000 of your long — bringing both legs to $3,000 and restoring balance at a smaller size.
When to use this: you want to stay in the position but at a reduced size, either because conditions have deteriorated slightly or because you'd rather take less risk going forward. The position remains active, just smaller.
This is also the right option if you don't want to add new exposure to the market while it's moving against you.
Option 3: Close All
This closes the remaining leg entirely, exiting the position completely.
Mechanically, "Close All" is a Rebalance Decrease to zero. It closes everything on the strong side, leaving no open positions on either DEX.
When to use this: conditions have changed substantially since you opened, the opportunity that justified the trade is gone, or you simply want a clean exit rather than managing a position that's already been disrupted. This is often the right call if the imbalance was caused by a liquidation — the fact that one side got liquidated is itself a signal that margin conditions were tighter than expected.
After Rebalancing
Once the rebalance executes, the position status returns to ACTIVE if the operation was a full balance restore, or remains in a transitional state until the fills confirm on both DEXs.
Three things to check immediately after a successful rebalance:
Verify sizes match. The active position card shows live sizes on both legs. Confirm they're equal, or within acceptable tolerance for your strategy.
Update your SL/TP orders. If you rebalanced to a different size than you started with — either larger via Increase or smaller via Decrease — your existing stop-loss and take-profit levels need to be recalculated. SL/TP triggers are size-dependent. Leaving orders configured for $5,000 on a position that's now $3,000 means they'll behave differently than expected.
Confirm monitoring is still active. Check that your Telegram alerts are still firing for this position. A rebalance that changes the position's configuration may require you to re-verify the monitoring setup.
Prevention
No setup eliminates imbalances entirely, but several practices reduce their frequency and severity.
Proper SL/TP configuration catches most imbalance scenarios before they escalate into liquidations. A stop-loss on one side that fires correctly is a controlled exit — a liquidation is not.
Adequate margin on both legs. Imbalances caused by liquidation are almost always preceded by a margin situation that could have been addressed earlier. Watch your liquidation distance on both DEXs.
Monitoring alerts give you a response window. The faster you know about an imbalance, the more options you have. If your Telegram alert fires within seconds of detection, you can act before the remaining leg moves significantly against you.
Some imbalances are unavoidable — DEXs have outages, SL/TP orders fire on one side before the other, markets gap through limit prices. The important variable is not whether an imbalance ever happens, but how quickly you respond when it does. The tools are there when you need them.
What's Next
With imbalance management understood, the last piece of the position lifecycle is the clean, planned exit.
- Ready to close a position cleanly? See Closing Positions & Exit Strategy.
This guide is part of the ArchiNeutral Guide Series.