# Withdraw

* In order to withdraw some assets from the Protocol, User has to have some assets deposited.
* User can make a request to the Withdraw method with the SRWA User Badge and the amount of assets that the User wants withdrawn.
* Protocol will first verify if the withdraws for that particular pool are locked. If the withdrawing is allowed, next thing the Protocol will verify is if there is enough liquidity in the Pool for the withdraw. Protocol will then verify if the user has enough assets deposited for the amount that they want to withdraw as well as if the Users withdraw will exceed maximal withdraw percent for that particular Pool.&#x20;
* Protocol will then calculate the price of the SD Token, Users accrued interest if there's any, total deposit balance of SD Token and the asset and Users balance in SD Token. After that, Protocol will update Protocol deposit balance and Users deposit balance in SRWA User Badge and transfer withdrawn assets to the Users wallet.

User can withdraw their deposited assets that are not used as collateral for a loan at any time. Withdrawing process is similar to borrow in terms of the validations that are needed to pass for the operation to be successful. So the first step is to check if there is enough available liquidity that the user can withdraw.&#x20;

In the next step, the protocol needs to check the maximal amount that the user can withdraw, which is users collateral divided by LTV:

withdrawable\_amount = user\_available\_collateral / asset\_ltv\_ratio

Same as with the borrow, the max borrow percent is checked in the withdrawal operation, except that here it's taking users borrow balance into account:

max\_borrow\_percent = pool\_deposit - user\_borrow / pool\_max\_borrow\_percent &#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://srwa.gitbook.io/srwa-docs/getting-started/how-it-works/withdraw.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
