Uniswap V3 LP Leverage Yield Farming (ERC20)
Leverage yield farming is identified as one of the main use cases for users to deposit their Uniswap V3 LP tokens as collateral to borrow more ERC20 tokens on Parallel and add to their yield farming position. Without credit expansion, a leverage yield farmer would borrow the one or both assets (depending on whether the spot price is outside or within the selected liquidity provision range), deposit the borrowing into an Uniswap L3 LP position, deposit the LP token back to Parallel and collateralize it, then repeat the process a number of times to reach maximum leverage.
In such case, we calculate the credit limit, as the sum of all borrowing power the user can achieve through the aforementioned recursion of the series of transactions. Specifically, with the currently available borrow credit denoted by and the targeted Uniswap V3 LP token’s collateral factor denoted by , the amount of deposit and borrow for each repetition is projected in the table below:
1
Supplied Collateral
2
3
…
…
…
Therefore, the credit limit (i.e. maximum amount of borrowing) can be calculated as the sum of all borrow amounts as projected in the table above when
This means, for a user with currently available borrow credit of and determined given the Uniswap V3 LP token he chooses to provide liquidity to with the borrowed assets from Parallel, rather than leaving the user perform the series of transactions repetitively, we develop a solution for the user such that he can achieve desired leverage with one click.
Specifically, The user can choose to borrow any amount up to of value. Such value will then be allocated proportionally to the two underlying assets of the LP position as calculated per eq. (3) and (4) on Uniswap V3 LP Token Analyzer page, such that all borrowing will be put into the user-defined Uniswap V3 LP position which is, in turn, deposited back to Parallel as the user’s collateral. Note the series of transactions are done through flashloan within one block.
Last updated