Jump to content
Crypto Desk Report

Crypto markets, protocols and policy

ERC-20 Allowance Errors on Vault Deposits

An insufficient allowance error when depositing into a vault means the spender cannot pull enough tokens. Check the approved address and amount, then retry.

Crypto Desk Report Editorial#7555025 min read

ERC-20 Allowance Errors on Vault Deposits

An insufficient allowance error means you can usually fix the deposit by approving enough tokens for the contract that will pull them. Your tokens stay in your wallet when the deposit reverts, although the failed transaction costs gas.

An ERC-20 allowance is a spending limit you set for another address. When a vault deposit runs, the contract calls transferFrom to move tokens from your wallet. That call reverts if the amount exceeds the allowance for the address making the call.

What causes an insufficient allowance error?

The error means the spender’s allowance is too low for the attempted transfer. It can refer to the amount, the approved address, or when the approval became active.

Take a simple case: you approved 500 USDC, then tried to deposit 1,000 USDC. You may expect the approval to cover the deposit because it succeeded. But the contract can pull only up to the approved cap, so the deposit reverts. Your 1,000 USDC remain in your wallet; the failed transaction does not move them.

A wallet’s approval screen can set a lower cap than you intended. In MetaMask, for instance, you might choose a custom spending cap and approve it successfully, then enter a larger amount in the deposit screen. The approval worked, but the cap is still short. Compare the cap shown in the approval with the deposit amount before retrying.

The approved spender also has to match the address that pulls the tokens. Sometimes the app submits a deposit directly to the vault; sometimes it routes the transaction through a bundler or router. Approving the vault alone may not cover a routed deposit if the bundler or router is the spender. The reverse can happen too: an approval for a router will not cover a direct call that pulls from the vault address. Use the spender address shown for the transaction you are submitting.

That distinction matters when comparing how Morpho vaults compare with Aave: Morpho vaults and Aave use different deposit flows, and the spender shown by the app is the address to check for the transaction at hand. An allowance for one protocol or route does not automatically apply to another.

Timing can cause the same error. An approval is a separate transaction, and the new allowance is usable after that transaction confirms. Starting the deposit while approval is still pending can mean the deposit reaches the contract before the spending limit has changed. Wait for confirmation, then submit the deposit.

An allowance error is easy to confuse with a token balance problem. The balance is how many tokens your wallet holds; the allowance is how many the spender may take. A wallet can hold enough USDC for the deposit and still have too little allowance. Conversely, approving more does not add tokens to your balance.

How do you fix the allowance?

Check the allowance for the token and spender, approve enough for the deposit, wait for confirmation, and retry. On the token’s Etherscan page, look for the allowance information and confirm the spender address matches the vault, bundler, or router used in your deposit. The exact display can vary, so compare addresses rather than relying on a label alone.

  1. Confirm the token is the one you are depositing, such as USDC, and that your wallet balance covers the amount.
  2. Find the spender address used by the deposit route and check the allowance your wallet has granted that address.
  3. Submit a new approval for at least the deposit amount. If you use a custom cap, make sure it is not set below the amount you plan to deposit.
  4. Wait until the approval transaction confirms. Then retry the deposit for an amount within the approved cap.

Approving exactly the deposit amount limits what that spender can pull under the approval. A larger or unlimited allowance can avoid repeating approvals for later deposits, but gives the spender permission to pull more tokens, up to that cap. The trade-off is convenience against the size of the spending permission. Choose the cap you are comfortable granting to the address you have verified.

Related

Why does a vault deposit need two transactions?

A deposit can need two transactions because approval sets the token spending limit and the deposit uses that permission to transfer tokens. If the allowance is already sufficient for the same spender, another approval may not be needed. Otherwise, approve first, wait for confirmation, and deposit second.

Is an unlimited token approval safe?

An unlimited approval is a standing permission for the spender to pull tokens up to the token’s maximum allowance. It can make later deposits simpler, but it grants broader access than approving only the amount you need. Check the spender address and choose a cap that fits your intended use.

Before retrying, compare the deposit amount with the confirmed allowance for the actual spender. Approve the shortfall or the full amount for the correct address, wait for confirmation, and submit the deposit again.