Key Differences

Learn the key differences between native tokens and ERC20 tokens on Avalanche L1s

Before moving forward, and now that we have seen both, it's crucial to understand the fundamental differences between native tokens and ERC20 tokens. Each has distinct characteristics that affect how they function within your blockchain ecosystem.

Key Differences

FeatureERC20Native
Defined BySmart Contract DeployerProtocol Level
Balance StorageMapping in contract storage
mapping(address => balance)
EVM Account state
account.balance
Transfer LogicHandled by contract functions
transfer(), transferFrom()
Handled by EVM opcodes
CALL, SELFDESTRUCT
Smart Contract AwarenessBuilt-in hooks for DeFi compatibility
Allows programmatic approvals
(e.g., Uniswap, Aave)
Can't call functions
approve(), transferFrom()
Receiving in FunctionsNo special modifier needed
function deposit(token, amount)
Requires payable modifier
function deposit() payable

The Protocol Limitation

One critical limitation of native tokens is that protocols cannot "pull" native tokens from your wallet using transferFrom(). This fundamental difference impacts how DeFi protocols interact with native tokens.

Real-World Example: Aave Lending

Let's look at how supplying ETH (a native token) to Aave works:

  1. Wrap it into WETH - Convert native ETH to ERC20 WETH
  2. Call approve() - Give Aave permission to spend your WETH
  3. Aave calls transferFrom() - Aave pulls the WETH from your wallet
  4. You receive aTokens - Start earning interest and can borrow against your deposit

Why ERC20 Standardization Matters

The main advantage of ERC20 tokens is standardization. Without it:

  • You could build a deposit() payable function for native tokens
  • But then you'd have two different logics for depositing tokens
  • This creates complexity and potential security issues

Is this guide helpful?