Original title: "Token Authorization: The biggest obstacle to user experience in the cryptocurrency industry"
Original source: Ethereum Enthusiast
If you are a deep user of DeFi, you must have been tortured by this cumbersome process countless times. Every time you use a new dApp, you need to authorize that dApp to spend your tokens.

- Metamask a>The authorization interface on -
Compared with the traditional financial industry, this process is a bit similar to handling direct debit, authorizing your power supplier every month Debit your electricity bill from your bank account.
However, unlike the cryptocurrency industry, the direct debit business in the traditional financial industry is only available to a small number of trusted companies. Such companies are less likely to deceive consumers, and even if they happen occasionally, consumers can raise objections and the bank acts as a mediator. The cryptocurrency industry has no such tools. Some dApps are built by anonymous developers with no dispute mechanism in place for scammed users. Once a payment is made on the blockchain, it cannot be reversed.
Most tokens on the Ethereum blockchain, such as USDC and DAI, use the ERC20 standard. ERC20 tokens are actually smart contracts that contain different methods like transferFrom and burn. When the user calls these methods, the application will perform corresponding operations on the token.
One of the methods is approve. Any dApp you want to use will need access to your ERC20 token in order to operate on it. For example, if you want to deposit USDC in Aave , you first need to authorize the Aave dApp smart contract to access USDC before depositing USDC into Aave through a second transaction. You can see this authorization on your Ethereum wallet UI. While license availability is theoretically flexible, most dApps will require unlimited licenses by default to simplify the user experience and minimize the number of transactions users need to make to use the app.
A security problem here is that most users think that their authorization is for a certain transaction, and it is limited, but in most cases, Users effectively grant the dApp permanent access to a certain token they hold, and that is unlimited. Therefore, if a dApp has security issues or is malicious from the start, an attacker can abuse this authorization to steal all authorized tokens held by a dApp user without the user's consent. This attack can be launched at any point in the future, even years after the user has used the dApp.
How to protect yourself? The good news is that you can protect yourself from these kinds of threats. In the next section, we'll explore how you can keep your tokens safe when using a standard Ethereum wallet like Metamask, and introduce some wallets that can be customized to interact with dApps.
If you want to revoke authorization manually, you Tools like Token Allowance Checker are required. Such tools connect to your wallet and scan the entire blockchain for all dApp authorizations associated with your Ethereum address. You can then edit the entitlement: set the entitlement available amount to 0 to cancel the entitlement, or set it to an acceptable amount. Authorization modifications are implemented by interacting with individual ERC20 token contracts.

It is a good idea to go through this process on a regular basis to deauthorize dApps that you no longer intend to use. While this will cost you a little as every transaction needs to be settled on-chain, in the long run your wallet will give you what it deserves.
Suggestion: If you want to save gas costs, you can download Gas Station Network extension to track gas prices on your browser. You can wait to edit your license availability until gas costs are lower.
Some smartphones that have been launched The contract wallet also has protection functions. The smart contract wallet has strong flexibility and can provide users with customized smart contract interaction methods. Therefore, many smart contract wallets have implemented customized authorization methods to improve user experience and security.
Native Integration: Taking Argent as an Example
For example, Argent is a mobile Ethereum wallet, which has integrated some The core DeFi application is natively integrated into the application so that users can borrow, earn income and trade.
This type of wallet integrates these dApps from the smart contract level and ensures that when users interact with these dApps, these dApps can only be authorized by the actual request amount . This all happens automatically in the background, so Argent users don't even know that authorized transactions exist.

Argent x Wallet Connect
One disadvantage of native integration is that it is not scalable, just like Argent It is impossible for an application to natively integrate every DeFi protocol. For most users, Argent's currently integrated applications may be sufficient, but heavy DeFi users use more than a dozen different dApps every day, and don't want to be limited to a few dApps.
A standard called WalletConnect solves this problem. WalletConnect allows users to connect their mobile wallets to web applications and securely sign transactions through the mobile wallet. Argent has realized the customization of WalletConnect integration, allowing users to easily set the amount of authorization available (say goodbye to unlimited authorization). Additionally, if an Argent user changes their mind, they can deauthorize a dApp with one click in the Argent app. Since most dApps support WalletConnect, this feature allows Argent users to enjoy a high level of security while exploring the entire DeFi space.

Batch transactions and dApp keys: Take Authereum as an example< /p>
Another smart contract wallet that handles authorization gracefully is Authereum. Authereum is web-based and supported by most Ethereum dApps. In addition, Authereum uses traditional email and password login, so you can connect your wallet to dApp in seconds, and the user experience is similar to traditional applications without sacrificing security.

When the user needs to interact with the dApp, Authereum will generate a new temporary dApp key to sign the transaction of the specific dApp. The dApp key can only perform limited functions, and Authereum will perform some integrity checks. Authereum can intercept the transaction or notify the user if the domain originating the request is not the domain that created the dApp key. Finally, these dApp keys can be deleted from the Authereum wallet at any time.

Packing multiple transactions into one transaction has many other advantages. One of the advantages is efficiency - batching transactions saves cost and time. Each normal transfer transaction on Ethereum consumes 21,000 gas. If the user packs 10 transactions at a time, a total of 189,000 gas can be saved. Also, users can try to save time by sending consecutive transactions.
The only problem with batching transactions is that dApps need to add some custom logic and UI flow to process transactions properly. So far, only a few dApps such as 1inch and Erasure support this transaction mode, but we expect that there will be more More dApps support this transaction mode.
Conclusion
Standard Ethereum wallets that cannot accommodate the above solutions should at least allow users to view and edit their dApp token authorization availability. Tools like Token Authority Checker are handy, but not every user knows about them.
Original link< /a>
Welcome to join the official BlockBeats community:
Telegram Subscription Group: https://t.me/theblockbeats
Telegram Discussion Group: https://t.me/BlockBeats_App
Official Twitter Account: https://twitter.com/BlockBeatsAsia