Custom Token Spending Limits in MetaMask
Set custom token spending limits in MetaMask by editing the approval cap, confirming the spender, and verifying the allowance on-chain.
Cryptons Newsroom5 min read
To set a custom token spending limit in MetaMask, edit the cap in the ERC-20 approval request, enter the amount you intend to authorize, review the spender, and confirm. A token allowance is the amount of an ERC-20 token a spender contract can move from your account through approved transfers.
The token contract enforces the allowance. A limited approval caps authorized spending; a larger allowance permits more cumulative spending. Start with the approval request open, and make sure MetaMask shows the account you intend to use and that it has enough of the network’s native token to pay gas.
What should you confirm before setting a 50 DAI cap?
Before approving, confirm the network, token, spender, and amount match the deposit you intend to make. These details identify which token contract is being approved and which contract can use the allowance.
Imagine you plan to deposit 50 DAI. Confirm that the request is for DAI on the intended network and that the spender is the contract handling that deposit. A familiar website name alone is not enough: the spender address in MetaMask is the contract that receives permission, so compare it with the address shown for the transaction you initiated.
A common mistake during a bridge deposit is to approve a token or network that does not match the transfer. For a supported ERC-20 transfer, blastbridge.org lets you approve the token spending requested by Blast Bridge and continue with the bridge action. The approval applies to that token on that network; a native ETH transfer uses a different permission model and does not use an ERC-20 allowance.
How do you set and verify the custom allowance?
Use these steps with the approval request already open:
- Start with the correct account and network selected in MetaMask, and keep enough native tokens in that account to pay the approval transaction’s gas.
- Edit the cap with the pencil icon or custom-value control in the approval request, then enter 50 DAI for the hypothetical deposit. Confirm the displayed token and amount before moving on.
- Review the spender address and network in the request. Make sure the spender is the contract for the deposit you started, rather than relying on the website connection as proof.
- Confirm the approval in MetaMask. The transaction must be included on the network before the token contract records the new allowance; a pending transaction or a transaction that reverts has not completed the change.
- Verify the confirmed allowance for your account and that spender before depositing. The allowance should equal 50 DAI before you use it.
The approval transaction changes the on-chain allowance only after it is included. Network congestion or a gas setting that leaves the transaction pending can delay that change. If the transaction fails, inspect its status and submit a new approval only after you have checked the request again.
The number you enter replaces the existing allowance; it does not add to it. If the spender already has an allowance of 20 DAI, approving 50 DAI sets the allowance to 50 DAI, not 70. That distinction matters when you mean to authorize a total cap of 50, rather than an extra 50 on top of what remains.
Under the ERC-20 specification, approve sets the spender’s allowance, and allowance(owner, spender) reads the remaining amount. After the approval is confirmed, read the allowance for your account and the reviewed spender. If the value differs from 50 DAI, do not make the deposit until you understand which approval or spending transaction changed it.
What happens to MetaMask approvals after you disconnect?
Does disconnecting MetaMask revoke approvals?
No. Disconnecting a website removes its connected access to MetaMask, but existing token allowances stay active on-chain. Revoke an allowance separately if you want to remove it.
Do ERC-20 approvals expire?
Standard ERC-20 allowances have no built-in expiry. They remain available until spending reduces them or a later approval changes them.
Other questions about ERC-20 approval limits
How do I revoke a token allowance?
Use a wallet or allowance-management tool that can submit an approval setting the spender’s allowance to zero. Confirm the token, network, and spender, then pay gas and verify the updated allowance after the transaction is included.
Why does a token require approval to zero first?
Some tokens require the current allowance to be set to zero before another nonzero value can replace it. If MetaMask or the transaction indicates that requirement, confirm the spender and submit the zero approval first, then set and verify the intended amount.
How are Permit2 limits different?
Permit2 uses a separate permission system for token transfers and may involve signed permissions with their own amounts or durations. This process covers ordinary on-chain ERC-20 approve calls, not permit signatures.
Can a hardware wallet change the spending cap?
The cap is set in the approval request before signing. A hardware wallet can sign the transaction that carries that approval, but check the amount and spender in MetaMask before you confirm on the device.