For our swapping function we use a dex called 1inch

To be able to swap or trade tokens, e.g. ETH to USDC, you need to first approve 1inch to interact with your wallet.

Hence there are 2 steps:
Approve tokens to be spent (requires a small gas fee)
Swap the tokens (requires a relatively higher gas fee)

Chances are, if you are wondering why your ETH / MATIC has diminished while you haven't received the tokens you desired, then you probably only approved the tokens to be spent (step 1) and haven't done step 2 yet.

After step 1 is completed, you can continue to go and swap the tokens.

More info can be found here "Why do I need to approve my tokens before a trade?"
Was this article helpful?
Cancel
Thank you!