Why "token approval" is the worst idea in DeFi.
ERC-20 got the token right and the hard part wrong. it standardized balances and transfers, but never a clean way for a contract to actually use your tokens. a plain transfer to a contract doesn't even tell it anything arrived. so they bolted on a hotfix: approve + transferFrom.
Look at what that hotfix forces on you. to let a contract spend your tokens, you either:
- approve it once for a huge or infinite amount, and now it can reach into your wallet whenever it wants, forever, until you remember to revoke. you're trusting a contract you probably never read.
- OR approve the exact amount right before every action, which means a second transaction and a second gas fee on every single operation.
Tust a stranger, or pay a tax on every move. those are the two choices, and the standard offers nothing better. so everyone picks door one and clicks "infinite," and the chain fills with wallets pointing loaded guns at themselves.
Not theoretical. the jaredfromsubway MEV bot just lost millions this way. nothing was hacked. it handed out approvals chasing fake trades, and someone used transferFrom to walk the funds out.
The worst part: a better design existed the whole time. transfer-and-call (ERC-223, ERC-1363) moves the exact amount and notifies the receiver in one transaction. no standing approval, no extra tx, no stranger holding a key to your account. it lost to ERC-20's head start, and now infinite approvals are load-bearing under all of DeFi. permit, permit2, account abstraction, every "fix" is a patch on a primitive that should never have shipped.
We didn't get the safe option. we got the convenient one, and we've been paying for it since