  Inspired by Bitcoin, many different kinds of cryptocurrencies based on
blockchain technology have turned up on the market. Due to the special
structure of the blockchain, it has been deemed impossible to directly trade
between traditional currencies and cryptocurrencies or between different types
of cryptocurrencies. Generally, trading between different currencies is
conducted through a centralized third-party platform. However, it has the
problem of a single point of failure, which is vulnerable to attacks and thus
affects the security of the transactions. In this paper, we propose a
distributed cryptocurrency trading scheme to solve the problem of centralized
exchanges, which can achieve trading between different types of
cryptocurrencies. Our scheme is implemented with smart contracts on the
Ethereum blockchain and deployed on the Ethereum test network. We not only
implement transactions between individual users, but also allow transactions
between multiple users. The experimental result proves that the cost of our
scheme is acceptable.
