Token standard

What is ERC-223?

ERC-223 is a token standard for Ethereum and other EVM chains, written by Dexaran in 2017. It makes tokens behave like ether: when you send ERC-223 tokens to a smart contract, the contract is notified and can accept or reject them, so tokens sent to the wrong contract are not lost. Deposits take one transaction, with no approval step.

How it works

Tokens that behave like ether

ERC-223 adds one rule to token transfers: if the recipient is a smart contract, the token asks it first. Wallets keep working as before.

  1. You send tokens

    You call transfer(to, amount), the same function name and signature as ERC-20, so any wallet can send ERC-223 tokens.

  2. The contract is notified

    If the recipient is a smart contract, the token calls its tokenReceived function, the way ether triggers a contract's receive function.

  3. Accept or reject

    A contract built for the token handles the deposit. A contract that is not built for it reverts, and the tokens stay in your wallet.

// ERC-223 (EIP-223) receiving contract
function tokenReceived(address _from, uint _value, bytes calldata _data) external returns (bytes4)
// Not implemented? The transfer reverts and the sender keeps the tokens.

The problem

Why ERC-20 tokens get lost

ERC-20 was designed in 2015. Its transfer function does not tell the recipient anything, so a contract that receives tokens it does not support cannot reject them. The tokens stay locked in that contract, usually forever.

To deposit into a dApp, ERC-20 also needs two transactions: approve, then transferFrom. To save gas, many exchanges ask for an unlimited approval once. That lets the contract move your tokens at any time, and if it is ever hacked, approved tokens can be drained.

ERC-223 removes both problems: the recipient is always asked, and deposits are a single transfer.

$201,690,000

worth of ERC-20 tokens lost on Ethereum mainnet to this design flaw, as of 29 August 2023.

See today's total in the ERC-20 losses calculator →

Comparison

ERC-20 vs ERC-223

FeatureERC-20ERC-223
Sending to a contractThe contract is not notified. Unsupported tokens get stuck.The contract is notified and rejects tokens it cannot handle.
Depositing into a dAppTwo transactions: approve, then transferFromOne transaction: transfer
ApprovalsRequired. Unlimited approvals put funds at risk.Not needed
Gas for a swap (example)257K (45K approval + 212K swap)220K, no approval
Behaves like etherNoYes
Standard statusFinal (EIP-20, 2015)Final (EIP-223, 2017)

Gas figures are from a measured swap of the same token on DEX223. Results vary by token and network conditions.

Compatibility

Use ERC-20 and ERC-223 together

You do not have to choose. The EIP-7417 token converter turns any ERC-20 token into its ERC-223 version and back, 1:1, at any time. Both versions are the same token.

Any token, both directions

Deposit the ERC-20 version and receive the ERC-223 version, or the reverse. There is no limit on converting back.

One liquidity pool

On DEX223 every pool accepts both versions of a token. You choose ERC-20 or ERC-223 for each side of a trade.

No protocol fee

Converting between ERC-20 and ERC-223 on DEX223 costs only network gas.

Use it today

ERC-223 on DEX223

DEX223 was the first decentralized exchange to support ERC-223. It is non-custodial: you trade from your own wallet.

Swap without approvals

Swap ERC-223 tokens in one transaction. No approval step, lower gas.

Convert in the app

Move any token between ERC-20 and ERC-223 at 1:1 with the built-in converter.

List any token

List a token without permission through an auto-listing contract.

FAQ

ERC-223 questions

Is ERC-223 compatible with ERC-20?

Yes. ERC-223 keeps the same transfer function, so wallets can send it, and the EIP-7417 converter turns any ERC-20 token into its ERC-223 version and back at 1:1.

Is ERC-223 an official Ethereum standard?

Yes. EIP-223, "Token with transaction handling model", has Final status in the Ethereum Improvement Proposals.

Who created ERC-223?

Dexaran proposed ERC-223 in 2017. The EIP was created on May 3, 2017.

What happens if I send ERC-223 tokens to a contract that does not support them?

The transfer fails and the tokens stay in your wallet. With ERC-20 the same mistake usually locks the tokens forever.

Do ERC-223 tokens need approvals?

No. A deposit is a single transfer that the receiving contract handles, so there is no approve step and no unlimited approval to revoke.

How do I convert ERC-20 tokens to ERC-223?

Use the token converter in the DEX223 app. It converts 1:1 in both directions and charges no protocol fee, only network gas.