ERC-7196 · Draft · ERC · 2023-06-21
ERC-7196: Simple token, Simplified ERC-20
A stripped-down fungible token interface that keeps only totalSupply, balanceOf and transfer, leaving approvals and delegated spending to smart contract wallets.
What problem does it solve?
ERC-20 was designed in a world of externally-owned accounts (EOAs), which have no code and no storage. Because an EOA cannot enforce rules of its own, ERC-20 puts permission logic inside the token: approve, allowance and transferFrom let a third party spend your tokens. That pattern is the source of familiar problems such as unlimited approvals and allowance race conditions.
Smart contract wallets (including account-abstraction wallets such as ERC-4337 accounts) can hold their own state and logic. The authors of ERC-7196 argue that once the wallet is programmable, the token no longer needs to manage permissions at all. The token should do one thing, move balances, and the wallet should decide who may trigger a payment.
How it works
A compliant token implements only:
| Member | Purpose |
|---|---|
totalSupply() |
Total amount of tokens |
balanceOf(owner) |
Balance of one address |
transfer(to, value) |
Move tokens from the caller to to, returning bool |
event Transfer |
Same signature as the ERC-20 event |
approve, allowance, transferFrom and the Approval event are removed. If a dapp wants to pull funds from a user, it is expected to call the user's wallet contract, which checks its own rules and then calls transfer on the token itself.
Because these three functions and the event are an exact subset of ERC-20, every ERC-20 token already satisfies this interface. The reverse is not true: a token that implements only ERC-7196 will not work with protocols that rely on approve + transferFrom.
Sample code
A minimal ERC-7196 token (illustrative, no minting controls):
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
interface IERC7196 {
event Transfer(address indexed from, address indexed to, uint256 value);
function totalSupply() external view returns (uint256);
function balanceOf(address owner) external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
}
contract SimpleToken is IERC7196 {
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
constructor(uint256 supply) {
totalSupply = supply;
balanceOf[msg.sender] = supply;
emit Transfer(address(0), msg.sender, supply);
}
function transfer(address to, uint256 value) external returns (bool) {
require(to != address(0), "zero address");
require(balanceOf[msg.sender] >= value, "balance");
balanceOf[msg.sender] -= value;
balanceOf[to] += value;
emit Transfer(msg.sender, to, value);
return true;
}
}
A wallet that wants to let a merchant charge it would expose its own function (with whatever spending limit it chooses) that ends in token.transfer(merchant, amount).
Things to know
- Status is Draft; the interface may still change.
- The model only works when the payer is a smart contract wallet. Plain EOAs have no place to store "who may spend my tokens", so they can only push payments.
- Existing DEXes, lending markets and many other protocols depend on
transferFrom. A token that implements only ERC-7196 is incompatible with them, as the spec itself notes. - Gasless approval schemes such as ERC-2612
permitsolve a similar UX problem but stay within the ERC-20 allowance model.