Ethereum StandardDraft

ERC-7410: ERC-20 Update Allowance

Fixes the broken approve() function in ERC-20 tokens. Increase or decrease allowances instead of setting absolute values.

Adam's role

Co-author. I pushed for this after seeing how agent spending limits need safe allowance management. When AI agents manage wallets, the approve race condition becomes a real attack vector.

What is it?

ERC-7410 replaces the dangerous approve() pattern with increaseAllowance() and decreaseAllowance(). Instead of setting an absolute spending limit (which creates a race condition), you add or subtract from the current allowance. Simple fix, massive security improvement.

Simple analogy

The current approve() is like telling a store 'you can charge me up to $100.' If you later change it to $50, there's a brief moment where both $100 AND $50 might be valid. ERC-7410 fixes this by saying 'add $50 more' or 'remove $50' instead.

How it works

1

Current Problem

You approve a spender for 100 tokens. Later you want to change it to 50. You call approve(spender, 50). But between your tx and the block, the spender drains the original 100, THEN gets the new 50. You lose 150.

2

The Fix: Relative Changes

Instead of setting absolute values, ERC-7410 uses relative adjustments. increaseAllowance(spender, 50) adds 50 to whatever the current allowance is. decreaseAllowance(spender, 30) subtracts 30.

3

No Race Condition

If a spender front-runs and spends their allowance, the decrease will apply to the remaining balance. They can't double-dip because you never set a new absolute value they could exploit.

4

Backward Compatible

ERC-7410 tokens still implement standard ERC-20. Old tools keep working. New tools get the safe allowance functions. No migration needed.

Key concepts

increaseAllowance(spender, addedValue)

Adds to the current allowance. If the spender can currently spend 100 tokens and you call increaseAllowance(spender, 50), they can now spend 150. No ambiguity, no race condition.

decreaseAllowance(spender, subtractedValue)

Subtracts from the current allowance. If the spender can currently spend 100 tokens and you call decreaseAllowance(spender, 30), they can now spend 70. Reverts if you try to subtract more than the current allowance.

The Race Condition Problem

With standard approve(), if you change an allowance from 100 to 50, a malicious spender can front-run your transaction: spend the old 100, then spend the new 50 too. That's 150 instead of 50. ERC-7410 makes this impossible.

Use cases

DeFi Approvals

Safely adjust DEX and lending protocol spending limits.

When interacting with Uniswap, Aave, or any DeFi protocol, you grant token allowances. ERC-7410 lets you safely increase or decrease those limits without the race condition risk that plagues standard approve().

AI Agent Spending Limits

Safely manage how much an AI agent can spend from your wallet.

As AI agents get wallet access, controlling their spending limits becomes critical. ERC-7410 lets you safely bump an agent's allowance by $100/day or cut it by $50 when you want to scale back. No race condition exploits.

Subscription Services

Adjust recurring payment authorizations without risk.

A service charges you monthly via token allowance. If you upgrade your plan, increaseAllowance() safely adds the difference. Downgrading uses decreaseAllowance(). No window for the service to drain extra funds.

Technical specification

The core interface that defines ERC-7410.

IERC7410.sol
// SPDX-License-Identifier: MIT
interface IERC7410 {
    // Increase the allowance granted to spender
    function increaseAllowance(address spender, uint256 addedValue)
        external
        returns (bool);

    // Decrease the allowance granted to spender
    function decreaseAllowance(address spender, uint256 subtractedValue)
        external
        returns (bool);
}

Frequently asked questions

Why is the standard approve() function dangerous?
When you call approve(spender, newAmount), there's a window between your transaction being submitted and mined. A malicious spender can front-run: spend the old allowance, then your new approve() goes through, and they spend that too. You intended to set a limit of newAmount, but they spent oldAmount + newAmount.
Don't OpenZeppelin contracts already have increaseAllowance?
Yes, as a non-standard extension. But it's not part of the ERC-20 spec, so wallets, tools, and protocols can't rely on it being there. ERC-7410 standardizes it so every token and every tool speaks the same language.
Does ERC-7410 replace ERC-20?
No. It extends it. ERC-7410 tokens are fully ERC-20 compatible. They still have approve(), transfer(), and everything else. They just add two new functions that make allowance management safe.
Why does this matter for AI agents?
AI agents with wallet access need spending limits. As agents make more autonomous decisions, the ability to safely adjust (not replace) their allowances becomes critical. ERC-7410 was motivated by this exact use case.