Skip to main content

How it works

Untangled Loop synthetizes long/short exposure using spot + money markets, automated via flash loans.

At a high level:

  • Long Base means: you end up with Base collateral and Quote debt
  • Short Base means: you end up with Quote collateral and Base debt

All steps occur atomically in one transaction.

What is looping?

Looping is the DeFi-native way to create leverage:

  1. Deposit collateral
  2. Borrow against it
  3. Swap borrowed asset into more collateral
  4. Repeat

Because money markets require over-collateralization, each loop gives diminishing additional exposure.

Untangled Loop automates this with flash loans, so a user can enter a loop-like position instantly without manually repeating steps.

Open Positions

Open LONG Base (Base/Quote)

Example: XLM/USDC, going LONG XLM.

Goal: profit when XLM appreciates vs USDC.

loop_long.png

Atomic flow:

  1. Flash loan Quote (USDC) from Blend
  2. Swap USDC → XLM via Aquarius (multi-hop supported)
  3. Supply XLM as collateral on Blend
  4. Borrow USDC on Blend
  5. Repay the flash loan (USDC)

Result

  • Collateral: XLM
  • Debt: USDC

Open SHORT Base (Base/Quote)

Example: XLM/USDC, going SHORT XLM.

Goal: profit when XLM depreciates vs USDC.

looo_short.png

Atomic flow:

  1. Flash loan Base (XLM) from Blend
  2. Swap XLM → USDC via Aquarius
  3. Supply USDC as collateral
  4. Borrow XLM
  5. Repay the flash loan (XLM)

Result

  • Collateral: USDC
  • Debt: XLM

Close / reduce positions

Closing reverses the open flow using a flash loan to ensure atomic settlement.

Liquidity & price impact

Untangled Loop positions are built on top of:

  • spot liquidity for the swap leg (Aquarius pools)
  • money market liquidity for borrow/supply (Blend)

You should always:

  • set sensible slippage protection (min_* params)
  • watch price impact on the swap
  • understand that larger trades can move borrow/supply rates in the money market

Carry / “funding”

Instead of perp funding, Untangled Loop carry is driven by money-market rates:

  • You may earn supply yield on the collateral leg
  • You pay borrow cost on the debt leg
  • The net is the position’s carry

This carry is not a guaranteed fixed rate; it evolves with money market utilisation.