Prologue

UTXO

  • The verification of coin spending is highly parallelizable since each coin can only have one interaction. In contrast, account-model-based blockchains need to handle transactions sequentially.
  • The balance is a first-class citizen on the Chia Blockchain! Instead of being a state stored in a mapping table, every coin on Chia has an explicit amount, the total of which has to stay constant. (Well except when you farmed a block, you receive 2 XCH out of thin air.)
  • Since the transactions in a single block are order-less (i.e. their order does not matter as long as they are included in the block), the attack surface of smart contracts reduces drastically. In other blockchains, we often hear the term Miner Extractable Value (MEV), which refers to the profit that a miner could secure by manipulating the ordering of the transactions.

Implications to Users

Implications to Developers

Chia’s Take

Hashgreen DEX

Problems We Solve

  1. User Contention
    These Craigslist-like offer pastebins will ultimately face an unsolvable challenge with offer contention. Concretely, contention happens when an offer was downloaded by different parties and spent in the same block. In a fee market, the spends with lower fees will be discarded while the one with the highest fee will go through. While the fee rule itself is totally fair, users with an honest intention to trade in the market but using lower fees will unwillingly have to give up and look for other trades.
    Most users do not experience contention now since the market velocity is relatively slow at this point, yet in some cases when there are sudden spikes in trades, contention will become obvious. The SM1 token backed by Chris from The Chia Plot went on a sale on OfferBin, and one unfortunate conclusion Chris drew was that too many people participating in the auction can cause problems on OfferBin, in line with what we discussed above.
    That is exactly why we opted for a download-free solution: instead of users bringing the offers home and making their counter-offers, we aggregate offers on two sides, immediately bringing both down from the order book, and pushing them to the chain on your behalf. Not only are we unable to mess with your fund, but we also are unable to cheat you since the swaps are guaranteed by chialisp.
  2. Scalability
    We want there to be market makers in the game. We want there to be arbitrageurs in the game. We want there to be hobby day traders in the game. None of these would be possible without an API interface that is easy to play with and use. Hashgreen is drafting up documentation on trading API, which would be finalized soon. After its release, we expect people to take advantage of other existing markets to form a closed loop to both stabilize the price and increase liquidity. One interesting thing we have observed, at the time of writing, the XCH/USDS pair is typically higher in price than other XCH/USD pairs in different markets. We hypothesize that many interested buyers are gradually entering the market, obtaining XCH with their freshly withdrawn Stably USD, and obviously someone else can obtain XCH at a slightly lower price in overseas markets.
  3. Expandability
    There are many plans from Hashgreen to upgrade our DEX. To be a fully functioning DEX, one would typically expect there to be features like partial order fills, limit orders, and even market orders. We’ve identified some upgrade paths to the existing offers in order to support these features, and it wouldn’t require a huge UX remake to integrate them. On the contrary, it might be somewhat confusing to implement these features into Craigslist-like services.
  4. Interoperability
    News about automatic market maker (AMM) development is on the street. Once an AMM is out on the market, we can easily hook you up to trade against AMMs with zero wait time for matching. Plus, we are always working closely with the Chia team to create a smoother trading UX experience from Hashgreen DEX to your Chia wallet!

Open Questions

  • Operator Extractable Values (OEV)
    OEV not only covers the previously mentioned miner extractable values (MEV), but also covers the values extractable by aggregators like Hashgreen DEX. In principle, if there are enough orders on the market, they can create an overlap in prices. Aggregators, having observed this phenomenon, can pocket the spread by buying up the cheaper sell offer and selling off the more expensive buy offer simultaneously, pocketing the spread. While we are honest and only match exact offers from two sides, it is not guaranteed that every aggregator will be a good actor. In our preliminary exploration with AMMs, we have found some countermeasures to ensure aggregator honesty in a trustless manner with chialisp. The detail of the mechanisms will certainly be revealed and explained in-depth after we release the product, but for the time being we would love to work behind the curtains for some more.
  • Decentralization
    OfferPool sets out to be another offer pastebin site to combat the centralization of offer files. The arguments of anti-centralization do make sense up to a certain point, since those were the driving force behind the existence of blockchain technology. However, when already operating on a decentralized infrastructure, how much more decentralization is required is debatable, as having scattered decentralized services might lead to inefficiency in the application. Take an AMM for example, having more total values locked (TVL) in the protocol means that service users would enjoy a better price. Despite being centralized in terms of capital concentration, not a single party is able to single-handedly control the capital since the rules behind the capital movement are crystal clear. Hence we believe the better argument is that, the protocols need to be fully transparent to allow the blockchain to do its job at ensuring decentralized and trustless execution.

Summary

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store