This is an automated archive.

The original was posted on /r/ethereum by /u/Dexaran on 2023-08-12 14:27:36+00:00.


Token Converter

Token Converter is a smart-contract based service which is designed to make ERC-20 and ERC-223 tokens interchangeable. With this service users will be able to exchange ERC-20 tokens for ERC-223 1:1 anytime. In the same way ERC-223 tokens can be exchanged back to ERC-20 version.

Formal specification: EIP-7417

Source code: TokenConverter.sol

More info about ERC-223: ERC-223 token standard frontpage

The reasons to convert ERC-20 tokens to ERC-223

ERC-223 prevents user mistakes

Is it a fear for you to lose your crypto assets due to some accident or a mistake? Well, ERC-223 token standard prevents most common user mistakes which was not possible with ERC-20.

Secure interactions with contracts

Did you know that most services on Ethereum require the user to allow them to have unlimited access to the users’ tokens by issuing an approval? For example after using Uniswap for one time it will have the access to your tokens until you manually revoke it.

It is not the best idea to give a contract full control over your wallet because smart-contract hacks are quite common. With ERC-223 tokens it is no longer required to rely on approvals and a swap can be executed by simply depositing ERC-223 tokens to the smart-contract.

ERC-223 swaps can be cheaper than ERC-20

The source code of an exchange that is compatible with ERC-20 and ERC-223 tokens:

ERC-20 swap (consumed 257K GAS)

approve (45K GAS):

swapExactTokenForCLO (212K GAS):

ERC-223 swap (consumed 220K GAS)

A transfer of ERC-223 token that encodes swapExactTokenForCLO function invocation in its _data:

220K GAS vs 257K GAS.