Skip to main content

Why should I unlock a token before swapping?

Unlocking a token and swapping are two separate transactions: you first need to unlock the token and then submit the swap.

Updated over a month ago

Tokens swapped on Velora follow a special standard called the ERC-20 standard. For a smart contract like Velora's to interact with an ERC-20 token, you must approve the amount of tokens the Velora contract can use from your wallet.

To do this, you must first do an ‘unlock’ transaction, which allows you to specify how many tokens this contract can use. In Velora, you can unlock a token permanently or only for the current transaction. If you unlock it permanently, you won’t need to do it again the next time you swap the same token.

You must submit a transaction or sign a message depending on the token you are unlocking. If the token supports EIP 712 permit-signed approvals, you can unlock it with the Permit function, which does not require gas. If the token does not support EIP 712 permit-signed approvals or if you are placing a limit order, unlocking your token has to be done through the Approve function, which incurs gas fees.

This allowance can be revoked at any moment. If so, you must allow it again the next time you wish to swap this token.

Unlocking a token and swapping are two separate transactions: to swap, you first need to unlock the token if you haven't done so before and then submit the swap. Please take a look at the swap step-by-step guide to learn how to swap on Velora.

Permanent token approval needs to be done for each Velora version.
As the Augustus V6 version has now released, you might need to approve tokens you already approved for Augustus V5.

Did this answer your question?