Skip to main content

One post tagged with "swap"

View All Tags

· 4 min read
J.

banner

Hello Hashgreen readers, welcome back to another week of Weekly Update!

Last week, we released an update targeting mobile device users and since then we've received some genuine feedback from reddit. Thank you again for always willing to give us constructive advice, and we will continue working on providing a better experience to the users of Hashgreen DEX. At the same time, we will keep developing and building more services for the community on Chia Blockchain.

This week we would like to introduce two essential components in DeFi, that is, order books and swaps, and share with you the difference and the pros and cons for each design.

What is an Order Book?

definition

An order book refers to an electronic list of buy and sell orders for an asset organized by the price.

  • An order book is widely used in traditional trading markets such as the stock market. Generally, it shows a smooth and aggregated view of a specific financial instrument. It comprises two sides, bidding and asking, dedicated to buyers and sellers.

  • In cryptocurrency, trading platforms such as the centralized exchange (CEX) or the decentralized exchange (DEX) often incorporate order books to display a variety of crypto assets for users to trade. You probably have heard of Binance or Coinbase Pro. They are the top CEXs that people visit and conduct trades.

Understanding Order Books

  • Order books contain these main parts: bid and ask, price and amount, and order history.
Figure: Order book in Hashgreen DEX.

Bid and Ask

  • bid is an order in which buyers bid for a certain amount of shares at a particular price.
  • ask is an order in which sellers ask for a specific price for their shares.

Price and Amount

  • An order book records two sides of the orders:

    • bid side contains information such as all the bids, the amount they wish to purchase, and the price they are willing to pay.
    • ask side resembles the bid side.
  • At the top of the order book is where the highest bid and the lowest ask prices are shown.

Order History

  • Order History records all the transactions that have occurred in the past, including both the bid and the ask sides.
Figure: Hashgreen DEX incorporates trade history into the page.

What is a Swap?

  • When you are trading on DEX, you are carrying out trades in order books. Transactions are only fulfilled by matching ask or bid orders that other people uploaded. "Swap", in cryptocurrency, refers to exchanging the cryptocurrency you have for the equivalent value of another crypto.

  • Swaps offer greater flexibility in designing and constructing the transaction process and more essentially the agreement between two parties to exchange assets for a set period. Examples of swaps in cryptocurrency that the majority of people would most likely use are Uniswap on Ethereum and PancakeSwap on BNB Chain.

Why is Swapping More Immediate?

  • Swapping provides an even better experience for great flexibility, high transaction efficiency, fair price, and efficient price discovery. When you are buying something that must accept DAI, but you only have ETH, then it's a good time to swap.

  • Conceptually, trading and swapping are similar. However, trading with order books usually requires deeper understanding of the design and functionalities of trading and order books, whereas swapping can be as simple as possible for users to execute.

Trading vs. Swapping

trading on DEXswapping on AMM
average waiting timeslowerquicker
transaction speedtiedtied
priceinferiorfair
price discoveryless efficientmore efficient