How strategy works
1. One-Click Setup via Flash Loan
When a user opens a looping strategy, XLend automatically initiates a flash loan to perform all steps within one transaction.
The internal logic of the flash loan contract is as follows (take weETH/ETH as an example):
Borrows ETH via flash loan.
The borrowed ETH and innital deposit is converted into weETH (the yield-bearing asset).
The newly swapped weETH is deposited into XLend as collateral.
The strategy then borrows ETH from XLend against that collateral.
The borrowed ETH is used to repay the flash loan, completing the loop setup.
All these actions occur atomically — either the entire sequence succeeds, or it fully reverts (no partial execution).
This ensures safety and allows the user to open a leveraged weETH position in a single click.
2. Position Representation on Portfolio
Once created, the looping position becomes a standard lending/borrowing position in your XLend portfolio.
You’ll see both supplied assets (the yield-bearing token) and borrowed assets (the underlying token).
The position accrues yield from the supplied side while paying interest on the borrowed side.
Your net APY depends on the spread between the two rates.
Over time, you can track the growth, performance, and health of this position directly in your portfolio dashboard.
3. Smart Account Safety & Management
Every looping strategy on XLend is mandatorily opened under a Smart Account (smart contract wallet).
This design ensures:
Safety: Your looping position is isolated and cannot affect other wallet assets.
Automation: The Smart Account can manage complex transactions (e.g., rebalancing, harvesting, or partial unwinds).
Ease of use: Users can close or adjust the strategy with a single transaction.
Last updated