Skip to main content

The flash leverage mechanism

Traditional yield looping requires multiple transactions: deposit, borrow, swap, redeposit, reborrow. Each step costs gas and exposes you to price movement between transactions. Spiral Stake collapses the entire loop into a single atomic transaction using Morpho’s zero-fee flash loans. If any step fails, the entire transaction reverts. There is no intermediate state. Opening a position:
  1. You deposit your collateral token into the protocol
  2. The protocol requests a flash loan from Morpho for the full borrow amount
  3. The flash-loaned tokens are swapped to the collateral token via a whitelisted swap router
  4. The swap output is combined with your deposit and supplied as total collateral to Morpho, through your isolated UserProxy
  5. The protocol borrows the loan token against that collateral
  6. The borrowed amount repays the flash loan
  7. Position is open
Closing a position:
  1. The protocol flash-loans the full outstanding debt amount
  2. That flash loan repays your Morpho debt completely
  3. All collateral is withdrawn from Morpho
  4. Collateral is swapped back to the loan token
  5. The flash loan is repaid from swap proceeds
  6. Applicable fees are deducted from profit
  7. Remaining funds are sent to you

Working examples

Correlated: yield amplification (sUSDe/USDC)

You deposit $10,000 worth of sUSDe and target 3x leverage. sUSDe yields 12% APY. Morpho borrow rate is 4%. These are illustrative rates; actual rates are variable. The protocol flash-loans $20,000 USDC, swaps to sUSDe, and combines with your deposit for $30,000 total collateral. It borrows $20,000 USDC against that to repay the flash loan. Annual breakdown:
  • $30,000 collateral at 12% yield = $3,600 gross
  • $20,000 debt at 4% borrow rate = $800 cost
  • Net profit = $2,800
  • Yield fee (5% of $2,800) = $140
  • Net after fee = $2,660 on a $10,000 deposit = 26.6% APY
Base sUSDe without leverage: 12% APY.

Non-correlated: directional leverage (ETH/USDC)

You deposit 10 ETH ($30,000 at $3,000/ETH) and target 3x leverage. The protocol flash-loans $60,000 USDC, swaps to 20 ETH, and combines with your deposit for 30 ETH total collateral. It borrows $60,000 USDC to repay the flash loan.
ScenarioCollateral valueDebtYour netReturn
ETH up 20% ($3,600)$108,000$60,000$48,000+60%
No change ($3,000)$90,000$60,000$30,0000%
ETH down 20% ($2,400)$72,000$60,000$12,000-60%
Without leverage, a 20% ETH move returns +/-20%. At 3x, the same move returns +/-60%. Leverage amplifies both gains and losses equally. Non-correlated positions carry meaningful liquidation risk when prices move against you.

Position lifecycle

Once open, you have full control over your position without needing to close and reopen:
  1. Increase leverage: borrows and supplies more against existing collateral to amplify exposure
  2. Decrease leverage: repay debt or supply collateral to lower your LTV and widen your liquidation buffer
  3. Borrow more: pull loan tokens out against your collateral, within safe LTV limits
  4. Withdraw collateral: remove collateral from the position, within safe LTV limits. Also useful for manually deleveraging when atomic deleverage is not possible due to unavailable or inefficient swap routes for a given asset
  5. Close (atomic): one transaction unwinds everything and returns your net proceeds
  6. Close (manual): if no DEX route exists for your collateral at the time of withdrawal, withdraw a portion, convert it off-protocol to the loan token, repay part of the debt, and repeat until fully closed