# Rebalancing strategies

This page describes how you can manually rebalance the strategies incase their health factor goes down.

Also, you can check out the Status Risk-engine/Pricer service: [status.troves.fi](https://status.troves.fi/)

## **How to manually check health factors:**

Open below links, scroll down to see `health_factors` and click query:

1. STRK Sensei (DeltaNeutralLoopingSTRKETH) - <https://voyager.online/contract/0x020d5fc4c9df4f943ebb36078e703369c04176ed00accf290e8295b659d2cea6#readContract>&#x20;
2. USDC Sensei (DeltaNeutralLoopingUSDCETH) - <https://voyager.online/contract/0x04937b58e05a3a2477402d1f74e66686f58a61a5070fcc6f694fb9a0b3bae422#readContract>
3. ETH Sensei (DeltaNeutralLoopingETHUSDC) - <https://voyager.online/contract/0x009d23d9b1fa0db8c9d75a1df924c3820e594fc4ab1475695889286f3f6df250>

### Steps to query:

1. On the contract page, scroll down to the "Contract Data" section.
2. Click on "Read Contract"
3. Go to `health_factors` and click on it.
4. Select "Decimal" for response format.
5. Finally, click on "Query," and you will see two numbers as output, as shown in the picture below:

<figure><img src="https://544104674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpPQw6sLqPpeJkiKP4Ai5%2Fuploads%2F0JQU2yqlShscFUKfPtPc%2Fimage.png?alt=media&#x26;token=8d33b827-3a87-46af-9a75-8fccb9e0a8f8" alt=""><figcaption><p>image from voyager</p></figcaption></figure>

### Interpreting Health Factors:

Here, the first number is the health factor of zkLend. Second is Nostra's.

<figure><img src="https://544104674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpPQw6sLqPpeJkiKP4Ai5%2Fuploads%2Fer2fsPwPtRGs5AI21qEH%2Fimage.png?alt=media&#x26;token=b1ff8994-e430-40b9-9468-5308d4ab38aa" alt=""><figcaption></figcaption></figure>

### About Health factors:

1. All > 12000 -> Safe
2. At least one between 11500 - 12000 -> Warning
3. At least one below 11500 -> **Danger**

## How to manually rebalance?

Open the "Write Contract" tab and go to `rebalance` function. Also, make sure you connect your wallet!&#x20;

<figure><img src="https://544104674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpPQw6sLqPpeJkiKP4Ai5%2Fuploads%2FtrYtPnsdQp8t2wSJb4kM%2Fimage.png?alt=media&#x26;token=451c4ba1-6347-48dd-9eb0-62df48e802e9" alt=""><figcaption></figcaption></figure>

It takes two parameters:

1. `shouldRepay`: Write "1" if zkLend health factor is low or "0" if Nostra health factor is low (i.e. < 13000). You get this number by querying the `health_factors` as mentioned [above](https://docs.strkfarm.xyz/p/developers/rebalancing-strategies#interpreting-health-factors).
2. `amount`: You get this number via trial and error. Can start with 1 ETH (i.e. 1000000000000000000). Use this tool: [https://eth-converter.com](https://eth-converter.com/). Try submitting the transaction by clicking on "Transact" button and your wallet extension will throw an error if its an incorrect value. Depending on the error, you should choose one of the two options:
   1. **If `shouldRepay` is 1:** Increase the value (eg. 1.1 -- 1.2 ETH or more) if the error is zkLend low health. Decrease the amount if Nostra is low health.
   2. **If `shouldRepay` is 0**: Decrease the amount if the error is saying Nostra low health (eg, 0.5-0.7 ETH). Increase the amount if zkLend has low health.
