Skip to main content

What Is the Purpose of the “Approve” Function in the ERC-20 Standard?

The "approve" function allows a token holder to grant a third-party address (usually a smart contract, like a DEX or lending protocol) permission to spend a specific amount of their tokens on their behalf. This is a critical step for interacting with DeFi protocols, as it allows the protocol's smart contract to move the user's tokens to execute a trade or collateralize a loan without needing the user's private key.

What Is the Difference between ERC-20 and ERC-721 Token Standards?
What Is the Key Advantage of a Tokenized Option Being an ERC-721 (NFT) versus an ERC-20?
Why Was the Approve() and Transferfrom() Pattern Chosen for the ERC-20 Standard?
Can a Third Party View a Monero Transaction If They Have the Private View Key?