Skip to main content

21 posts tagged with "hashgreen"

View All Tags

Β· 7 min read


Hello friends and fellows of Chia, welcome back to another post from Hashgreen! It's been a while since we had an update. Please forgive us for not having as many updates recently, as the development of Hashgreen DEX has come to the point where we think current features should suffice for over-the-counter (OTC) trading purposes. What follows consecutively is the development of the first ever AMM in Chia that is currently underway. We believe the ability to trade at will independently from counter-parties is a critical primitive of on-chain decentralized finance.

In today's blog, looking back from the experience of launching Hashgreen DEX to the construction of AMM, we are going to walk you through the landscape of the existing development in Chia and introduce an easier development in which the services could function in a more responsive and scalable manner to meet the needs of both end users and developers.

The current development in Chia​

There are many existing dApps around the concept of a peer-to-peer trading protocol called β€œOffers” now. While it is decentralized and secure, the wallet is responsible for, other than just storing your private keys securely, managing these transactions/trades against peers and tracking their statuses on the blockchain by continuously pulling data from full nodes and verifying them.

Below is a figure showing the general picture of the system design that are commonly seen in Chia:

Figure: The current development in Chia.

The system, at a brief glance, looks reasonable and works reasonably well: dApps and wallets independently communicate and interact with the blockchain, processing users' transaction requests. Together they support an array of functionalities, including but are not limited to smart contract ("smart coins" in Chia's case) management, transaction activity management, and analyses of the blockchain. Smart coin management ensures the states in which users are trying to change are up to date on the blockchain and hence the transactions are valid when submitted; activity management and chain analysis are means to ensure, while complicated operations are behind the scenes, users can rest assured and observe high-level abstraction of their own activities as seen below.

Figure: Transaction activities displayed in the wallet.

Yet, current dApps (and other dApps on the way) are replicating an overlapping set of logic with the wallet underneath, performing smart coin management and blockchain analysis parallel to the wallet. In a simpler sense, dApps have to spend resources to set up their infrastructure (i.e. Chia full nodes) to deal with the abundance of activities on-chain. This creates two problems:

  • Functionalities are very entangled that transactions may go through either the dApp's own infrastructure, or through wallet's infrastructure. This trilateral relationship is unfavored in computer system design as it ambiguates the responsibilities and roles of dApps and wallets.

  • Development effort of dApps is high owing to the nature of the complexity of blockchain node deployment. The need for a dedicated infrastructure unavoidably creates an incredible entry barrier for blockchain enthusiasts, whose desire is no more than a backend-less web3 application. We all agree this would hinder the ability for the Chia community to grow rapidly.

We have not even mentioned that current Chia wallets (including official PC wallets and browser extension wallets) have spent so much effort dissecting the whole blockchain simply to locate your transaction in the ocean of activities. This burns away much computational power and energy from your computer, and it bears asking if we can find a better design that hits two birds with one stoneβ€”making dApps easier to develop and allowing wallet to offload most of the heavy lifting.

Web3 does not have to be inefficient​

dApps or wallets do not necessarily have to deal with all the nuisances. We can build a supporting system for web3 projects to allow them to read from and write to the blockchain with APIs (application programming interface). The idea is that blockchain in itself does not require everyone to trustlessly maintain a replica of the chain, but rather, one should be able to fetch and verify any piece of information from the chain. With that in mind, users on the edge can save their precious computation power and device pattern if they choose so, accessing the web3 world through this supporting system.

Let me explain to you why and how exactly does having such a service, or a trusted gateway system to the blockchain, could improve the scalability of the system and thus provide a real-time experience to the end users.

A lightly trusted gateway to the blockchain​

Figure: What the development would look like if we apply the gateway system.

A trusted gateway system to the blockchain is structurally decentralized in its backend and it provides endpoints users can call to execute their web3 business via APIs. It interacts with the blockchain, as well as the dApps and wallets. This system will focus on solving these problems:

  • With the help from the gateway system, dApps can deploy without their own infrastructure and communicate with the wallet directly for information on the blockchain. Some current wallets do not support or intend to support this feature owing to their own infrastructure implementation, but we envision a future where gateway systems are easily accessible to every developer through wallets.

  • Wallets can be a lot snappier now since a significant amount of computation has been offloaded to the gateway system, for all the web3 services (as shown in the figure above). The gateway system will also have a high-performance backend that is responsible for cashing, access control, and bi-directional communication via websocket.

The gateway system to the blockchain could be beneficial to the users and the developers for it could enhance the scalability and responsiveness of the system. It will achieve a greater level of convenience if the demand and usage of dApps in Chia grow higher. But the challenge for the system would be to earn trust from the users and other developers in the defi world.

Even more possibilities?​

The aforementioned gateway system is just an idea that we envision and below are some more of the functionalities we can think of that also serve well:

  • An activity-based analysis of the whole blockchain can be easily carried out by the gateway system. For example, standard Chia farming and transfer events, CAT minting/melting/transfer events, NFT minting/transfer/royalty collection events, etc. This activity feed can be collected by wallet users or blockchain explorers, avoiding showing end users coin sets which are hard to parse for human eyes.

  • If the users provide an observable wallet public key, the gateway system can even effectively provide a non-SPV wallet to browser extension users. That means, you will have a seamless experience transitioning from Chia official wallets to extension wallets!


We talked about the current development in Chia and painted a picture of an easier development in which responsiveness and scalability are achieved via a lightly trusted gateway system. We believe that such a gateway system could be favorable to the users and developers, and maybe you have a better idea to foster the ecosystem!

Β· 3 min read


Hello Chia holders and Hashgreen's friends, welcome back to another Hashgreen's weekly update. Last week, there was a bit of turmoil after Chia posted an announcement in their Twitter, stating that the Chia Asset Token (CAT) standard will be upgraded and CAT1 will be officially end-of-life (EOL) and replaced with CAT2.

In weekly update #18, we're going to tell you about this incident, explaining what were the actions that we took in response to CAT2 standard and how Hashgreen DEX's approach enforces trading security.

Timeline of Chia's actions​

Jul 26, 2022 upgrading the CAT standard
Jul 26, 2022 around 10am PDT (after block height 2,311,760) CAT1 EOL
Jul 27, 2022 v1.5.0 live
Jul 28, 2022 blog post updated
Jul 30, 2022 CAT1 vulnerability explained

What happened?​

Within a few days, Chia continued to release a series of updates and announcements, finishing upgrading the CAT standard, bringing v1.5.0 live, and explaining what exactly was the vulnerability of CAT1 standard coin after the upgrade was finalized. Details are included in their blog post.

Luckily, this "Cat Bleed" was never exploited, confirmed by Chia's team. The concern was raised by Trail of Bits, a security auditor which helps Chia to audit, addressing "a potential class of vulnerabilities that led the team to uncover a security vulnerability with CAT1". To summarize it, the issue was a potential vulnerability that could be exploited by anyone to print as many fake CATs as they want. Chia later released a technical article explaining the vulnerability they uncovered for CAT1.

Chia also suggested actions for users and CAT issuers to follow in order to move forward from the EOL to CAT2. Users are advised to download 1.5.0 client, cancel their offers, check their CAT1 balance, and wait for the airdrop of CAT2 from issuers. CAT issuers are provided with an official tool for the re-issuance.

Actions for Hashgreen​

Jul 26, 2022 halting all trading activities
Jul 27, 2022 reminding users to keep up-to-date
Jul 27, 2022 Chia’s official wallet and API trading back in our DEX
Jul 28, 2022 trade resumed as issuers re-issuing their tokens

Hashgreen were able to react after the news came out on July 26th. We quickly took actions, incorporating frontend, backend, and operations to adapt to the change. We halted all CAT trading activities and offer uploading from our API and tweeted the information to the public, reminding users and token issuers what they should do and be aware of about the upgrade. Before the release of Chia Blockchain 1.5.0, we had also hidden all the CAT1 markets to prepare for CAT2's data migration from TAIL Database.

To prevent any exploit from happening, Chia suggested users to cancel offers that have been uploaded or shared on the internet, especially those providing XCH for CAT1s. With our approach of aggregating offers, you don't have to cancel offers that you uploaded to our DEX since, essentially, no one will be able to take down any of it once all the trading activities are halted.

Our team were able to upgrade Hashgreen DEX and resume all the trading activities hereafter as the CAT issuers continued re-issuing their coins. Once again, if you are a trader, we recommend you to update to v1.5.0 as soon as possible and please beware that CAT1 is no longer acknowledged by Chia's wallet.


Please beware that CAT2 has a different asset ID than its CAT1 version.

Β· 3 min read


🌱 Hello Chia holders and Hashgreen readers, welcome back to another weekly update. In the previous update, we explained two fundamental ideas in decentralized finance (DeFi), that is, order books and swaps. Some of you may already know these concepts, but we believe a succinct explanation is needed to let everybody know what's going on and what product they are using.

This week, we have a few updates that we would like to tell you about.


tutorial page, my orders pagination, adjustment of landing page on the mobile, and the update for amm.

What's Been Done​

  • The tutorial for Hashgreen DEX is out now! Considering the complexity and the novelty of DEX, we release a tutorial segment as a guidance for users who are new to our page or not familiar with the landscape of DeFi.
Figure: Tutorial will pop out for first time users.

  • We will guide you through the main features of Hashgreen DEX, in the hope that you will quickly understand how to trade in Hashgreen DEX. (You can also visit our Docs for more information. πŸ’–)
Figure: Follow the steps to learn key features and how to trade.
Figure: You can always find the tutorial here in the navigation bar.

  • We've added pagination in My Orders. A page can display up to 8 transactions, and below the panel lay the pagination buttons where you can click to see your transactions collated and presented in different pages.
Figure: Click different pages to view your orders.

  • Our team has made a few adjustments to the appearance of our landing page on different mobile devices.

What's Rolling​

  • We at Hashgreen have had some gradual progress along the way building the AMM. The development is now in full swing. Our team has almost finished the smart contract's high-level design and only micro adjustments are needed for future implementation. We want to secure a seamless end-to-end trading experience in which our dApp interacts smoothly with the connected wallet.

  • Concrete plans of tokenomics and functionalities will be out around early September, and the same goes for the whitepaper. We will release an alpha version, "Alpha Testing", on the testnet and start testing it around early November. Alpha Testing is opened to community members on Testnet10. You are absolutely welcomed to join our Alpha Testing and if you do so, you can accrue alpha tester status (possibly rewards!). Once we make sure everything is well prepared and settled after Alpha Testing, we will formally launch the service, set to release in 2023, on Mainnet. By the time "Mainnet Launch" gets going, it will be available to everyone, accompanied by the releasing of Hashgreen token.


Β· 4 min read


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?​


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
price discoveryless efficientmore efficient

Β· 3 min read


🌱 Welcome back to another Weekly Update from Hashgreen, Chia's holders and friends! In the previous update, we talked about the updates and guidelines for the translation project of Hashgreen DEX (you are always welcome to contact us via Discord or Twitter to suggest a language or offer to help with the translation), and this week we have brought you an important update especially for mobile device users.

What's Been Done​

  • Thanks to the help from our translators, German has been updated to our DEX!

  • Users can now enjoy a better and smoother experience using mobile devices to visit Hashgreen DEX! What are the differences that you see? 🧐 Tell us your feedback!

Figure: Try it out for yourself on the phone!
  • Our team has updated the interface of our DEX to make it render well with mobile devices, granting users an optimal experience no matter which mobile devices you are on.
Which devices do you use the most to visit our DEX? πŸ’» or πŸ“±?

When would you use your phone to check our DEX instead of your computer?

  • We did observe that there are a number of users who would visit our DEX on their phones from time to time and we believed that there indeed is some latent demand or at least some inherent tendency for the users to visit our website while they are checking their phones. That's why we released this update, adjusting the layout and the aesthetic of our website, for users who opt for mobile devices.

  • One of the reasons we did not make this feature a high priority in our development schedule is due to the fact that users cannot trade with their phones. There might be services that can solve this problem in the future, but for now it's not possible.

  • We asked the community about what devices do you use the most when you visit our DEX, and the answer pretty much echoes with our observation. According to our data in Google Analytics, around 80 percent of the users visit our DEX using their desktops, and 20 percent of them use mobile devices. Isn't this interesting? Although desktop users form the predominant part of our users, there is still demand and feedback from mobile device users.

  • If you have any questions regarding the update or you would like to offer help with the translation, please visit our Discord or Twitter and reach out to our members!

What's Rolling​

  • Our team is working on releasing an interactive introduction for users who visit our website for the first time.

Β· 2 min read


What's Been Done​

Welcome back to another weekly update for Hashgreen! It's been a great week continuously developing our product, and this week we are going to give you an update on the translation project for Hashgreen DEX and also some random updates of Hashgreen!

  • Hashgreen members were having a monthly meet last Friday! Monthly meets are one of the great ways to keep everyone connected, especially when the members are all working remotely.

  • We are going to have an office space in Taipei!

Updates on the i18n project for Hashgreen DEX​

  • Last week, we began the translation project for Hashgreen DEX using Crowdin, a cloud-based localization management platform that enables both collaborative translation and management, and we're lucky to have multiple volunteer translators to help us with our product. So far, we've had 11 project members assisting us with the project and in total 9 languages listed to be translated.

  • Again, we are constantly looking for volunteer translators or proofreaders to help us, so if you are interested in it, please don't hesitate to contact us via [email protected] or visit our Discord for more information.

  • For translators and proofreaders, we prepared a tutorial and some guidelines on how to complete the translation and what they should pay attention to when translating. Below are general explanations to the process of translation:

    1. Achieving "conceptual equivalence" in each of the source and target languages.
      The translation should convey the same meaning as the source language, and it should also remain natural and acceptable in the target language.
    2. Limited length of source string due to the design of the interface.
      Try not to let the translation surpass the original text length.
    3. Completion rate of translation above 95% is the parameter.
      The translator should complete at least 95% of the translation, otherwise the translation will not be updated to our DEX. We will update languages that meet the parameter on a periodic basis.
  • Your assistance is always one of the most precious things that we deeply appreciate, and in order to express our gratitude, there might be some random surprises given to those who help us with the translation project. 😜

Β· 3 min read


Good morning Chia 🌱, Chia's holders and Hashgreen's readers! We are back again for another weekly update. We are excited to share with you some updates for Hashgreen DEX, including the live market trading chart and the language support that comes back. Without further ado, let's get started!

What's Been Done​

  • Live market trading chart is now officially released in Hashgreen DEX! Open your trading page and try it out for yourself! Over the past weeks, our team has dedicated to the work of visualization and the facelift of the user interface according to this new feature update.
Figure:✨Brand new interface with the live market chart.✨

When there's a huge amount of data, it usually takes longer time to load. 😬

  • With the live market trading chart, you are able to click through different market pairs to view the real time changes and the history of the difference in price laid out for each market pair. You can decide on your own to select the range of time or the price scale at different intervals, and the chart will change its display correspondently to your adjustments.
Figure: Click here to change the frequency of data aggregation.
Figure: X-axis marks the time. Select different date ranges here.
Figure: Y-axis marks the price. You can choose between different price scales here.

  • The chart will also track your mouse movements and show you the price at a certain point of time when you hover your mouse within the market chart.
Figure: The chart will display the price according to where you lay your mouse in the chart.

  • Language switch option is now back at Hashgreen DEX! It's now located at the right of the navigation bar and changed into a 🌐 button in which a drop down menu will come up and show the languages we support. Currently we have the support for English, Spanish (Latin America), Traditional Chinese, and Simplified Chinese. We will continue to add more languages in the future.
Figure: Click the button to choose the language.

What's Rolling​

  • Although we've already had four languages supported now at Hashgreen DEX, we still would like to support as many languages as possible. We posted an announcement at our Discord two weeks ago, asking for volunteer translators to help us. Up to now, we've had a few volunteers who are willing to help! And we still need more people to help! We are now looking for volunteer translators and proofreaders. If you're interested and would like to help, please visit our Discord!

We are always grateful for the help and support you provided to us, and thank you again for the love and support!

Β· 4 min read


Welcome back to another Hashgreen's weekly update! Previously on Weekly Update #11 we talked about the design features that began to take shape for the AMM, hankering for the best outcome to our users and to the ecosystem. We also announced a few updates and a call for volunteer translators. If you are willing to help with the translation, please visit our Discord.

This week we will be taking you through two topics: the AMA we attended earlier this June and our thought and expectation for offer2 according to the feedback from the community.

Hashgreen at Chia in China's AMA​

What Chia is trying to solve with its NFT standards​

In the AMA held by Chia in China, we introduced our products and talked about offer features and Chia's NFT standards. Below are three factors we mentioned about Chia's NFT during the AMA, namely what Chia is trying to solve and realize with its NFT standards.

  • Autonomous offer trading: to trade without authorization from a third-party platform.

    Chia does not need you to authorize a third-party platform to operate for you. This could fundamentally prevent users from getting scammed.

  • Decentralized Identifier (DID): to verify the authenticity and to prove the ownership.

    Has it ever happened to you when you bought an NFT and later discovered that it was an impersonation scam? This is what Chia wants to solve with its NFT1 standard. DID is like a digital identification that confirms the authenticity. With such method, creators or project owners can have their NFTs connected with their DIDs, proving the ownership with the digital identity.

  • Royalty: to pay profit-sharing to the author of an NFT.

    How many percent of royalty payment should be given to the author of an NFT is what Chia's figuring out and this is going to be one of the core ideas for NFT1.

Chia's NFT is definitely a worthy path to take and a pull factor that attracts developers, investors, and users to come, especially when there's a variety of paths such as DEX, NFT, and DeFi that people have embarked on to develop or build Chia's infrastructure.

Regardless of which path you are going to take or have taken, we, Hashgreen, are always pouring ourselves into helping these projects, including NFTs. Most importantly, providing a steady and strong base for Chia's community is what we expect and choose to do to allow all tokens in Chia to be able to trade.

Committed and Uncommitted Offers​

What we think offer2 can hold for us​

Offer files (”offers”, β€œoffer1 standard”) have been one of the biggest drivers for the community activities in Chia, as it provides a p2p way for people to trade trustlessly and securely. As one of the first adopters of offer1, we love it so much that we start to think what we ultimately want it to evolve into based on the feedback of many DEX users. We heard these feedback:

  • Why does my attempt to fulfill the offer fail?

    Ok, so this relates to how current offers are structured: they are not commitments on the chain to indicate token swap intentions, but merely a memorandum of understanding. The offer makers can withdraw their offers any second by spending the recorded coins in the offer, while you, the offer taker, have to check if the coin still exists beforehand.

    Can we make this process better? Yes! In fact, the offers should be on chain with two possible exit paths: either via settled swaps or clawback after some timeout. You can be assured that the offer is still 100% valid as long as you peek into the coins and you know for how much longer they will continue to remain valid.

  • Is there a limit price I can put? Partial fill?

    No limit price. No partial fills. Ouch.

    This is most of our experience with the current DEX on Chia, and we understand it so much more. We would call it lack of feature rather than a bug for offer1, as the logic for limit price and partial fills are very custom to fungible tokens. The logic for offer1 is perfect, for example, for NFTs as they need to be exchanged in whole. We think a good offer2 design should leave rooms to house some custom logic, including things like β€œallowing transactions to go through as long as prices are above this price” and β€œself re-instantiation if certain conditions are met”.

From an AMM building perspective, we think having an offer2 that satisfies the above criteria would allow an easier exchange of funds, thus increasing liquidity and capital efficiency in the Chia Blockchain. So, rest assured folks, while Hashgreen Labs continues to build on Chia!

Β· 3 min read


What's Been Done​

AMM's Design Features Explained​

Hi Chia holders! We at Hashgreen have some updates on the long awaited AMM! Over the past weeks, while we have implemented basic building blocks for the smart schemes, more importantly we are composing these blocks to ensure users have great experience trading and participating in our ecosystem.

  • A sustainable token and distribution scheme for the Hashgreen ecosystem:

    We want to bake our tokenomics directly into our AMM by highly incentivizing the first batch of supporters for their rapid adoption. On the other hand, we are considering allowing not only liquidity providers to earn (liquidity mining), but also protocol owners β€” each and every one who owns the Hashgreen token β€” to earn.

  • Fair pricing of token pairs:

    We all know there are huge Miner Extracted Values (MEVs) in the Ethereum ecosystem, and especially when it comes to trading, miners can easily manipulate the orders of contract interaction in their favor. Chia Blockchain does not have this problem, and we enforce a rule of single price per block to prevent market manipulation. Everyone who interacts with the AMM gets the same price and does not get front-run.

  • Name your slippage tolerance and commitment period:

    When you put orders in to buy from/sell to the AMM, on top of the assured fair prices, you can additionally specify a maximum slippage tolerance you are willing to accept, and until when the order is valid. These fully adjustable parameters will make interactions with AMM a very familiar experience compared to existing ones you have used before.

There are many more design features we are currently working out! If you have questions, feel free to shoot message at our Twitter or Discord!

What's Rolling​

  • Language switch option is about to be released again in the near future! As we would like to support as many languages as possible, we are looking for volunteer translators! If you are interested in providing help, please head to our Discord server and write a message in #translators or DM @HG | Daisy and @HG | James to let us know.

  • Lately we've noticed that there's some impersonation scams in Chia's community and people have been affected by it. Thanks to the community's effort and your report, we were able to identify it and withdrew it from circulation in our DEX. Please be extra careful when you make any transaction, and make sure you have a full understanding of the background of the tokens you're going to trade. The effort in identifying and terminating scams is also attributed to the token listing mechanism in our DEX, where the data is reviewed after being imported from TAIL database API. We are currently working on adding warning messages in the DEX to help you and please keep careful watch for potential scams whenever you trade.

Β· 5 min read


What's Been Done​

Over the past week, we've had Goby successfully integrated into Hashgreen DEX and we've also shared an interesting discovery made possible via a tool we developed that analyzes and reifies blockchain activities on Chia. If you'd like to see more of the cool graph analysis, please visit our tweet here and join the discussion.

Transaction Fee and Chia's Coin Set Model​

  • We received some feedback from you related to the mechanism of transaction fee and the coin set model that Chia uses. Chia released in Chia Blockchain 1.3.4 the function of allowing makers to create an offer with a fee in order to help get the transaction onto the blockchain. According to the release, now when you want to make an offer in Hashgreen DEX, you can always add a transaction fee via Chia wallet or Goby wallet to ensure the priority of your offer in the queue. (See Best Chia Projects Bootstrapped on Hashgreen DEX for more.)

  • Sometimes problems such as amount higher than spendable balance would occur when you try to make an offer. This is likely due to the characteristics of Chia's coin set model:

According to an article written by Bram Cohen, he explains in the second paragraph:

  • The only persistent data is the current set of unspent coins, which have sizes and rules about how they can be spent.
  • When a coin is spent it can make new coins using its value but the original coin is gone forever.
  • Take the following scenario as an example: You have 20 USDS in your wallet and you'd like to create an offer to buy 1 XCH for 10 USDS.

    • Due to Chia's coin set model, your 10 USDS may consist of different coins in one package. Possibilities of the actual allocation could be: (A) one coin sized 20 USDS, (B) two coins sized 18 USDS and 2 USDS, or (C) whichever amount of coins that sums up as 20 USDS, depending on how the original transaction looks like or how many coins that are originally in your wallet. As you make the transaction, it sends the entire amount (or the highest amount of coin that you have) to the blockchain, then the change will be sent back to you.

    • In such a case where you have one single coin sized 20 USDS, your coin will be sent to the blockchain, destroyed, and split into two coins of 10 USDS, one of which will be spent, while the other will be given back to you. Before the transaction is sent to the full nodes (mempool, actually) and waiting to be included in the blockchain, you may not be able to make another offer since technically you don't have any coins available to be spent in your wallet.

    • Therefore, whenever you try to create another offer, you won't be able to do so, and that alert message amount higher than spendable balance will show up to remind you.

User ID​

  • If you are transitioning from one device browser to another, you can use user ID to migrate your order and trade records. Previously on Weekly Update #6, we mentioned the function of user ID and how to use it. We would like to elaborate on this function, explaining more about the use and things for you to notice.

  • Users can import trade records from one device or browser to another. Please note that user ID is bound to the browser you're using. In other words, it will vary depending on the browser or device that you use. When the data migration is done, the original user ID will become invalid, which means you can no longer see the trade records in the original one.

  • Data migration will not be affected by the status of your wallet connection.

What's Rolling​

Two weeks ago we had a Twitter poll asking for your feedback about the integration of Goby wallet, and we received a handful of your feedback for the update. We would like to invite you to tell us about your thought of using Hashgreen DEX.

Feedback wanted​

  • Now we are looking for users to share with us your feedback. If you're interested in helping us improving our product, drop a message in our Discord channel #ideas-and-feedback or tag @HG | Daisy and @HG | James in #general to let us know! Or you can just tell us about your feeling of using Hashgreen DEX and what can we improve directly at #ideas-and-feedback. Feedback is always wanted and appreciated!

  • Example feedback questions:

    • Your experience using our DEX
    • Opinions of the functions or design we've had
    • Any idea of tools or functions that can be integrated into our product

Β· 3 min read


What's Been Done​

  • Goby wallet has officially been integrated into Hashgreen DEX! 🀩 You can now make or take offers for Chia Asset Tokens (CATs) directly in the browser. Enter the amount you wish to trade in Hashgreen DEX to match offers!

  • We've received many valuable feedback, especially those from our Twitter poll since the release of Goby wallet integration on the testnet last week. It seems like the majority of you are all hyped up about the integration of Goby wallet into Hashgreen DEX, so am I! Our team has begun modifying and adjusting details of the integration since last week, and we will keep on making sure that Hashgreen DEX and Goby are well-coordinated.

    • We modified the notification message of wallet connection's status to give users a more definite indication.
    • We fixed the bug in which the displayed address of the wallet was not synced with Goby.

3 Steps to Trade with Goby Wallet in Hashgreen DEX​


Please make sure you have installed Goby web extension with any of the supported browsers and have your Goby wallet ready.

  1. Connect to Goby
Figure: Hit "Connect Wallet" at the navigation bar and a tab "Choose Wallet" will show up.
Figure: Choose Goby as the wallet to connect.
Figure: Connected! You are good to go.

  1. Check wallet information
Figure: Once it's connected, your address will be shown. Click to check wallet information.
Figure: You can copy your wallet address and disconnect your wallet here.

  1. Start trading
  • Hit the offer in Order Book to trade
    Figure: Hit the offer you'd like to take and hit "Trade" once trade info shows up.
Figure: An independent tab will pop up from Goby. Hit "Sign" to approve the offer.

  • Make Offer directly in Hashgreen DEX
    Figure: Enter the amount directly in this section. Hit the arrow if you'd like to switch.
Figure: Once the amount is entered, unit price will be shown and you will be able to hit "Trade".
Figure: An independent tab will pop up from Goby. Hit "Sign" to approve the offer.

Few things to be aware of...
  • As you make a new offer on DEX, Goby will automatically create a same offer in the wallet.
  • If the transaction fails on DEX, make sure to cancel it in Goby as well.

What's Rolling​

  • Our development team is working on syncing data between different devices. We discovered the demand and benefit of syncing data across different devices, and it would be natural and more convenient for users to track their orders (i.e. My Orders in DEX), granting the fact that transactions are conducted via different devices of the same user.

Β· 3 min read


What's Been Done​

  • Our team has finally released an official update for the light/dark scheme in Hashgreen DEX after fixing some bugs that occurred when switching between schemes. We've also made small adjustments to the color composition of the page in different schemes to increase readability. You can set up dark mode by clicking the switch button at the navigation bar.

  • We've also worked through a few bugs of the frontend interface, making sure that your feedback is received and dealt with at all times.

What's Rolling​

  • Wallet integration for Goby is coming! 😍 The development team has been devoting to finalizing wallet integration into our DEX, and now we are one step away from the one-click trading experience that you've all been waiting for. Before the launch of Goby integration, which will soon be announced, we would like to invite you to help us test the wallet integration on the testnet and give us some feedback. (Instructions are given below.)

  • We have also started a poll at our Twitter, inquiring your feedback of which part of the integration that you love the most and which part of it can be improved. After you've tried it out at the testnet, please visit the page, vote, and leave us a comment. You can also visit #ideas-and-feedback channel at our Discord to share with us what's your thought about it.

How Can you help to test the wallet integration?

We will create a test market TFRIES/TXCH at the testnet and upload enough offers of TFRIES requetsing TXCH for you to make offers. You can also create offers with either one of the coins.

Follow the Steps to Test Goby Wallet Integration​

  1. Make sure you have installed Goby wallet in your PC.
  2. Enter Hashgreen DEX's testnet.
  3. Connect your Goby wallet with Hashgreen DEX.
Figure: Hit "Connect Wallet" at the navigation bar and the tab "Choose Wallet" will show up.
Figure: Choose Goby as the wallet to connect. Then a tab will pop up.
Figure: Type your password to unlock your Goby wallet.
Figure: You have successfully "Connected with Goby".

  1. Switch from Mainnet to Tesetnet10 in your Goby wallet.
    • Open your Goby wallet web extension.
    • Go to Setting.
    • Hit Advanced Options.
    • Hit Networks.
    • Change from Mainnet to Testnet10.

Once you've switched from Mainnet to Testnet10, the color of your Goby web extension should change from green to blue. That's one way to tell if you have done it successfully. 😏

  1. Visit this page and paste your address (It will be a long string beginning with "txch") to collect TXCH. You may wait several minutes until TXCH is received.
  2. Go back to the trading page to make offers with TFRIES/TXCH.
  3. Give us your feedback at our Twitter or Discord.

Β· 2 min read


What's Been Done​

  • Our team has released a brand new landing page of Hashgreen DEX. Over the past week, We've renovated the look of our landing page, including a few navigation components. We've also added a live market status menu in the landing page, allowing you to instantly check upon the trade information at the landing page.
Figure: A brand new landing page is out!
Figure: Scroll down to browse the current market status in the landing page.
  • You can browse the trading pairs or you can type in the search bar to search for the markets. Once you've identified the trading pair, you can hit the Trade button at the right end of the live status, and you will be directed to the exact trading page in Hashgreen DEX without having to select the market pair again.
Figure: Type here to view the live market status!
Figure: Hit the button to trade. It will lead you directly to the trading page.

What's Rolling​

  • The development team has been striving to release major updates that we planned to integrate into Hashgreen DEX. In light of the situation that we decided to prioritize and focus on the major updates, the release for an optimal internationalization will be postponed. The language switch will therefore be temporarily taken down for maintenance in the near future.

  • The team has been working on an update for the light/dark scheme. We will optimize the switch and release it soon.

Β· 4 min read


Hello to all the readers, who have stayed with Hashgreen along the way!

My name is James, the newly hired community lead of Hashgreen. I will take charge of the Weekly Update series and carry on providing information for future product updates. Harry will still publish tech blogs from time to time, leading you through finer details of Blockchain technology related to Chia and Hashgreen.

Over the month, the Chia community seems to have been less active than before, yet with the recent release of Chia Blockchain 1.3.4. As for us, we have made a few updates on Hashgreen DEX.

What's Been Done​

  • Over the past few weeks, our DEX development team has implemented multi-offer upload into the web interface to make the process of transactions quicker and easier! Users can now upload multiple offer files simply by clicking the upload button or dragging and dropping offer files directly into the page.
Figure: You can now upload more than one offer file!
  • A new design of open orders and order history (now called my orders) is released. It's easier now for you to check the status of your orders and even make adjustments to it with a few clicks. Details of the trade information will be shown in the display board. The two dropdown menus at the top allow you to filter certain types of offers that you wish to see. You can also cancel your offer using the cancel button in the action column. Or you can cancel multiple offers by selecting them at once.
Figure: Click all markets or all status to manage your orders.
  • Our team has updated a new interface for the order book, in which we re-oriented the menu of the offers. Offers asking or bidding a certain coin will be aligned with each other. You are able to expand or close the panels, to either compare the asking and bidding price or leave the order book with only one of the offers presented.
Figure: You can zoom in to see specific types of offers.
  • We have released an update for the header! We add a control button where old headers are put together with the user ID button that was temporarily removed. Light/dark scheme switch and language options are moved to the header as well.
Figure: User ID allows you to sync between different devices.
Figure: Here is the button to copy your user ID.
Figure: To merge records, press import once you enter your user ID.
  • We've continued to iterate with new features in the DEX, some of which are dedicated to the feedback from our Discord community.

What's Rolling​

  • AMM is still under slow but steady development. Enabling AMMs on the Chia Blockchain turns out to be a really hard problem! If you'd ask us when you will have HashgreenSwap to test out on the testnet, we expect it to be here in another two quarters! In the meantime, we are starting to think about the tokenomics for the Hashgreen Token, to not only allow the profits to circulate back to the community but also create an active and healthy scheme that lasts long.

  • In order to ameliorate the user experience, the UI/UX team will continue to remodel the web interface. We are working hard on the new landing page besides a few more integrations!

Β· 7 min read


Over the months, since the release of Chia Asset Tokens (CATs) and Offer Files, we have seen a whole herd of CATs. At the time of writing, there are 289 CATs listed on TAIL Database, 580 CATs tracked on, and 72 CATs traded on Hashgreen DEX.

In the past two weeks, we have implemented automatic tokens importing from TAIL Database, and starting this week, we will synchronize our CAT markets with them on a weekly basis. Original (OG) tokens that are already listed with us will receive a blue checkmark to signify that we know what party is behind the token and where to contact the issuers.

To allow users to browse over CATs more efficiently, we categorize CAT markets into several types - stablecoin, NFT-like, meme tokens, platform tokens, and Chia official tokens. You can also search for and star your favorite tokens directly in the menu, saving you time and hassle to search up the CAT.

The new market selection menu allows you to quickly search up your CATs 😍

As a DEX development team, we have seen various project teams during the period trying to engage their community in very creative ways. Specifically, there are a few different ways that we think are exciting that involve the Hashgreen DEX team in the loop, and we would like to share their experiences with you, in hopes of inspiring the future development of the Chia community.


Airdropping your tokens is the best way to get traction from the community. After all, who doesn't love free tokens? There are a few project founders who have worked with us in the past to utilize our soon-to-be-releasedβ„’ airdrop tools.

Niocoin (NIOC), Nine (NINE), Fund My Laptop (FML), and Zomb Studio (ZOMB) are the projects that worked with us to airdrop their tokens, under the condition that token receivers have followed their social media accounts and Hashgreen's Twitter and Discord.

Over the airdrop campaigns, we have tested several aspects of our code, including blockchain reorgs, duststorms, and our smart batch execution of airdrops. Resilience to these network conditions, and having a framework to minimize the impact of the UTXO (or coin set) model on the transaction execution are crucial for all the development teams on the Chia Blockchain.

What is a re-org (re-organization)?​

Re-orgs happen when there are temporary blockchain forks, and subsequent farmers ultimately choose one to continue, leaving the rest re-org'ed. What the users will experience is, that the supposedly settled transaction will revert from its temporarily confirmed status, and this feature of the blockchain is exactly why on Hashgreen DEX we employed a 16-block confirmation to allow you to track how sure the fund settlements are.

What is the dust storm?​

Reddit explains it better than we do, but essentially some parties are spamming useless transactions on the blockchain, creating congestion and fee market at the same time. To note, this is perfectly normal - there is nothing shady with creating a dust storm, as blockchains are built to withstand these transaction requests. The dust storm transformed the Chia Blockchain into a place where all project developers and users are required to be aware of fees, which is healthy and sustainable.

To summarize, here are some catches with airdrops:


Airdropping brings high traction for your project since you directly provide them values, whether that value can ultimately be realized or not.


Airdropping would unavoidably distribute a large number of your tokens to the wild so that there will be more supply than demand for a certain period that follows. Make sure you have the corresponding plan to create demand by implementing events and platforms for people to meaningfully use your token.

Peer-to-Peer Token Offering​

There is a load of exciting NFT projects going on on the Chia Blockchain! While the NFT standards are still under development, a few token communities are already offering fungible tokens that are promised minting rights, and some of them bootstrapped their NFT projects on Hashgreen DEX!

Space Marmots Premium (SM1) and Ultimate Farmer Club (UFCG) worked with us to utilize our market and order book API to automatically provide peer-to-peer offerings to the users. They combined have more than 100 successful token sales on Hashgreen DEX, and these events were very successful due to the project development teams' swift actions and a diverse set of capabilities that our trading API provides.

Catmosphere (CATMOS) employed a cool strategy where they not only were selling their token at a price of 0.0010 XCH, but also offering a buy-back at 0.0011 XCH. All of these were done programmatically, and users can buy/sell the CATMOS token at will. The offerings provided an anchor to the price of CATMOS, and brought interest into the Catmosphere community and Hashgreen DEX. Over the period, CATMOS was even the most traded asset on Hashgreen DEX!

What can Hashgreen DEX API do?​

We offer a variety of functionalities from market exploration and public order book information, to private order management. The market statistics endpoint which provides real-time token price information and capitalization, is now being used by TAIL Database and XCH Universe (Let us highlight you by reaching out to [email protected] if you are also using them!).


P2P Offering is a wonderful stage for NFT projects as we head into the heated development of NFT standards, which will be finalized sometime in the near future. It also provides the development team with sufficient funding to kick start their further larger-scale development.


P2P Offering requires that you run a close-knit community group, and it is very prone to introduce user complaints when not enough updates are given back to the community.


As many project devs have found out, community members love to accept challenges to pick their brains!

Space Marmots Premium (SM1) and Easter Egg (EGG) ran their exciting trivia events respectively on Groundhog Day and March 9th. Their formats are not exactly the same, but both involve a series of meticulously designed questions that lead to some web pages, further pointing to more carefully hidden links with steganography. In these links, community members can find their offer files for the CAT as a sweet reward.

We at Hashgreen had much fun co-hosting and spreading these events, and were more than happy to work with any project devs!


Trivia is the most intimate event you can host with your community. It sets up this metaverse for them so they learn the backstory of the project, tokens, and dynamics. They can even act as future advocates for your project!


Obviously, you cannot send out a large amount of your tokens on a trivia event - it is meant to be special and rewarding. It also takes quite some time to design the trivia questions and make them decently challenging but not excessively challenging, so your event ends within a defined time frame.


We talked about three different ways to kick start your Chia Asset Token (CAT) project: airdropping, peer-to-peer offering, and trivia games. There are a lot more CATs we are trading now on Hashgreen DEX, and we conveniently categorized them for you: stablecoins, NFT-like tokens, meme tokens, platform tokens, and official Chia tokens. We believe it is an exciting exploration scrolling through the different categories, and maybe you can find another cool project to follow in the long run!

Start peer-to-peer trading today on Hashgreen DEX at

Β· 3 min read


What's Been Done​

  • Over the past weeks, fees on the Chia Blockchain seems to be here to stay. To allow our users get their transactions on chain quicker, we now provide users with the ability to supply fee by adding to the supplied Chia amount or removing from the requested Chia amount in their offers. The suggested fee is hinted on the pop-up window for order book items, and is currently 0.0001 XCH. We chose this number since it not only suffices to be on top of the mempool, but is miniscule (7 cents USD at the time of writing) for users. In the future, we plan to implement more accurate fee estimators to give better fee hints and save you some bucks.
How is it done?

With Chia offers, Hashgreen is able to redirect the provided fees into a temporary address, then we generate a SpendBundle on the fly to spend the extra amounts as fee. This SpendBundle is then aggregated with the user offers before we push it to the Chia Blockchain.

Figure: These are two different options you can provide to match an offer you like


  • We made it easier for users to submit your orders! Simply copy the amounts provided in the pop-up panel when you hover on the offers you want to match against with the copy button. You can also paste your offer file string directly on the web interface.
Figure: Here are the button to copy your preferred amounts to supply


Figure: In the official Chia wallet, use this copy button to copy the raw offer file into your clipboard


Figure: Press this big paste button to upload your offer file


  • Many partners are starting to integrate our Market Statistics API into their platforms. The previous generation were slow and bulky, taking nearly 30 seconds to complete a call. We have optimized it to return the results in under half a second.

  • New market selection menu is now available at UAT interface. If you want the UAT interface to connect with mainnet, head to UAT settings and toggle on PROD.


  • We fixed many bugs on the frontend interface, including incorrect display of order status (sometimes it shows "Confirming undefined"), and user token retrieval errors.

What's Rolling​

  • The smart coin team is coding up the first version of AMM coin driver for an MVP AMM protocol. As time goes on, we will gradually implement more standard functionalities in current AMMs!

Β· 2 min read


What's Been Done​

  • Over the weeks, we have been observing some users to submit deliberately mispriced orders and as a result, displacing the price reported in market statistics. We have adopted feedback from our community member Bluemoon to filter trade prices according to the current order book. The price field now is a stabler measure of the market. For existing API users who require stable price sources, there is nothing you need to do; for developers who want to see all trades including the mispriced ones, please check out Trade History API.

  • You can now access all market statistics with Market Statistics API by leaving the market_id field blank.

  • Over the course of the week, we added several tokens, including Little Lambo Coin, Green Wings, and Easter Egg. These community developers are have a blast with all kinds of activities! Active participation from community members is a critical factor to a project's success, and we enjoy co-hosting all sorts of events to foster the communities.

  • We implemented support for fee on Hashgreen DEX and will soon roll out on the mainnet. Under dust storm conditions, it might take a few hours to settle your trades, but now you will be able to optionally receive a little bit less XCH or pay a little more XCH as the network fee to expedite your orders. The frontend will indicate the suggested fee according to network conditions, and usually a 0.0001 XCH will get your offers settled in no time!

  • The UI/UX team continues to implement the product facelift.

What's Rolling​

  • Goby integration, after reaching out to the Goby team, turns out to be not possible at the time of writing since the ability to make offers from Goby is still being implemented. Current integrations on other platforms rely on the offer taking feature, which has already been a part of previous Goby feature set. As briefly explained in a blog post, we believe an efficient DeFi system would require the operators aggregate the offers, so we are now waiting good news from the Goby team about the offer making functionality.

  • We soon will start listing all tokens on the TAIL Database, compacted in the new market selection menu. You can even star your favorite CATs!

Β· 3 min read


This is a long overdue update to the community! During the past two weeks, we are looking at other aspects of development on the Chia Blockchain.

What's Been Done​

  • We worked with many project developers, including NINE, NioCoin, Zomb Studios, and FundMyLaptop on their airdropping campaign with our in-house airdrop tools. The need for such a tool for project developers cannot be overstated, and we managed to test it fairly thoroughly over the duststorm, sending out thousands of transactions on Chia. The airdrop tools is aimed for a open source later this month.

  • The chialisp team is developing a chialisp library that enables secure smart coin development on Chia, much like OpenZeppelin on Ethereum. The goal is to not only establish a set of tools for easier smart coin development, but also re-implement some standards (e.g., CATs) for these advanced developers to understand the use case. Below is an sneak peek on the square root function we implemented which would be a core utility function for AMMs!

;; Babylonian method for square root.

(defun cypher.math.sqrt-loop-babylonian (var var1 var2)

(if (> var1 var2)
var var2 (/ (+ (/ var var2) var2) 2))

(defun cypher.math.sqrt (var)
(if (> var 3)
(cypher.math.sqrt-loop-babylonian var var (+ (/ var 2) 1))
(if (> var 0) 1 (if (= var 0) 0 (x)))
  • The backend team wrapped up integration with the TAIL Database. We now have all the community CATs in our database, and once the new market selection menu is rolled out, you will be able to easily search up token markets!

  • The UI/UX team worked through the first draft on the user interface refactor on Figma.

  • We onboarded a frontend engineer, Henry, to help with mobile wallet integration. He will work with Goby wallet to enable that one-click trading experience.

What's Rolling​

  • Goby integration is apparently the most requested feature! However, unlike offerpool and offerbin, Hashgreen implements our technology to be an offer aggregator so the raw offer files are never exposed to fellow users. We instead ask the wallet to upload a counter-offer to our website, which we can then be combined with existing offer on Hashgreen for blockchain execution.

  • Due to the shear number of CATs out there, we are prioritizing the market selection menu refactoring. The upgraded menu would allow you to easily navigate hundreds of CATs, star your favorite ones, and group CATs by their types.

  • We noticed that there is a need for a robust transaction micro-service to handle dApp requests, especially during the duststorm where fee is non-zero and when everyone suffers. This transaction micro-service will not only deterministically make sure a transaction is delivered, but also provide on-chain fee estimates for our upcoming dApps.

Β· 3 min read


What's Been Done​

API Access​

Trading API has been the biggest update for the week. We are committed to provide a diverse set of API for developers so the community can grow with us. At the same time, we would like you to be explicit about the usage of Hashgreen APIs in your products to spread the words! Let us know your story and the creative use of both open market information and statistics.

  • We added USD quotes and USD volume in the market stat endpoint. The fully diluted market cap for the base currency in USD (the token in the front of the trading pair) is also provided as a ball park measure of how big the token is.

Note that the reference prices are only estimates are can be vulnerable to self-trading exploits. Please do not use currency price quotes directly in mission critical systems but only as a good reference.

User Interface​

  • The frontend team has been working hard on i18n (check out the beta site), and will be soon be pushed to the production site. We are offering Chinese and Spanish as a taste test, and are preparing for a community-based translation campaign!


  • The aforementioned market statistics are now displayed as a part of the market header. You can easily judge market liquidity based on the USD volume.


  • We've also worked through a bunch of frontend bug fixes including market selection menu overflow and asset filter menu. We won't bother detailing them but rest assured we are incorporating community feedback.

What's Rolling​

  • Now that we have the fully diluted market cap, we are making a market overview menu to highlight the most traded and the highest cap tokens.

  • The fully diluted market cap does not holistically represent the true market capitalization as any whale can HODL the majority of the tokens. What is more representative is the market cap based on circulating supply which can be tricky to automatically detect on Chia. We are working on some smart algorithms to pick that up from the blockchain.

  • In the long run, we realize we need a more elegant product UI to streamline user experience. The recently onboarded UI designer is starting to work hard on the refactor.

  • We had some very fruitful discussion on the mathematical design of automated market makers (AMM). There are some pretty important implications translating everything from account-based to coin-based models, and we are pretty sure we nailed it correctly.

Β· 3 min read


Happy lunar new year everyone! The Asia-based Hashgreen dev team had a great lunar new year over the past week! We find that our Discord community has been very active, and some updates might get buried under the exciting updates on new CAT tokens joining the family every other few days. Hence we are starting to update you about our technical progress on a weekly basis.

What's Been Done​

User Interface​

  • We added the light/dark scheme switch to make your eyes more comfortable, located in the footer section.
  • Right beside the market selection button, there is a row of market statistics showing 24h high, 24h low, volume, and the current price.

API Access​

  • To facilitate automatic trading, we released our first API doc on trading, including the ability to list markets, order books, and personal order creation/cancellation. We envision more and more participants can be in this process to reach the best market efficiency, involving arbitrage loops across Hashgreen DEX and other exchanges. In the loop, you will have to involve Stably Prime as they are the only stablecoin issuer on Chia right now.

  • The statistics of markets can now be retrieved via stat API. In the first version, we provide 24-hour statistics on the traded volumes, and are working towards representing the volumes in USD.


  • We onboarded a UI/UX designer, Ann, to help us improve our product further. There are some complicated integration with our partners including the official Chia wallet, a in-development Chrome extension wallet, and potentially one other browser-based wallet. We imagine the UX flow to be increasingly complicated, and hence it is time to involve specialists.

What's Rolling​

  • I18n is coming! We aim to build Hashgreen DEX to be a platform everyone in the world can enjoy, and we soon will need your help to translate our product!

  • The smart contract team is working on several chialisp designs, which can be a pretty prolonged process as it requires not only security audit but implementation and integration with wallet partners. One of the most immediate improvement to the Hashgreen DEX is to use an alternate version of offers to allow partial filling of offers.

  • The next critical piece for the on-chain economy and DeFi will be Automated Market Maker (AMM)! AMM implementation on the Chia Blockchain will require some bells and whistles though, and we are working very hard to propose a first draft. This set of chialisp implementation will not only be secure and fair from a user's perspectively, eliminating potential extractable values. All of these are still in development, but we want to stay tuned for more exciting updates!

Β· 13 min read

Hashgreen successfully released a decentralized exchange on Jan 12, 2022, in a joint live event with Chia Network. If you were not at the event with us, here is a clip of the presentation on the Hashgreen Decentralized Exchange (DEX).

Chia Blockchain introduced its first on-chain atomic token swap standard, powered by the underlying smart coin language Chialisp. Using this standard, users can start exchanging tokens on the chain, including the Chia (XCH) token and other Chia Asset Tokens (CATs). This functionality opens a lot of possibilities on the blockchain, including the first batch of dApps, with Hashgreen DEX being one of them.

We at Hashgreen have been working hard for months to develop the project and integrate our interface into the official Chia wallet. After the successful launch, we received many questions on how and why we decided to build Hashgreen DEX this way.

In today's post, we want to take you through a journey - a journey on Chia's most basic technical building blocks, how and why we crafted the first DEX on the Chia Blockchain, and finally, how we envision DeFi will look like on Chia.


Let's not pretend this has never happened. You opened up your Chia wallet, trying to exchange some Chia (XCH) for some Stably USD (USDS) on the Hashgreen DEX. This popped out, saying you have a lot less spendable balance than you have total balance...

Oh No!

...what happened! If I have all the XCH, why am I unable to send them all, or make an offer out of it? Well, UTXO is the main culprit here.


Short for unspent transaction outputs, this is nothing new and was introduced by Bitcoin. Instead of having a balance sheet for every user on the blockchain, Chia tracks your funds using UTXOs (or, rather, coin set to be more accurate), which is a technically fancy way of referring to coins. Coins have predefined ways to be spent, and are capable of producing coin outputs when they are spent. Moreover, any given coin is only ever created once and spent once -- and that's it! This philosophy focuses on tracking the change of state on the blockchain as opposed to recording the whole state.


You can easily track how many coins are created in the blockchain using explorers.

The choice of using UTXOs on Chia leads to many interesting and advantageous properties:

  • 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 in total 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.


It is estimated that over $576M MEV, as of the time of writing, has been extracted from Ethereum.

With these seemingly wonderful advantages, it sounds like a no-brainer that every chain should adopt this model as opposed to the account model. Apparently there are some trade-offs; trade-offs that takes additional effort to mitigate but are definitely worth it.

Implications to Users​

Let's hop back onto our spendable balance problem.

When we make transactions, we are in fact spending a coin or coins that might sum up to more than what we try to send. For example, imagine you are a lucky farmer who farmed a 1.75 XCH coin and wish to send 0.1 XCH to your friend to let them HODL. When you send the XCH, you are actually destroying the initial 1.75 XCH coin, creating a 0.1 XCH for your friend, and sending the rest 1.65 XCH back to yourself. During the wait for the change coin to come back, your funds are effectively reduced, and that is why the Chia wallet shows a lower spendable balance as you cannot double-spend a coin.

Offers are more or less the same: as you create offers to exchange your tokens, you do not want to accidentally spend your coins and invalidate the offer. The Chia wallet was kind enough to soft-lock the coin so that it cannot be used, until you either cancel the offer or when the offer has been fulfilled.

Implications to Developers​

The UTXO model, while having a significantly smaller attack surface than that of the account model, is trickier for protocol design. If you still remember, transactions in the same block are spent simultaneously and every coin is only spent exactly once. This implies that if we want to build a more advanced application, we have to design while keeping the ability to perform multiple interactions in mind. Take a very basic application for example - an automated market maker (AMM).

The most renowned instance of an AMM is Uniswap where swappers would exchange their assets with a liquidity pool at a market price determined by the amount of assets held in the pool. When Uniswap contracts are executed, they run sequentially, creating an interaction between the swapper and the pool each time. Yet on the Chia Blockchain, we cannot naively queue up user exchange requests sequentially, since there is only one pool with one coin present. This produces several challenges: For example, exchange operations would need to be aggregated somehow to interact with the pool together. Furthermore, we need to ensure price fairness, resist against denial of service attacks, and overcome many other problems!

There are many proposed solutions on other UTXO-based blockchains, and for the sake of brevity, we will include the discussion in future posts.


In short, clever design choices have to be made for dApps, but when smart contracts are carefully crafted, UTXO-based blockchains have better security guarantees and efficiency.

Chia's Take​

Bitcoin was successful, but as a store of value, not as a successful technological demonstration. Bram Cohen himself wrote about how Chia's technical motivation stemmed from Bitcoin, and as a last-mover, Chia was able to get things right the first try.

On day one, Chia shipped with the full capability to process smart contracts (or, smart coins, to be more accurate). The on-chain language, chialisp, powers many existing features such as singleton, Chia Asset Token (CAT), and even offers. The programs for smart coins themselves were not actually stored on-chain, but rather, its Merkle root hash is. One does not have to reveal the program until the coins are spent, thus greatly reducing the attack surface. These smart coin primitives are also extremely composable, giving developers building blocks for their decentralized applications.

To date, there is a prosperous community around CATs -- project developers issuing their own tokens and project followers HODLing and trading. We at Hashgreen believe there are more exciting things to come in the Chia ecosystem, but first, let us take a look at how we built the Hashgreen DEX and why it is designed in this way.

Hashgreen DEX​

Chia wrote an in-depth analysis about how offers work technologically and how they can be used in dApps. In case you have not read it, here's a quick summary:


Offers are serialized off-chain commitments to swap coins for coins. Anyone can take that file and complete the other side of the swap, sending it to the blockchain to settle. Without the other half of the trade, no one would be able to spend your coins or steal your funds.

It is intuitive that, you can send your offer files around in channels like Keybase and Discord, yet you will soon realize -- the prices you get are nowhere close to optimal. Liquidity is plain disastrous with vanilla peer-to-peer trading, and this is the main push for more advanced dApps. Some examples are OfferBin and OfferPool which provide offer upload, sorting, and download services. They operate just like Craigslist: users are responsible for submitting the offers, and pushing aggregated offers to full nodes on their own.

Problems We Solve ​

Interestingly, Hashgreen did consider this solution, and we observed several potential problems with this Craigslist approach and ultimately went with our current DEX approach.

  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​

Admittedly, several aspects need to be discussed in-depth about the DEX working principles, and we will briefly mention them here.

  • 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.


Working on the Chia Blockchain certainly brings many unique challenges to the Hashgreen team, and we want to tell you that this MIT-based team is not afraid of challenges!

Along the way, we have heard of perspectives on Chia's development purely based on its price, but this is simply an unhealthy view on a tech-heavy project. Being one of the first developers on Chia, we are journeying through its infancy as well as you are, and enabling more and more applications on our way. At any given point in time, we might find ourselves having to make trade-offs in either protocol design or system deployment, but rest assured that we take a first principled approach with the user's best interest at top priority. In order for us to communicate these complex ideas with you, we are starting this blog to periodically fill you in with more development progress and technological insights for the Chia Blockchain.

If you have more questions, you can refer to the FAQs or follow us on social media (Discord and Twitter). Thanks for staying with us!