Some members of Telegram’s community have asked why Lendo uses the ERC223 standard for its ELT token, instead of the more commonly used ERC20. It’s a fair question, given that more people are familiar with ERC20, so we’ll answer it here.
ERC20 was proposed in 2015 and officially formalised in September 2017. It is a great starting point for token standardisation. However, some in the developer community have noted that it has certain flaws and vulnerabilities.
There are two ways of performing functions in ERC20:
- Transfer function.
- Approve + transferFrom mechanism.
One of the drawbacks of ERC20 is this: If the recipient has an external account address, users must transfer their tokens via the transfer function. If a user makes a mistake and chooses the wrong function, the token will get stuck inside the contract , because the contract will not recognise the transaction. And there is no way to extract the tokens once they get stuck there.
ERC223 has an answer for this. Basically it is very similar to ERC20, but it does resolve the problem described above. For example, when tokens are transferred to a smart contract, there is a function called the “tokenFallback”. This allows the receiving contract to decline the tokens, or trigger further actions. This can replace the ERC20 “approve function”.
The advantages of ERC223 are:
· It can handle incoming token transaction in smart contracts in a more consistent manner.
· It offers higher security, because it protects consumers from sending tokens to a smart contract that doesn’t support them.
· The fees are lower. With ERC20 you have to pay twice; for transaction approval and to receive funds. With ERC223, you only pay a transaction fee once.
A surprisingly large amount of funds have been lost using ERC20. Various tokens to the value of $400,000 have been totally lost, because people sent them to a smart contract that didn’t support those tokens.
That’s why Lendo uses ERC223. Read the Lendo Technical Whitepaper to find out more.