# How to Edit Collateral

Health Ratio can go up and down. It depends on the price of collateral and market.

* In case Health Ratio is too good, for example: heath ratio is above >6, then you want to **withdraw** collateral to optimize asset
* Conversely, if health ratio is near to Liquidation Threshold, then you want to **deposit** more asset to avoid liquidation

**Step 1:**

For both Deposit & Withdraw, go to "Loan" page, look for the contract you want to deposit/ withdraw, then click "Edit" button

<figure><img src="https://ensofi.gitbook.io/~gitbook/image?url=https%3A%2F%2F37746291-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FBocrA55OwvtzftAzltCz%252Fuploads%252FhNKTwEHIUdWDSAhxRzx2%252FScr%25206.0%2520%281%29.png%3Falt%3Dmedia%26token%3Da9d044e1-4371-4d14-a022-8f3c02efaaf8&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=62582f00&#x26;sv=2" alt=""><figcaption></figcaption></figure>

**Step 2:**

* There will be a popup for you to edit collateral amount

**For Deposit**

* To deposit, you can enter total collateral amount ( including deposited collateral)

<figure><img src="https://ensofi.gitbook.io/~gitbook/image?url=https%3A%2F%2F37746291-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FBocrA55OwvtzftAzltCz%252Fuploads%252FSIA9CZrh8XI66XanLNWe%252FScreenshot%25202024-04-21%2520at%25204.10.38%2520PM.png%3Falt%3Dmedia%26token%3D1a534924-8be2-4045-bb3d-1a266f49cd7a&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=bb1daa40&#x26;sv=2" alt=""><figcaption></figcaption></figure>

For example:

* As the image above, total deposited Solana is 3 SOL
* To deposit more 2 SOL, you can enter 5 in the box.
* The system will automatically calculates new heath ratio and amount that you want to add more

<figure><img src="https://ensofi.gitbook.io/~gitbook/image?url=https%3A%2F%2F37746291-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FBocrA55OwvtzftAzltCz%252Fuploads%252FuXZWBcXyi41dABSoTrXE%252FScreenshot%25202024-04-21%2520at%25204.10.03%2520PM.png%3Falt%3Dmedia%26token%3D9f40e5e0-32fc-40ee-b314-33cb6c4c6abe&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=b9d7b7e8&#x26;sv=2" alt=""><figcaption></figcaption></figure>

* After that, click "Deposit" to submit your transaction

**For Withdraw**

* To withdraw, you can enter total collateral amount ( including deposited collateral)

<figure><img src="https://ensofi.gitbook.io/~gitbook/image?url=https%3A%2F%2F37746291-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FBocrA55OwvtzftAzltCz%252Fuploads%252FR7kKYIneu7im5QKjT46h%252FScreenshot%25202024-04-21%2520at%25204.13.47%2520PM.png%3Falt%3Dmedia%26token%3De5c90816-b445-4da4-ae76-0ca516eb5529&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=c46b067d&#x26;sv=2" alt=""><figcaption></figcaption></figure>

For example:

* As the image above, total deposited Solana is 3 SOL
* To withdraw 1 SOL, you can enter 2 in the box.
* The system will automatically calculates new heath ratio and amount that you want to withdraw

<figure><img src="https://ensofi.gitbook.io/~gitbook/image?url=https%3A%2F%2F37746291-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FBocrA55OwvtzftAzltCz%252Fuploads%252Fz1hasdKqcUEe5BSuegD6%252FScreenshot%25202024-04-21%2520at%25204.15.55%2520PM.png%3Falt%3Dmedia%26token%3Dce7504f1-5fdc-4576-9cde-51d08dbe7fc7&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=a928dd87&#x26;sv=2" alt=""><figcaption></figcaption></figure>

* After that, click "Deposit" to submit your transaction
