Close an account that holds DeFi
Close an account with Blend, Aquarius or Soroswap positions, and handle the cases that need you to act.
An account cannot be merged while it holds DeFi positions, because their value would stay behind on the deleted account. The app finds your positions, unwinds each one in its own transaction, sells what has a market to XLM, and then runs the classic close.
You do not unwind anything by hand first. Connect the account and the plan comes back with the exit steps in it.
What gets unwound
| Protocol | What the close does |
|---|---|
| Blend | Repays loans, withdraws collateral and supply, collects BLND emissions |
| Blend backstop | Collects accrued backstop BLND, queues the withdrawal, and withdraws it once it unlocks |
| Aquarius pools | Collects gauge rewards and pool rewards, withdraws your pool shares |
| Aquarius concentrated pools | Collects rewards and swap fees, withdraws each of your price ranges |
| Soroswap | Withdraws your LP position |
| SEP-41 allowances | Sets each approval to zero |
Each step appears in Review with a plain label, so you see what runs before you sign. The order is worked out for you: exits that need nothing repaid run before the repays they can fund, a repay runs before the withdraw that depends on it, and the account merge waits for every exit. When an exit pays out an asset the account has no trustline for, the plan opens one first, and the final transaction removes it again.
Every Aquarius and Soroswap pool exit carries a minimum output per token: the amount the step's own simulation expects, less the slippage tolerance (1% unless the deployment sets another). A pool that would pay less refuses the exit on chain instead of paying out less.
FxDAO
FxDAO is no longer supported, because the protocol shut down on chain. Its mainnet vaults contract now runs code that only allows eviction and upgrades, its panic mode is on, and it holds no vaults; its testnet contracts no longer exist. FxDAO stablecoins your account still holds are ordinary balances: the close sells them for XLM, or you choose what happens to them.
Cases that need you to act
A Blend loan you cannot repay from the account
Repaying a Blend loan needs the borrowed token in the account. Blend has no built-in swap, and the app does not buy the token for you. When the account holds too little, the Check the plan step says so. Send enough of the borrowed token to the account, or repay the loan in Blend, then come back.
When the borrowed asset is locked in your open DEX offers or a classic liquidity pool, the plan adds a step that cancels those offers and withdraws those pool shares before the repay, so the asset is spendable.
A Blend backstop deposit
A backstop deposit is withdrawn through a queue: 17 days on the current backstop, 21 days on the earlier one. The account has to stay open to receive the withdrawal, so a run that queues one only prepares the close:
- When backstop emissions have accrued on a deposit that is not queued yet, the plan claims them first so they are queued with your deposit. When that claim fails on chain today, Fix issues shows the accrued BLND and asks you to leave it unclaimed. Emissions on a deposit you already queued in full, or in a pool where nothing is deposited any more, are not claimed: claiming them would add new backstop shares under a new withdrawal lock. About this plan in the Check the plan step names the BLND each such pool leaves behind. These rewards never block the close.
- The plan queues the withdrawal and runs every other exit, and the account stays open. Review reads Review the preparation, the confirmation reads Confirm preparing the close, and the result reads Preparation done, account still open with the unlock date.
- On or after the unlock date, run the close again. The plan withdraws the unlocked deposit, which Blend pays out as BLND-USDC LP tokens, and then closes the account.
The LP tokens are a Soroban token, so on a close to your own address they are sent to your destination, or converted to XLM through Soroswap when you choose that. An exchange can only receive XLM, so close a backstop account to your own address.
Aquarius gauge rewards in a pool you already left
The plan claims what an Aquarius pool's reward gauges owe you before it withdraws your share of that pool. It does this for every pool you still hold a share or a position in. Gauge rewards owed in a pool you already left are not found, so claim those in Aquarius before you close.
The claim pays out every gauge of the pool, so the plan first opens a trustline for each gauge's token, including a gauge that owes you nothing. When the account cannot hold one of those tokens (its issuer has to approve every new trustline, the issuer no longer exists, or your trustline is not authorized), the claim is left out and the Check the plan step tells you which rewards closing the account forfeits. The close goes ahead either way.
Leftover balances
Unwinding a position leaves tokens in the account. The classic close sells every classic balance for XLM through the Stellar DEX, unless you choose in the Check the plan step to send it as-is or return it to its issuer. Two sales that trade through the same market run in separate transactions, and each one is quoted again after the one before it lands. When that fresh quote is worse than the one you reviewed by more than the slippage tolerance, the close stops before selling it and the rebuilt plan asks you what to do. A balance with no market, or one whose sale would move the price by more than 2%, is never sold without your answer. See Clear a blocked closure.
Standalone tokens
A SEP-41 token someone sent you lives inside its own contract, not as a trustline balance, so it does not block the close and stays on the deleted account unless you move it. The Standalone tokens card in the Check the plan step lists the ones the scan found. Nothing is swept unless you tick it, and you can convert the ticked ones to XLM through Soroswap instead of sending them as-is.
When a token you ticked cannot be sent, the account still closes, and the result reads Account closed, tokens left behind. It lists each token by its contract id with the amount and the reason. Those tokens stay on the closed account, and nobody can move them afterwards.
The scan reads token transfers and mints from about the last seven days. When the deployment has a Lumeus key for the network, it also takes the tokens Lumeus, a hosted Stellar history index, shows the account holding, whenever they arrived. Every token the scan finds has its balance read on chain first. The card says which scan ran. Add a token the scan missed by its contract address.
An Aquarius or Soroswap pool share whose position the plan already exits is not listed as a standalone token.
When a protocol cannot be read
When discovery cannot read a protocol, the plan says so and the close stays blocked until a rebuilt plan reads it. Right before the merge, the close discovers your positions again and refuses to merge while any is open or unreadable.
Protocols that are not supported
The close unwinds Blend, Aquarius and Soroswap. When the account holds tokens from contracts the app does not recognize, the Check the plan step says that any of them can be a position in another app (a pool share, a loan or vault receipt, a staked balance). Unwind those in their own app first: the close can only move such a token as-is, which does not reclaim what it stands for.