Tag Archives: Exchange

ERC20 Token Design Mistakes vs ERC223 Token

The old ERC20 token standard have bugs and disadvantages resulting in thousands of ERC20 tokens to be lost annually. These design mistakes has been addressed in the new ERC223 token which is fully compatible with ERC20 wallets and exchanges. 

What is ERC?

ERC means Ethereum Request for Comments. It practically allows for smart contracts to be built on the Ethereum platform based on certain standards thus creating a common interface for all Ethereum tokens. Ethereum developers recommend that any Ethereum developer who wants to create a new token should follow this set of standards to ensure that their tokens are easily recognizable on both the Ethereum network and other third-party service providers such as crypto-wallets. These ERC20 tokens can be received, and sent just like any other cryptocurrency like Bitcoin, Litecoin and Ethereum.

ERC20 bugs

The ERC20 standard is programmed software and accordingly contains some bugs and logic errors. Two different ways to handle tokens were taken into account in the creation. On the one hand, tokens can be sent to another address. A smart contract is paid by using the “approve” and “transferFrom” functions.  Thereafter, the contract may be approved to allow the tokens to be withdrawn. Afterwards the token is filled or lifted by means of “transferFrom”.

When transferring tokens for a contract with “transferFrom” this transaction is basically valid. However, the contract does not recognize it by the user, resulting in the tokens not being loaded into your account. Normally, an emergency token function is stored in the exchange contract (decentralized). If this is not the case, the tokens can not be returned and are lost forever.

ERC20 will continue to be used

Most token based projects have used the original ERC20 token standard as it is with faults. This include even  well known projects.

At present many developers are still unaware of the design mistakes and bugs in the old ERC20 tokens standard so they continue to use it in new developments.

Can the ERC223 standard solve the problems?

ERC223 is a new token standard that seeks to address the design mistakes / errors of ERC20. These problems are:

  • ERC20 provides no programmatic interface to handle incoming transactions in smart contracts.
  • ERC20 handling smart contracts typically require you to trust them with all your funds in order to use them. This is unlike native ether, which has excellent support for trustless transactions.
  • Nothing prevents the user to send ERC20 tokens to a smart contract, such as an exchange. However, due to the inability to handle incoming transactions these sent tokens will not alter the state of the smart contract (such as balance on the exchange), and it will be impossible to retrieve them from the smart contract. Effectively, these tokens get burned resulting in multi millions of USD losses in ERC20 tokens. Because of the deflationary nature of cryptocurrencies this losses will continue to accumulate.

The main improvement of ERC223

  • On top of offering the same level convenience as ERC20 tokens, it also offers its holders protection against losing tokens by introducing a revert option or altogether blocking the transfer of tokens to random contracts. Tokens can no longer be sent to non supporting contracts with the ERC223 standard.
  • ERC223 allows to deposit tokens into a contract with a single transaction (function) which reduces the use of resources. This again reduce the cost and running time of the transaction to about half compared to that of the old ERC20 standard.

ERC223 is created to be compatible with existing blockchain infrastructure, such as wallets like Mist, Parity, MyEtherWallet and MetaMask, and blockchain explorers such as Etherscan and Ethplorer.

Geir Solem

Decentralized Exchanges

Created in 2008 by the pseudonymous computer programmer Satoshi Nakamoto, bitcoin is digital money that’s tracked via a public ledger and controlled by no central bank, corporation, or individual.

Image courtesy of Wiki Commons

It’s a peer-to-peer currency based on the blockchain running on the internet that allows its users to transfer value with no central authority or third party involved. Since a network of distributed and mostly anonymous miners are all in charge of processing the transactions, we avoid problems like censorship and fraud.

The automated issuance mechanism of bitcoin through mining also seeks to remove the control of money printing from privately owned banks that lend money to the public at an interest, creating the debt based economy. The primary goal of Bitcoin, to return the control of money to its owners, is in a way lost with third party services.

With cryptocurrencies comes the need for exchanges, and centralized exchanges are easy to use, easy to access, and they provide advanced trading functionalities like margin trading and others.

However, they also represent a security risk for your funds. While some exchanges are better guarded than others, hacks are not an uncommon. There are a number or risks related to centralized exchanges like incompetence, bankruptcy, etc.

We need to exchange our currencies. There are certain items and services that we cannot buy with Bitcoin and in order to acquire Bitcoin or cryptocurrencies, most people have to exchange it for a national currency. Furthermore, some cryptocurrencies like Ether or Bitshares have special features or tools that are not present in Bitcoin. So how can we exchange our coins without entrusting them to a third party service? The answer lies with decentralized exchanges.

Image courtesy Wiki Commons

Decentralized Exchanges

A decentralized exchange is an exchange market that does not rely on a third party service to hold the customer’s funds. Instead, trades occur directly between users (peer to peer) through an automated process. This system can be achieved by creating proxy tokens (crypto assets that represent a certain fiat or crypto currency) or assets (that can represent shares in a company for example) or through a decentralized multi-signature escrow system, among other solutions.

This is an alternative to the current centralized model in which users deposit their funds and the exchange issues an IOU that can be freely traded on the platform. When a user asks to withdraw his funds, these are converted back into the cryptocurrency they represent and sent to their owner.

Advantages

The most important benefit to using a decentralized exchange over a centralized one is their “trustless” nature. You are not required to trust the security or honesty of the exchange since the funds are held by you in your personal wallet and not by a third party.

Another advantage to the decentralized model is the privacy it provides. Users are not required to disclose their personal details to anyone, except if the exchange method involves bank transfers, in which case your identity is revealed only to the person that is selling or buying from you.

In addition, the hosting of decentralized exchanges is distributed through nodes meaning that there is no risk of server downtime. To summarize,

  • No parenting by governments, banks and other institutions
  • Secure, no 3rd party involved
  • Set the unbanked free
  • Open, Transparent
  • Global, fast, efficient, 24/7
  • No identity theft
  • A platform for innovation

Disadvantages

Some decentralized exchanges require users to be online in order for an order to be listed and for the trade to take place, requiring users to perform certain actions like signaling that a payment was received.

Trading features like margin trading, lending and stop loss are currently not available in the decentralized model as they only allow the basic exchange of currency for a predetermined value.

Overview of decentralized exchanges

While there is still a way to go in order to build fully functional and convenient decentralized exchanges, there are several projects that have brought us the basic functions and an alternative way to trade currencies while keeping your funds safe from hacks, inside thefts and faulty business models.

Bitsquare is a decentralized open-source exchange that allows users to buy and sell Bitcoin for cryptocurrencies and national currencies without the need to entrust funds to third-party or middleman, meaning that the transactions occur directly between the buyer and seller. Bitsquare relies on a decentralized multi-signature escrow system to ensure that all trades are carried out honestly.

CounterParty is a meta-coin smart contract layer that embeds data into regular Bitcoin transactions. It allows anyone to issue assets or tokens inside of the Bitcoin blockchain. When trading assets for other assets, the Counterparty protocol acts as a decentralized escrow service that holds the funds until the orders are matched. When trading an asset for Bitcoin, the asset is held in escrow and the other user must make a manual bitcoin payment using the Counterparty wallet.

Waveplatform Waves Asset Exchange is allowing users to trade assets (including asset-to-asset exchange), fiat tokens, and cryptocurrencies.

Bitshares is a crypto platform with its own native currency, Bitshares. Using the Bitshares platform, users can trade BTS, Market Pegged Assets (a crypto asset pegged to another currency or commodity that always has 100% or more of its value backed by the BitShares core currency, to which they can be converted at any time) and User Issued Assets (assets that can be issued by anyone to represent shares, commodities, currencies and so on). Openledger is the Web-based version of Bitshares, running on the same underlying blockchain.

Nxt is a crypto platform (one of the first crypto 2.0 projects) that allows users to issue and trade assets. These assets, however, can only be exchanged for the coin NXT and not for other cryptocurrencies.

Komodo EasyDEX exchange will allow users to trade cryptocurrencies directly without resorting to proxy tokens, while the PAX (Pegged Asset Exchange), both being developed by the SuperNET and Komodo teams, allows users to exchange national currency assets with the privacy that zero-knowledge proofs provide.

Stashcrypto is built on the Open-Transactions financial cryptography platform, an extremely fast and low cost off-blockchain system based on signed receipts. When combined with Bitcoin, OT solves hard problems in crypto finance. Receipts in OT cannot be forged, and a user’s balance cannot be changed without his signature. OT is also able to prove all balances, as well as which instruments are still valid, without storing any history except for the last signed receipt.

Cryptor Trust is working on the Blockchain Asset Exchange (BAE), an open decentralized distributed platform for trading securities. Cryptor Trust plan to list their own investment entities on the BAE exchange.

Conclusion

Decentralized exchanges provide global, frictionless value-transfers. Without decentralized exchanges, there will be intermediaries having control over the transfer of value.

Geir Solem

Bitcoin exchanges most overlooked risk

The use of bitcoin and exchanges (fiat to btc/altcoin) has awaken the controversy around topics like hacking, fraud, technical breakdown, to mention some. The events have proven that these areas must be taken care of in detail.

It has become a kind of luxury to discuss which exchanges provide the best service,  are the most user friendly, speedy and competitive on their fees.

BUT, one of the highest risk factors is often forgotten. The external risk attached to  the authorities that define the rules of the game also known as  “compliance”.

Source: Bex.io Blog
Source: Bex.io Blog

Record-breaking fines issued by regulators worldwide, notably in the US and UK, dominated the financial services landscape the last few years, with many Bitcoin exchanges closing for trade owing to non-compliance with regulatory requirements or exorbitant licencing related fees, making inviable to hold the exchange day to day operations. In other words many of these businesses were destroyed, with job positions and money lost.

As a consequence, the shutdown of these exchanges created a lot of stress on customers. This included businesses scrambling for alternatives in order to safeguard their continuing operation, often in need of taking their funds out in cash over a short time period. Then, when trying to deposit the funds cash to another bank, a new problem occurs: Cash Deposits. Large cash transactions are in practise now criminalized at least in the western world. You could easily end up with a lot of cash at home or in your office.

Crypto currency exchanges shouldn’t overlook at this issue, as in some regions complying with the rules and regulations could become a never ending wheel. If the exchange is based in Europe or the US, Canada, or Australia, they could be surprised after they have adopted and complied the best they can.

Bitcoin exchanges use banks, which carry very much of the same risks as the risk related to the authorities.

Our research has identified 10 major well known banks in Europe and the US that we think will fail over the next few years. The users, and that includes the exchanges using these banks are of course at high risk as well.  The debt problem of the western world was never solved.

Where to choose and/or base a bitcoin exchange?

We think some select countries in Asia and Latin America are the best due to the rising social mood trending in these regions over the coming decade. It is hard to believe, but regulations might even be relaxed in these regions the coming years, giving exchanges a brighter future.

Geir Solem
Cryptor Trust Inc.