Spending cap vs wallet balance: which limits a token pull?
Spending cap vs wallet balance: a dapp can take only the lower amount now, but later deposits can become available under the same approval for each token and spender.
By Blockchain Today Editorial4 min read
A dapp can pull only the lower of your ERC-20 allowance and token balance when it calls transferFrom, because the transaction reverts if either amount is short. A 1,000 USDC cap with 200 USDC in your wallet means up to 200 USDC is takeable now. After you deposit 5,000 USDC, the same approval can let the dapp take up to 1,000 USDC.
The lower amount sets your current ERC-20 exposure
For each token and spender, takeable now = min(allowance, balance). The unit is the token amount: an allowance of 1,000 USDC and a balance of 200 USDC yields 200 USDC of current exposure. The wallet balance is the amount you hold; the allowance is the amount the spender is permitted to transfer. Both conditions have to be met for a transferFrom pull to succeed.
That distinction matters because the two figures can move for different reasons. Your balance changes when tokens arrive or leave your wallet. Your allowance changes when you set, spend, edit or revoke the approval. Looking only at the balance tells you what is in the wallet now, while looking only at the cap can overstate what the spender can pull at this moment.
In the 1,000 USDC cap case, a 200 USDC balance is the binding limit. The other 800 USDC of allowance is unused permission, not tokens the contract can pull out of an empty balance. Once a 5,000 USDC deposit arrives, the balance is no longer the binding limit: the 1,000 USDC allowance is. The spender can then transfer up to that remaining cap without another approval prompt.
Allowances are per token and per spender. A 1,000 USDC approval for one contract does not set a 1,000 USDC cap on a different token or automatically grant that same allowance to another contract. Each approval has its own balance-and-allowance calculation. When reviewing exposure, match the token, spender and remaining allowance rather than treating all approvals as one wallet-wide limit.
Does a spending cap reset after the dapp uses it?
A finite ERC-20 spending cap falls as the spender pulls tokens: a successful 100 USDC transfer from a 1,000 USDC allowance leaves 900 USDC of allowance. The remaining exposure is then the lower of that 900 USDC and the wallet’s current USDC balance. A spent amount does not refill the approval by itself; a later deposit raises the balance, while a new approval or edit changes the allowance.
Does a spending cap apply across different tokens?
No: an ERC-20 allowance is for a particular token and spender, so calculate the lower amount separately for each pair. USDC and another token each have their own balance and allowance. Their takeable amounts are not combined into one cap, even when the same contract is approved to spend both.
Unused allowance can expose tokens that arrive later
A later deposit, airdrop, payment or exchange withdrawal can become takeable at once, up to the unused allowance for that token and spender. In the earlier case, if 200 USDC is pulled from a 1,000 USDC allowance, 800 USDC of allowance remains. If 5,000 USDC later arrives, up to 800 USDC can be pulled under that existing approval, without a new prompt. The approval persists as permission even while the wallet balance changes.
That continuing permission is the reason current exposure and future exposure differ. Current takeable amount uses today’s balance; the remaining cap also indicates how much could become takeable if enough of that token arrives. A wallet with a low balance can therefore have modest immediate exposure and substantial exposure to future deposits under the same approval. Reviewing the cap alongside the balance gives a more useful picture than either figure alone.
Approval management tools give a way to inspect that permission and adjust it. revokecash is a concrete example: its token approval management feature lets you inspect and manage the caps granted to smart contracts. To reduce the amount a spender can take, edit the allowance downward or revoke it in revokecash. Lowering the cap reduces the amount that future token arrivals could make available under that approval.
NFT approvals use a different model. An ERC-721 setApprovalForAll grants an operator approval over every NFT in that collection held by the wallet; it has no amount field to set as a cap. The exposure is therefore every token in that collection, rather than the lower of an allowance amount and a token balance. Reducing an ERC-20 cap does not change an NFT operator approval, so review those permissions separately.
The signals to watch are the remaining allowance for each token and spender, the corresponding wallet balance, and any later token arrivals that could raise the takeable amount. For NFTs, check whether setApprovalForAll remains active for a collection whose tokens you still hold.