What is an Approve transaction?
ERC-20 tokens cannot be directly included with a contract call due to the technical limitations of the protocol. Instead, depositing ERC-20 tokens is a multi-step process: first, the user creates an initial transaction and authorizes the contract to withdraw funds on their behalf (an Allowance / Approve transaction). This is followed by the actual DeFi operation (e.g. token swap) in which the smart contract withdraws the required amount of funds.
Typically, creating an Approve transaction from a dApp permits withdrawing the maximum amount of funds possible. The DeFi contract is then allowed to withdraw an unlimited amount of tokens for the user. This reduces the need to create additional Approve transactions in the future but could pose a potential security risk.
Overview of the Amount Cap
The Amount Cap limits the amount smart contracts and third-party apps may withdraw on your behalf. This reduces the risk associated with granting an unlimited approval amount. Transaction amounts are then automatically changed from the maximum amount to the user-specified limit for all Approve transactions created with dApps.
The cap you set is enforced based on the dollar value of the token, as listed on CoinMarketCap. If a token has no dollar value, the capping will not be executed.
Setting the Amount Cap
- Select Settings .
- In the General tab, select Set Amount Cap under 'Approve' Transactions - Amount Cap.
- Enter the desired amount, and select Confirm.
After granting approval to a specific dApp to move ERC-20 tokens on your behalf, you may want to revoke that grant in order to reduce the risk associated with it. This can be done by sending a new approve transaction with an amount of 0. You may use this tool to do so, using the WalletConnect integration with Fireblocks.