> For the complete documentation index, see [llms.txt](https://docs.idle.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.idle.finance/other/guides/redeem-funds-smart-contracts.md).

# Redeem funds through smart contracts

Other > Guides > Redeem funds through smart contracts

This tutorial will guide you in the process of redeeming funds from Idle directly from the smart contracts in case the website has limited access or is down.&#x20;

### A. Redeem

1. Visit the vaults' addresses of [Best Yield](/developers/best-yield/deployed-contracts.md) and [Yield Tranches](/developers/yield-tranches/deployed-contracts.md) and select the one you want to redeem from. For YTs, you need to always use the contract tagged as *CDO*
2. Click on the *Contract* tab, and then on *Write as Proxy*
3. Click on *Connect to Web3* to connect your wallet
4. Select the function [`redeemIdleToken`](/developers/best-yield/methods/redeemidletoken-1.md) for BY or [`withdrawAA`](/developers/yield-tranches/methods/withdrawaa.md), [`withdrawBB`](/developers/yield-tranches/methods/withdrawbb.md) for YTs (where AA stands for Senior and BB for Junior)
5. Input the LP token amount you want to redeem unit converted. You can use [this tool](https://etherscan.io/unitconverter) to easily convert in multiple formats. Idle LP tokens have always 18 decimals (10^18).&#x20;
6. Click on *Write* and execute your Tx. If successful, you will see an outflow of the LP token selected and an inflow of the principal token.

<figure><img src="https://4022236167-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lw-v0NTae0RVW1spR9R%2Fuploads%2FeEjLijLJIhnOiKf123io%2FwithdrawAA.png?alt=media&amp;token=a3d026b8-418f-49f4-a4b4-9196dc2163be" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The same process can be done through a multisig, i.e. a smart contract, by building the Tx using the *Transaction Builder* app. Safe fetches automatically the proper ABI of the contract.
{% endhint %}

Need further help? Check our [guides](/other/guides.md) list or get in contact on [Discord](https://discord.com/invite/mpySAJp).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.idle.finance/other/guides/redeem-funds-smart-contracts.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
