ERC-8187 · Draft · ERC · 2026-02-27
ERC-8187: Token Puller
A standard 'Puller' interface that lets approved spenders pull ERC-20 tokens on demand while the Puller sources them (e.g. withdraws from a vault), so owners can keep funds invested instead of idle in a wallet.
What problem does it solve?
With plain ERC-20 approve / transferFrom (or ERC-2612 permits), a merchant or subscription service can only pull tokens that are sitting liquid in your wallet. That pushes users to:
- keep large balances idle in hot wallets instead of earning yield,
- split funds across several accounts for different spending apps (crypto cards, neobanks), and
- sign often for recurring payments.
There is also no standard way for a spender to hand part of its allowance to someone else, for example a budget "guardian" topping up per-app limits.
ERC-8187 puts a Puller contract between owner and spender. The spender just asks for "X of token T from owner O to address D"; how the Puller gets those tokens (withdrawing from a lending market, redeeming vault shares, swapping, or just using a balance) is an implementation detail hidden from the spender.
How it works
- Approve: the owner calls
approvePull(token, spender, limit), or signs an EIP-712PullPermitthat anyone can submit throughpermitPull. Permit signatures should be validated per ERC-6492, covering EOAs, ERC-1271 contracts and not-yet-deployed accounts. - Pull: the spender calls
pullFrom(token, owner, to, amount). The Puller checks and decreases the allowance (unless it istype(uint256).max), runs its sourcing logic, and must transfer exactlyamounttoto, or revert. - Permit + pull:
pullFromWithPermitdoes both in one call. It should not revert just because the permit was already used, which blocks a front-running denial-of-service. - Delegate allowance:
transferPullAllowance(token, owner, toSpender, amount)moves part of the caller's allowance to another spender; sending toaddress(0)renounces it. - Capacity:
maxPullable(token, owner, upTo)reports how much could be pulled right now, capped atupTo. - Events:
PullApproval,TokensPulled,TransferPullAllowance. Nonces follow ERC-2612 and the domain should be exposed via ERC-5267.
A smart account can implement IPuller on itself (owner == address(this)), removing the external contract and its approval step.
Sample code
A subscription service charging a user through a Puller (ethers v6):
import { Contract, Wallet, JsonRpcProvider, parseUnits } from "ethers";
const abi = [
"function pullAllowance(address token, address owner, address spender) view returns (uint256)",
"function maxPullable(address token, address owner, uint256 upTo) view returns (uint256)",
"function pullFrom(address token, address owner, address to, uint256 amount)",
];
const provider = new JsonRpcProvider(process.env.RPC_URL);
const service = new Wallet(process.env.SERVICE_KEY!, provider);
const puller = new Contract(PULLER_ADDRESS, abi, service);
const fee = parseUnits("10", 6); // 10 units of a 6-decimal token
const allowance = await puller.pullAllowance(TOKEN, user, service.address);
const available = await puller.maxPullable(TOKEN, user, allowance);
if (available >= fee) {
// Puller sources the funds (e.g. withdraws from a vault) and sends them to the treasury
await (await puller.pullFrom(TOKEN, user, TREASURY, fee)).wait();
}
Things to know
- Status: Draft. The interface may change. The reference implementation is explicitly educational and unaudited.
- Sourcing calls external protocols, so watch for reentrancy, slippage, failed withdrawals and oracle manipulation.
- Allowance transfer is powerful: a compromised spender can redirect its whole allowance. The same finite-vs-infinite approval trade-off as ERC-20 applies.
- Fee-on-transfer and rebasing tokens may behave unexpectedly; consider before/after balance checks.
maxPullablemirrorsmaxWithdrawin ERC-4626 vaults, a natural sourcing backend.