How to revoke smart contract

91by...dTqQ
16 Jan 2024
36


Smart contract/token allowances, also referred to as approvals, involve you allowing dapps to access and move tokens in your wallet on your behalf. When you use a DEX (decentralized exchange), for example, you'll need to sign an approval that allows its smart contract to take tokens to complete your requested trades. Whilst this sounds inherently risky, bear in mind that giving dapps at least some allowance is always necessary. If you want to use Web3, you won't be able to avoid them. 

Revoking approvals vs. disconnecting apps: what's the difference?

It's easy to confuse these two processes, but they are fundamentally different:

Disconnecting your wallet from a dapp involves cancelling permission for it to see your public address and your token balances, and, depending on what you originally consented to, stopping it from initiating transactions (although not executing them) and viewing past activity. See our article for more info.

Revoking an approval/allowance means a dapp can no longer access the contents of your wallet and move them around. 
See also: our Twitter thread covering the distinction between these two actions, and our article on token approvals. 


How do I revoke approvals?

Revoke your token allowances in MetaMask Portfolio

We've added a feature to MetaMask Portfolio that allows you to view allowances and submit revocation transactions directly within the dapp. It's available on Ethereum mainnet.
To learn more, see our separate article here.
The good news is there are several ways to keep track of your existing approvals and easily revoke them:
Head to the 'approval checker' section of the block explorer for the network you're using. For example, Etherscan, BscScan and Polygonscan all have a token approval checker function.

Use a platform such as:
Revoke (Many networks)
Unrekt (multiple networks)
approved.zone (Ethereum mainnet)
Cointool (multiple networks)
beefy.finance (BSC/BNB Smart Chain)
EverRevoke (multiple networks).

Use MetaMask to overwrite existing token approvals by sending a new approval transaction with the same token details and nonce as the previous approval. See our article for more information on how to do this.
Gas fees are required for token approvals and revoking approvals, as these actions are conducted on-chain. It is important to regularly check your token approvals due to the risk of both hackers and scammers. Hackers can exploit vulnerabilities in smart contract code, as seen with the Wormhole bridge. Scammers can also perform rugpulls to drain your wallet of tokens that you have granted access to. Regular monitoring can help mitigate these risks associated with token approvals.


Source: https://support.metamask.io/hc/en-us/articles/4446106184731-How-to-revoke-smart-contract-allowances-token-approvals

Get fast shipping, movies & more with Amazon Prime

Start free trial

Enjoy this blog? Subscribe to byumurtaci

0 Comments