Skip to main content

2 posts tagged with "p2p"

View All Tags

Β· 7 min read
J.

banner

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!

Summary​

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!

Β· 7 min read
H.

banner

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 spacescan.io, 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.

Airdrop​

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:

Advantages

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

Caveats

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!).

Advantages

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.

Caveats

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.

Trivia​

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!

Advantages

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!

Caveats

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.

Summary​

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 hash.green.