How Automated Loop Works
Last updated
Last updated
Indeed, manual looping is pretty expensive, especially on L1. That’s why manual loops were soon automated via an Automated Looping strategy by iLoop Protocol.
iLoop enables a Looper to leverage the yield of liquid staking like JitoSOL, mSOL,... by borrowing the underlying asset. This is enabled by two mechanisms: eMode and flash loans.
Liquidations can occur in the case of:
1) Sustained borrow rates that are higher than the staking APYs (Negative Net APY)
2) LST smart contract exploits
The High-Efficiency mode feature is designed to maximize capital efficiency when the collateral and borrowed assets have correlated prices.
Leverage is determined by the loan-to-value ratio (meaning: how much you can borrow against your collateral) on the underlying money market.
For example, in a mSOL/SOL liquid staking pool, mSOL is supplied, and SOL is borrowed. This position is then looped up to a target leverage amount. Typically, these assets have a 75% LTV, allowing for 4x leverage. However, with iLoop, their LTV can be raised to 90%, allowing for up to 10x leverage.
Flash Loans allow you to borrow any available amount of assets without requiring collateral, provided the liquidity is returned to the protocol within a single block transaction. These transactions do not require a user to supply collateral before engaging in the transaction, therefore enabling novel products that improve gas efficiency and capital efficiency for users.
Looper supplies in xSOL (LST).
Obtain SOL through a flash loan.
Convert SOL from the flash loan to target asset xSOL (eg. JitoSOL) on the spot market (Jupiter).
Lend xSOL in Lending Reserve + Borrow SOL against xSOL - collateral.
Reimburse the initial flash loan with Borrowed SOL.
The position is open at the target leverage
We assume that:
JitoSOL / SOL price ratio = 1,12
SOL borrow rate = 6,5%
JitoSOL APY = 7,9%
Now, We have the position of user:
A user deposits 100 SOL into a JitoSOL/SOL pool. They set a 10x Levarage.
=> Total SOL as the Collateral: 100 * 10 = 1000 SOL Collateral
=> Total SOL Dept = 1000 - 100 = 900 SOL Debt
JitoSOL Earned from Staking APY = 1000 * 7,9% = 79 SOL
Borrow Paid = 900 * 6,5% = 58,5 SOL
=> Net SOL Earned = 79 - 58,5 = 20,5 SOL