# Closing a liquidity position into a long, a short, or neither

> Exiting a Uniswap position normally leaves you holding two tokens and no view. Four operations let you name the position you become instead.

- Source: https://defiloops.com/blog/closing-a-liquidity-position-into-a-long-a-short-or-neither
- Published: 2026-09-16
- Category: Strategy
- Tags: uniswap, aave, leverage, shorting, liquidity
- Author: DeFiLoops

---
Closing a liquidity position is the easy half. You burn the NFT and two tokens land in your
account — some WETH, some USDC, in whatever ratio the pool happened to be at.

Then you are standing there holding a pile of both, with no position and an opinion you have
not expressed. The usual next move is three or four more transactions to become whatever you
actually wanted to be.

Four operations skip that. You name what the position should *become*, and the exit builds it.

## The four exits

<Spec rows={[
  ['Both sides as collateral', 'Repay the vault, burn the LP, supply both tokens to Aave, borrow back the flash asset. You end holding both assets as collateral with a USDC debt'],
  ['Into a long', 'Supply both tokens, borrow USDC against them, sell WETH if the ratio needs it. You end long the asset, financed'],
  ['Into a short', 'Supply the USDC side as collateral, borrow WETH against it, sell that WETH for USDC. You end short the asset you were just providing liquidity in'],
  ['Into a single collateral', 'Swap one side into the other first, then supply only that. You choose which side is sold; the unsold one is the whole collateral'],
]} />

The short is the one worth reading twice. You were providing liquidity in a WETH/USDC pool —
a position with no directional view — and in one transaction you leave it facing the other
way, financed, without ever holding the proceeds in between.

<Callout type="note" title="Exiting into a single asset is a choice, not a default">
  The single-collateral exit takes an explicit flag for which side gets sold. It does not
  guess from the ratio you happen to be holding, and it does not pick the larger side.
</Callout>

## Three places a zero is refused

Running through all four is a design decision that shows up three separate times: a parameter
you might expect to have a sensible default instead **refuses to run when you leave it empty.**

<Spec rows={[
  ['The loan-to-value ceiling', 'The LTV your position may have after the Aave borrow. Zero is refused outright rather than treated as "no ceiling"'],
  ['The sale floor', 'The least you will accept on the inner swap. Zero is refused as having no floor — and a 0.25% default that exists elsewhere in the system is deliberately not carried over'],
  ['The unwind minimums', 'The least each side of the burn must return'],
]} />

That third one is not a convenience setting, and it is worth explaining why it cannot be
skipped.

## The attack the unwind minimums stop

When a liquidity position is burned, it settles at **the pool's current price**, whatever that
price happens to be at that instant. The minimums are the only bound on it.

So a zero there does not mean "no preference". It means *any ratio at all*, which hands an
attacker a straightforward round trip: push the pool price with borrowed money, let your
unwind settle at the price they chose, push it back, keep the difference.

<Callout type="warn" title="Which is why zero is refused on the chain">
  Not warned about, not defaulted, not fixed up by the planner. Refused where it runs — for any
  side the burn actually produces. Zero is accepted only for a side the position genuinely
  cannot return, which happens when the range sits wholly on the other side of the price.
</Callout>

There is a general principle underneath the three, and it is the opposite of convenience. A
default is a decision somebody else made on your behalf, and these three decide how much money
you keep. Refusing to have an opinion is the safer behaviour, even though it means more
required fields.

## Three things it cannot do

- **These land on Aave v3.** There is no Aave v4 equivalent of them — the v4 operations here
  are supply, borrow, repay and withdraw, and none of them is an LP exit. The pair also has to
  be one the system already curates.
- **Nothing is produced for a later step.** These operations return nothing a following step
  can refer to, so a plan cannot chain something onto the position they create by reference —
  it has to name it.
- **A Safe cannot run them**, because every one is flash-funded and the callback needs a module.

<Callout type="note" title="Related">
  Changing a leveraged position's direction without closing it at all is
  [a different operation](/blog/turn-a-long-into-a-short-without-closing-it), and moving one
  between lenders without selling anything is
  [another](/blog/moving-a-position-between-lenders-without-selling-it).
</Callout>