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:
- Deposit collateral
- Borrow against it
- Swap borrowed asset into more collateral
- 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.

Atomic flow:
- Flash loan Quote (USDC) from Blend
- Swap USDC → XLM via Aquarius (multi-hop supported)
- Supply XLM as collateral on Blend
- Borrow USDC on Blend
- 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.

Atomic flow:
- Flash loan Base (XLM) from Blend
- Swap XLM → USDC via Aquarius
- Supply USDC as collateral
- Borrow XLM
- 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.