$EX5 pre-sale — Seed tier · 500M fixed supply · 50% burn · sign up at portal.ex5.comJOIN →
Updated

ERC-827

In short: ERC-827 is a proposed Ethereum token standard developed to go beyond the limits of ERC-20, especially in asset transfers and approval (confirmation)…

ERC-827 is a proposed Ethereum token standard developed to go beyond the limits of ERC-20, especially in asset transfers and approval (confirmation) transactions. It combines a token transfer or approval with a call to another contract in a single transaction.

Why it matters

With ERC-20, paying a smart contract usually takes two steps. The holder first approves the contract to spend their tokens, and a second transaction then makes the contract pull the tokens and act. ERC-827 added functions such as transferAndCall and approveAndCall, which move or approve tokens and immediately call a function on the receiving contract, passing along extra data. This saves a transaction and makes the process simpler for users. However, security researchers pointed out that letting the token contract make arbitrary calls with data chosen by the user could be abused, because those calls come from the token contract itself. For this reason ERC-827 did not become a widely used standard, and later designs took a more cautious approach to combining transfers with contract calls.

Example

A user wants to sign up for a service that charges in tokens. With ERC-20, they sign an approval, wait for it to confirm, then sign a second transaction to register. With ERC-827, a single approveAndCall transaction approves the payment and triggers the registration function at the same time.