# Loop Stake (Leverage Staking)

{% hint style="info" %}
***To view in the Bifrost Support Lab, visit*** [Loop Stake](https://page.bifrost.io/Loop-Stake-Leverage-Staking-ae70f7682b0b47da9cb70ca39de22cad).
{% endhint %}

## Loop Stake main characteristics

Main parameters are detailed [here](https://docs.bifrost.io/faq/what-is-loopstake/loopstake-lending-parameters) where you can find the Rate Curve of lending Markets.

* vTokens: **vDOT & vKSM**
* Max Borrow APY: **50%**
* Borrow APY - Jump rate: **90%**

{% hint style="info" %}
**Leverage staking risk warning**\
\
Please note that using leveraged staking may have the following potential risks:

* <mark style="background-color:orange;">Manual redemption may require a long waiting cycle</mark>: depending on your current leverage position, when manually deleveraging by using “Redeem Mode”, the redemption of vToken may require waiting for several months.
* <mark style="background-color:orange;">High borrowing rates may lead to sustained losses</mark>: when the liquidity of the Token lending market is insufficient, the increase in borrowing rates may exceed the staking returns of your principal. In this case, your leveraged position will continue to generate losses.
* <mark style="background-color:orange;">Potential slippage loss when using “Swap Mode” for deleveraging</mark>: when you use “Swap Mode” to lower leverage, the system will automatically complete the exchange in the Bifrost Stable Pool. Therefore, depending on the current liquidity situation, Swap may cause unpredictable slippage losses.

Please note, by using this function, **you are acknowledging and accepting the aforementioned risks.**
{% endhint %}

Youtube tutorial:

{% embed url="<https://www.youtube.com/watch?v=vPxXkkegNZ0>" %}
How does Loop Stake work ?
{% endembed %}

Loop Stake can be accessed through the main [DOT vStaking](https://app.bifrost.io/vstaking/vDOT) & [KSM vStaking](https://app.bifrost.io/vstaking/vKSM) pages. Click on the "**Loop Stake**" tab.

<figure><img src="https://757947912-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJFtVsA5N3spWTWKvFvv0%2Fuploads%2Fgj2vI6NYqO311hzCvSoS%2FCapture%20d%E2%80%99e%CC%81cran%202024-03-29%20a%CC%80%2018.19.40.png?alt=media&#x26;token=c3d06cc4-46d5-4605-b4a0-26c5e3a2ee39" alt=""><figcaption><p>Loop Stake feature page</p></figcaption></figure>

The screen can be divided in 4 main parts:

* **The lending market**: showing the total supply of DOT in the lending market versus the total borrow supply.

<figure><img src="https://757947912-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJFtVsA5N3spWTWKvFvv0%2Fuploads%2FWdVGFn2NExkPt9SBonxP%2FCapture%20d%E2%80%99e%CC%81cran%202024-03-29%20a%CC%80%2018.27.53.png?alt=media&#x26;token=ee324907-bb1d-45f1-9034-888c50f4d7bf" alt="" width="563"><figcaption><p>Market history</p></figcaption></figure>

* **The collateral position:** the collateralized position is the position which you are allowed to borrow against.

<figure><img src="https://757947912-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJFtVsA5N3spWTWKvFvv0%2Fuploads%2FJDXIedQkEbfXg0Oo1SZF%2FCapture%20d%E2%80%99e%CC%81cran%202024-03-29%20a%CC%80%2018.29.49.png?alt=media&#x26;token=7cc1763b-b50a-4e02-89ee-66cde7e821d9" alt="" width="563"><figcaption><p>Collateralized position</p></figcaption></figure>

* **The Loop Stake leveraging feature**: you can leverage/deleverage your position from here

<figure><img src="https://757947912-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJFtVsA5N3spWTWKvFvv0%2Fuploads%2FPxVB9qstO4oChTE1ea2k%2FCapture%20d%E2%80%99e%CC%81cran%202024-03-29%20a%CC%80%2018.35.16.png?alt=media&#x26;token=0e429ad7-52cb-4461-b1d9-3b229f33360d" alt="" width="563"><figcaption><p>Loop Stake leveraging feature</p></figcaption></figure>

* **Your position summary:** showing your LTV ratio, your collateral & debt amounts, and your Net value (the difference between your collateral value and your debt)

<figure><img src="https://757947912-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJFtVsA5N3spWTWKvFvv0%2Fuploads%2FUoVwCs9wRJzYvJn3UQyt%2FCapture%20d%E2%80%99e%CC%81cran%202024-03-29%20a%CC%80%2018.38.00.png?alt=media&#x26;token=95b53dd3-c105-407e-ae94-e41a5000df30" alt="" width="563"><figcaption><p>Loop Stake summary</p></figcaption></figure>

***

## Leveraging & Deleveraging

{% tabs %}
{% tab title="How to ? Leveraging " %}

* **Leveraging your vDOT position**

1\. Deposit your vDOT collateral. Click on "**Deposit**" and enter the vDOT amount you want to borrow against.\
If you have not borrowed any DOT yet: leverage will be 1x.

<figure><img src="https://757947912-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJFtVsA5N3spWTWKvFvv0%2Fuploads%2Fk6CeCUwX6FhBPPD4q7xq%2FCapture%20d%E2%80%99e%CC%81cran%202024-03-29%20a%CC%80%2018.53.42.png?alt=media&#x26;token=a96cba3b-4f2c-48fa-b8df-3b0d3fa9631d" alt="" width="563"><figcaption><p>Depositing vDOT as collateral to set up the loop</p></figcaption></figure>

\
If you already have a leveraged position: depositing more collateral will decrease your leverage (so as your LTV), reducing the risk.

<figure><img src="https://757947912-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJFtVsA5N3spWTWKvFvv0%2Fuploads%2FGwCADudvkAZWrsbCpBA6%2FCapture%20d%E2%80%99e%CC%81cran%202024-03-29%20a%CC%80%2018.44.33.png?alt=media&#x26;token=cecdcfee-22c8-492f-ae9d-c9eb620bd170" alt="" width="563"><figcaption><p>Depositing vDOT as collateral to reduce leverage</p></figcaption></figure>

2. Click on "Deposit", and sign the transaction in your wallet.

Your first vDOT collateral position is set:

<figure><img src="https://757947912-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJFtVsA5N3spWTWKvFvv0%2Fuploads%2FjCVwqFlNrynK0POPE71a%2FCapture%20d%E2%80%99e%CC%81cran%202024-03-29%20a%CC%80%2018.56.21.png?alt=media&#x26;token=65c6bb59-a2c3-435c-9e05-70f17667ca82" alt="" width="563"><figcaption><p>Collateral position after depositing 1st collateral</p></figcaption></figure>

3. Leveraging. Set the level of **Boost** you want to achieve from 1x to 4x.\
   More Boost = more risk (you can earn more but if the borrow APY becomes higher you can also lose more). Once carefully chosen, click on "**Boost**"

<figure><img src="https://757947912-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJFtVsA5N3spWTWKvFvv0%2Fuploads%2F6uDuvdF8XdguZiCjFfWF%2FCapture%20d%E2%80%99e%CC%81cran%202024-03-29%20a%CC%80%2019.04.09.png?alt=media&#x26;token=2c6707f7-0cff-45a7-9474-34ab4c124d17" alt=""><figcaption><p>Boosting your collateral position</p></figcaption></figure>

4. Review the impact of your Boost choice on the estimated APY and your LTV ratio.&#x20;

<figure><img src="https://757947912-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJFtVsA5N3spWTWKvFvv0%2Fuploads%2FhVymKQGvqz8boHdID2Ai%2FCapture%20d%E2%80%99e%CC%81cran%202024-03-29%20a%CC%80%2019.07.03.png?alt=media&#x26;token=27eae47c-edd3-47af-aafd-f7270a519edb" alt="" width="563"><figcaption><p>Boost review pop-up</p></figcaption></figure>

5. Click "**Boost**" and sign the transaction in your wallet.

Once the flash loan operation is confirmed, your overview situation is updated:

* vDOT collateral position increased
* Your leverage increased
* The global APY increased
* Your debt increased (Borrowed)
* Your LTV increased

<figure><img src="https://757947912-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJFtVsA5N3spWTWKvFvv0%2Fuploads%2FYPUkmtD4rMbctyBDxcNP%2FCapture%20d%E2%80%99e%CC%81cran%202024-03-30%20a%CC%80%2016.39.07.png?alt=media&#x26;token=aa1284e2-0e3f-491f-aaa1-d74f3631eaf1" alt="" width="563"><figcaption><p>Overview after leveraging with Loop Stake</p></figcaption></figure>

Your Net value will increase on a daily basis (as long as the borrow APY does not exceed the staking APY) with some jumps: vDOT ratio increases daily whereas your debt increases linearly.

You can choose to decrease your LTV, then just repeat the operation at steps 1-2.

You can choose to increase your leverage, then just repeat the operation at steps 3-5.

<mark style="background-color:orange;">Risk reminder:</mark> \ <mark style="background-color:orange;">High borrowing rates may lead to sustained losses: when the liquidity of the Token lending market is insufficient, the increase in borrowing rates may exceed the staking returns of your principal. In this case, your leveraged position will continue to generate losses.</mark>
{% endtab %}

{% tab title="How to ? Deleveraging" %}

* **Deleveraging your vDOT position**

Your initial position is as follows:

<figure><img src="https://757947912-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJFtVsA5N3spWTWKvFvv0%2Fuploads%2FO9J2LepRP00BY2D0CMVb%2FCapture%20d%E2%80%99e%CC%81cran%202024-03-30%20a%CC%80%2016.50.50.png?alt=media&#x26;token=c3cb5b21-3f3a-4b10-940c-f81bb42b8282" alt="" width="563"><figcaption><p>Deleveraging starting point position</p></figcaption></figure>

You have 3 options:

* Withdraw vDOT from your collateral position
* Deleverage
* Repay your debt<br>

**Withdrawing vDOT**

1\. You can withdraw vDOT from your collateral position at any time. The main consequences are:

* Your LTV & leverage will go up (more risks).
* Your collateral & Net value will go down
* Your debt is equal

2\. Click on "**Withdraw**"

<figure><img src="https://757947912-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJFtVsA5N3spWTWKvFvv0%2Fuploads%2FNtBmuGR1UduvvKauv99T%2FCapture%20d%E2%80%99e%CC%81cran%202024-03-30%20a%CC%80%2016.55.15.png?alt=media&#x26;token=c393b7ca-458b-40ea-8f81-877b1b40b663" alt="" width="563"><figcaption><p>Withdraw collateral</p></figcaption></figure>

3. Review the data, click "**Withdraw**" and sign the transaction in your wallet.

<figure><img src="https://757947912-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJFtVsA5N3spWTWKvFvv0%2Fuploads%2FpyAycf0zKtUeiFUJjGst%2FCapture%20d%E2%80%99e%CC%81cran%202024-03-30%20a%CC%80%2016.55.51.png?alt=media&#x26;token=3fe9d84e-d3fc-4055-b222-6c174c68d9fe" alt="" width="563"><figcaption><p>Impact on the position after withdrawing</p></figcaption></figure>

Your situation becomes:

<figure><img src="https://757947912-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJFtVsA5N3spWTWKvFvv0%2Fuploads%2FE9NvpFx2D2yM3pyVMIAM%2FCapture%20d%E2%80%99e%CC%81cran%202024-03-30%20a%CC%80%2017.01.10.png?alt=media&#x26;token=37537d6c-fd82-4a12-b2ba-f5393cc7cc4e" alt="" width="563"><figcaption><p>Situation after withdrawing vDOT</p></figcaption></figure>

\
**Deleveraging**

1\. You can deleverage your vDOT position at any time. The main consequences are:

* Your LTV & leverage will go down (less risks).
* Your collateral & Net value will go up
* Your debt will go down

2\. Set a lower value than your current leverage, here from 2x to 1.5x, and click "**Lower**"

<figure><img src="https://757947912-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJFtVsA5N3spWTWKvFvv0%2Fuploads%2FhI74OD9XNK59n3moEECo%2FCapture%20d%E2%80%99e%CC%81cran%202024-03-30%20a%CC%80%2017.08.31.png?alt=media&#x26;token=dab4bd92-01c9-4dab-b8aa-c6623e5090ac" alt="" width="563"><figcaption><p>Lower your leverage</p></figcaption></figure>

3. Option "**Swap mode**": This mode will swap your collateralized vDOT into DOT and repay your debt automatically and immediately.

<mark style="background-color:orange;">Risk reminder:</mark>\ <mark style="background-color:orange;">Potential slippage loss when using “Swap Mode” for deleveraging: when you use “Swap Mode” to lower leverage, the system will automatically complete the exchange in the Bifrost Stable Pool. Therefore, depending on the current liquidity situation, Swap may cause unpredictable slippage losses.</mark>

<figure><img src="https://757947912-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJFtVsA5N3spWTWKvFvv0%2Fuploads%2FPuWIDhN5Rsh9vS8sSAOQ%2FCapture%20d%E2%80%99e%CC%81cran%202024-03-30%20a%CC%80%2017.08.52.png?alt=media&#x26;token=5b924ea8-2cc8-4f96-b273-b1b677cb3394" alt="" width="563"><figcaption><p>Deleveraging - Swap mode</p></figcaption></figure>

4. Review the data, click "**Lower**" and sign the transaction in your wallet.

Your situation becomes:

<figure><img src="https://757947912-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJFtVsA5N3spWTWKvFvv0%2Fuploads%2FDhjadCRYCnVSysQldvQ9%2FCapture%20d%E2%80%99e%CC%81cran%202024-04-01%20a%CC%80%2019.42.26.png?alt=media&#x26;token=722f5448-6990-4c11-830d-f874b99eb5ca" alt="" width="563"><figcaption><p>Situation after deleveraging using Swap mode</p></figcaption></figure>

5. Option "**Redeem mode**": this mode is manual. You have to follow the described process by withdrawing vDOT from your collateralized position, unstake the vDOT (flexible unstaking period = 0 to 28d) and repay your DOT debt. Repeat this operation till you have no collateralized vDOT left.

<mark style="background-color:orange;">Risk reminder:</mark>

<mark style="background-color:orange;">Manual redemption may require a long waiting cycle: depending on your current leverage position, when manually deleveraging by using “Redeem Mode”, the redemption of vToken may require waiting for several months.</mark>

<figure><img src="https://757947912-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJFtVsA5N3spWTWKvFvv0%2Fuploads%2FIzKhdlRaaSiVNRQrNCIK%2FCapture%20d%E2%80%99e%CC%81cran%202024-03-30%20a%CC%80%2017.09.01.png?alt=media&#x26;token=1ef4d371-ca3c-4487-9b2a-a8783aa273dc" alt="" width="563"><figcaption><p>Deleveraging - Redeem mode</p></figcaption></figure>
{% endtab %}
{% endtabs %}

***

### Possible use case to use Loop Stake & mitigate the leveraging risk at the same time.&#x20;

If you want to exit Loop Stake instantly without using the Swap or Redeem mode :

1. Lend DOT in the Leverage farming pool in the [Farming](https://bifrost.app/farming) menu: **Earn yield on DOT**

<figure><img src="https://757947912-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJFtVsA5N3spWTWKvFvv0%2Fuploads%2FMxHr8FdxRAQhmp67TxUc%2FCapture%20d%E2%80%99e%CC%81cran%202024-04-01%20a%CC%80%2019.51.34.png?alt=media&#x26;token=a241ea31-fa92-4fd0-96be-64926d85d13d" alt="" width="354"><figcaption><p>Leverage pool</p></figcaption></figure>

2. Execute your vDOT leverage in Loop Stake by trying to have your DOT debt equal or inferior to your DOT deposited in the leverage pool: **Earn yield on vDOT**
3. When you want to deleverage, use the DOT in the Leverage pool to **repay your debt**.

NB: you can withdraw your DOT at any time as long as your position is less than the "Free" DOT in the pool. The free DOT are the DOT that are not borrowed by users of Loop Stake. \
In the case your position is higher than the free one, you have to wait users to deposit more DOT in the Leverage pool or users to repay their DOT debts.

<figure><img src="https://757947912-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJFtVsA5N3spWTWKvFvv0%2Fuploads%2FvcYhjRb7DGsL6NqB9u0v%2FCapture%20d%E2%80%99e%CC%81cran%202024-04-01%20a%CC%80%2019.57.19.png?alt=media&#x26;token=90c238e1-61ba-4e04-a073-51e2263748ec" alt="" width="563"><figcaption></figcaption></figure>
