Loop a position for leverage

Buy a Pendle PT, post it on Morpho Blue, borrow and buy again up to a target leverage, simulated as one transaction.

Live. Runs on Composer today
In your app
Sample data

What runs, in order

  1. 1
    User paysreUSDe
    Ethereum
  2. 2
    Buy the PTRoyco deposit, wrap to SY, Pendle swapcore.call ×n · core.staticCall ×n · core.invoke ×n · core.asResource ×n · core.balanceOf ×n
    Ethereum
  3. 3
    Supply as collateralMorpho BluemorphoBlue.supplyCollateral ×n
    Ethereum
  4. 4
    Borrow USDCRepeated to the targetmorphoBlue.borrow ×n
    Ethereum
  5. 5
    Swap USDC to reUSDeFeeds the next leglifi.swap ×n
    Ethereum
Build this

Get an API key and the code for this exact flow.

Who it's for

Yield and trading apps that offer leverage

What you get

  • A target leverage in one transaction
  • The simulation measures the leverage you actually get
  • No flash loan needed
Real transactions

Run it live

The flow from the demo, compiled with your key and signed by your wallet. Get the code

Paste your LI.FI API key

The flow runs on Composer with your key. It stays in this browser and goes only to https://composer.li.quest. No key yet? Get one ↗