> For the complete documentation index, see [llms.txt](https://docs.yad.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yad.finance/getting-started/token-approval.md).

# Token approval

## Why do I need to approve the use of my tokens before I can trade them?

If you want to swap your token, keep in mind that YAD's smart contracts, like all others, need to get approval in order to be able to use your tokens to swap them. It is a necessary procedure for all the smart contracts that interact with tokens.

The approval procedure requires you to specify the maximum number of tokens that you allow the smart contract to use. In the wallet form you can set some custom spending cap or use default spending limit, which sets the maximum possible value.

It is also important to note that approval transaction has its own cost, since this is a separate transaction and gas is needed to complete it.&#x20;

{% hint style="info" %}
If in the future you need to increase the allowed spending cap, then you will have to initiate another approval transaction. Therefore, for smart contracts you trust, we recommend using the default spending limit, which sets the maximum possible value. This way you can avoid extra transaction costs.
{% endhint %}

## How do I approve a token?&#x20;

Actually, this procedure is quite easy. Here's a step-by-step guide on how to do this:

1\) First of all, click on the green button to allow to use required token.

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

2\) You will be redirected to your wallet. Here you can enter custom spending cap, but we recommend to use default value for YAD's smart contracts to avoid making extra transactions in the future.

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

3\) You will see the token amount that YAD's contract is allowed to use. Click "Next" to proceed.

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

4\) This is the final step. Click on the "Approve" button to execute an approval transaction.

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

{% hint style="info" %}
If you want to learn more about token approvals and how you can manage the approvals you've already granted, you can read [this article](https://info.etherscan.com/tokenapprovals/) by [Etherscan](https://etherscan.io/).
{% endhint %}


---

# 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 dynamically by asking a question.

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

```
GET https://docs.yad.finance/getting-started/token-approval.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
