🪙Approving Tokens

The first time you use a token on Maverick, you will be asked to approve it in your wallet. Approving tokens is a normal security feature in cryptocurrency wallets, and requires you to approve the use of each token you hold in the wallet by the smart contract you're interacting with. You will need to approve each token individually before you can use it.

Action buttons like Swap and Confirm will display as Approve [token] if any token(s) need to be approved before the action can be taken.

Approval limits in Metamask

In March 2023, the Metamask software wallet changed how it handled approval requests. Metamask now requires users themselves to specify exactly how much of a given token they want to approve for use on each smart contract. In the Metamask wallet, this is called an allowance. Previously, a dApp could send a precise request for the amount required, or even just request an unlimited approval on a token. For more information on the update to Metamask, click here.

This now means that users may experience transaction failure on Maverick if their token spend request exceeds the approval they previously set in Metamask. For example, if a user previously set the Metamask allowance to 1 ETH and they try to swap 1.1 ETH, their transaction will fail because the token spend exceeds the approval they set.

Because Metamask does not allow Maverick's dApp to pass precise requests to it, you will need to set allowances yourself when approving tokens in Metamask. Maverick has done it's best to simplify this process by indicating in the UI how much you need to approve in Metamask.

In the screenshot above, right beneath the Approve SAND button we can see two information fields: Current Allowance and Minimum Allowance:

  • Current Allowance indicates the amount of the token (here, SAND) that you currently have approved in Metamask

  • Minimum Allowance indicates the minimum amount you need to approve in order for this transaction to succeed

The Maverick dApp automatically includes a 1% buffer in the Minimum Allowance figure in order to ensure your transaction will go through. It is highly recommend that you approve at least the Minimum Allowance if you want to ensure your transaction is successful.

Metamask is currently iterating how they handle spending limits in their UI. While Maverick is doing its best to keep up to date with updates to the Metamask UI, the screenshots below may not always reflect the current Metamask UI for this workflow.

When you click the Approve button, Metamask will open with an approval request like the one pictured above. As we can see, Metamask is asking us to define a custom spending cap. The easiest thing to do is to use the Minimum Allowance specified in Maverick's UI, but of course you can also choose to approve a higher amount if you want (or even click Max, which will make the spending cap equal to the amount of tokens you currently have in your wallet).

Once you've specified the custom spend limit, you can click Next and then confirm the approval in Metamask. At this point, we can confirm our swap and it should execute as expected.

Resetting approvals in Metamask

If you have previously set an approval limit in Metamask and are trying to make a new transaction that will exceed that limit, you may need to reset your approval in Metamask. In order to do this, you will need to revoke the original approval. This can be accomplished using a tool like Revoke, which will show you all of the approvals on a connected wallet and let you revoke them one by one. Then you can re-approve the token on Maverick using a different limit.

Last updated