YAD docs
Launch App
  • Introduction
    • Key features
    • Use cases
  • Getting started
    • Wallet creation
    • How do I get crypto to start trading?
    • Wallet connection
    • Token approval
    • Making a swap
    • How to check your transaction in blockchain
  • Swap modes
    • One-Track Swaps
    • Chain-Hopping Swaps
    • Diamond Mode
  • Architecture
    • Smart contracts
    • Proxy addresses
    • Request for Quote (RFQ)
  • Integration Guides
    • One-Track Swaps API
      • Getting started
      • Use cases
      • Endpoint list
      • Swagger documentation
    • Cross-Chain Swaps API
      • Getting started
      • Use cases
      • Endpoint list
      • Swagger documentation
    • Widget
      • API key management
      • Integration flow
  • Security
    • Smart contract audit
  • Contact us
    • Further support
  • Knowledge base
    • Glossary
    • Basics
      • What is gas price?
      • What is price impact?
      • What is slippage?
      • What is the fee structure?
Powered by GitBook
On this page
  • Why do I need to approve the use of my tokens before I can trade them?
  • How do I approve a token?
  1. Getting started

Token approval

PreviousWallet connectionNextMaking a swap

Last updated 1 year ago

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.

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.

How do I approve a token?

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.

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.

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

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

If you want to learn more about token approvals and how you can manage the approvals you've already granted, you can read by .

this article
Etherscan