# Withdraw Funds

#### Withdraw Funds From the Market

{% hint style="info" %}
To fully withdraw funds from all markets, all outstanding loans must be repaid.
{% endhint %}

> For these next steps, we'll be interacting with **Taiko**'s & **Morph**'s explorer using $**USDC**'s market address:

* **Taiko**: **`0xF89B01fa87a3E51BDA2dA67154Ea35A3F84eC373`**
* **Morph**: **`0x793ce6AC5112DA5Db9C046848af99C749e14b1A4`**

***

#### Get Your Balance for a Specific Market

{% hint style="success" %}
This part of the process won't require any transaction.
{% endhint %}

1. Locate the contract address for **the market** associated with your desired token in the smart contracts list provided in this guide.
2. Visit [Taiko](https://taikoscan.io)'s or [Morph](https://explorer.morphl2.io)'s blockchain explorer and input **the market contract address** chosen on the page's search field:<br>

   <figure><img src="/files/o8cdhZicU90RvH3EEqwp" alt=""><figcaption></figcaption></figure>
3. Go to the **Contract** section, open the **Read as Proxy** or **Read proxy** tab, then scroll down and choose the `balanceOf` function:<br>

   <figure><img src="/files/QV5sx1ufCTcQf6uqGiUV" alt=""><figcaption></figcaption></figure>
4. Paste your wallet's public address into the `owner (address)` input field and click **Query** or **Read**:<br>

   <figure><img src="/files/F9KUU47OOY6KlbntdyVS" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The result is an integer scaled by the underlying token decimals.
{% endhint %}

***

#### Redeem Tokens From the Market Contract

1. Go back to the **Contract** section, open the **Write as Proxy** or **Write proxy** tab, then click **Connect to Web3** or **Connect wallet**:<br>

   <figure><img src="/files/yncEZUNIXEROhXLenirc" alt=""><figcaption></figcaption></figure>
2. Locate and choose the `redeem` function, then enter the balance you got form using the `balanceOf` function in the `redeemTokens (uint256)` input field.
3. Click **Write**, then approve the transaction in the browser pop-up displayed by your wallet.

{% hint style="info" %}
You'll get an error if you're not holding enough of your inputted asset amount.
{% endhint %}


---

# 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://docs.minterest.com/taiko-morph-guide/withdraw-funds.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.
