We've written about ERC223 token standard before and why we chose it for our SATURN token. ERC223 makes writing smart contracts that work with tokens much simpler, more efficient and more secure. Unfortunately, most of the smart contracts that are written today have to comply with the dominating ERC20 standard if they want to get a real market share. Namely, there aren't any decentralized exchanges for ERC223 tokens on the market yet, although Bittrex already supports the standard.
Radex is our new decentralized exchange that we wrote specifically with the new token standard in mind. It's simple and elegant, making it very easy to audit and ensure your money's safety. However, Radex does not implement the legacy features of ERC20 standard and can't work with the majority of the tokens on the market. Or can it?
Today, we're open sourcing a solution that allows legacy ERC20 tokens to be usable with the new generation of ERC223-aware smart contracts. The source code and tests are available on our GitHub. Let's briefly go over the details of how this solution works.
We are able to upgrade the interface of an existing ERC20 smart contract by creating a translator smart contract that the user and the application interact with. Unlike making a new token from scratch, the translator does not store any state except for the address of the real token. The translator cleverly delegates all the operations that deal with balances and transfers to the existing ERC20 token and makes interacting with it more secure. Unlike with the raw ERC20 tokens that you can send to a smart contract and potentially lose them forever (more than $1,000,000 in tokens are forever lost due to this design flaw), the ERC223 will only transfer funds among users and smart contracts that explicitly state that they are capable of dealing with the token.
From a user interface point of view you'll simply have to click one button to register a ERC20 -> ERC223 translator for the token that you wish to trade. That's it, no more headache. You can trade using ERC223 interface, withdraw the money when you're done, and your ERC20 balance in your favorite wallet will update in real time.
What does this mean for you? It means that for the first time you'll be able to trade all Ethereum tokens on one decentralized exchange. And, most importantly, the money stays in the market. There is no owner of the exchange who takes a cut from every trade like on other exchanges. All of us are true owners of Radex. After all, isn't this what blockchain technology is all about - shared ownership of financial infrastructure?