Can you please specify the version of Brave you’re on? You can find this info by going to brave://version (please paste here the fields Brave and Revision).
I’m going to answer Question 2, and then Question 1 to tie things together.
Re Question 2:
This has to do with the way Ethereum-based blockchains work. You can’t “send” tokens to a smart-contract (in this case 0x Exchange Proxy), rather you need to allow the contract to spend your tokens.
Before you do a swap transaction, you therefore need to let 0x Exchange Proxy (the swap router we use) to spend your USDC balance, which is what the “Approve” transaction in the screenshot does. Note that this is only an approval, and not the real swap transaction as you probably figured.
For most users, an Unlimited approval makes it a one-time affair, so they don’t have to keep doing approval transactions every time they want to swap. For the more security conscious folks, the approval amount could be customised to whatever you want. Here’s how you do it.
ERC20 Approval Transaction
Custom approval amount
(click on Edit Permissions in the above screen)
|
Re Question 1
Now that we know what’s the purpose of the “unlimited usdc permission” transaction, it seems what happened in your case is that you didn’t wait for the first approval transaction to confirm on etherscan, and hence did a second approval transaction thinking it didn’t go through. No harm done, other than the gas fee being spent twice. If you try to do the swap again, you’ll be able to complete it now.
I also realise that the UX is a bit confusing here, which is something we can improve. For example, as soon as user clicks on the “Confirm” button on an “Approval transaction”, we can indicate in the UI that user should wait until it’s successful.
Footnotes
EtherScan has a nice tool to check existing token approvals and optionally revoke them: https://etherscan.io/tokenapprovalchecker
Hope this answer helped. Please let me know if you have any other questions.