KasMedia Logo

Kasplex launched its Closed Beta for users with technical backgrounds on Kaspa Testnet 11 (TN11) on May 24, 2024. Kasplex is compatible with Go and Rust nodes but optimized at 10 BPS. As of June 17, 2024, 39,076 KRC-20 transactions and 329 KRC-20 tokens have been deployed. 

Kasplex Objectives

Kasplex, a non-profit organization funded by the Kaspa Ecosystem Foundation (KEF), comprises a team of third-party developers led by @55b55b and Kris. While Kasplex provides the infrastructure and protocols to launch new tokens on Kaspa, they do not issue any assets themselves. One of their primary goals is to encourage developers to build applications on Kaspa through Kasplex. Kasplex Head Developer, @5bb5bb5, explained that the goals and objectives of Kasplex:

“As the first ecosystem protocol on Kaspa, Kasplex aims to facilitate the issuance and circulation of various assets through on-chain data inscription. There will also be continuous iterations, hoping to serve as the infrastructure for Kaspa’s potential future Layer 2 ecosystem.”

The objective is to increase adoption of the Kaspa network by utilizing Kasplex as one of the primary infrastructures to create Dapps where artists, musicians, entrepreneurs, etc., can securely share and sell their digital products without causing UTXO bloat, as seen in  BRC-20 tokens. Additionally, with the capability to build on the Kaspa network, the introduction of Kasplex is seen as a stepping stone towards a Layer-2 solution on Kaspa. It also marks the first step incross-chain communication and applications.

Kasplex Features

Kasplex consists of three main components described below: the Data Insertion Mechanism, Open-Source indexer, and Public APIs.

  • The Data Insertion Mechanism records data in blockchain transactions, including application-specific use cases such as issuing tokens and NFTs. This is made possible by utilizing Pay-to-Script-Hash (P2SH), which results in optimized data storage without UTXO bloat.  

  • The Open-Source Indexer scans the network for new blocks and transactions, updating accordingly while storing transaction metadata. This functionality allows developers to validate data related to KRC-20 tokens, NFTs, and other digital assets within the Kaspa network, ensuring immediate on-chain data retrieval and facilitating the development of various applications. One of the most significant attributes of the Kaspa network is its open-source ethos and community-driven development, a mindset also reflected in Kasplex. Kasplex prides itself on being open-source, allowing anyone to contribute and build upon it. 

  • Public APIs are provided through Kasplex, which can pull wallet balances and transaction records to use with all kinds of applications. The Indexer APIs are available on the Kasplex API TN11 testnet with the Kasplex API Mainnet under development. The API endpoints can be found in the Kasplex documentation

Kasplex Benefits

The Kasplex infrastructure is a game-changer for the Kaspa network, as it allows many more types of applications to be built upon the network. The most notable include:

KRC Token Standard (KRC-20 token) establishes a framework of guidelines and standards for creating and administering fungible tokens within the Kaspa network. With Kasplex, users can deploy, mint, and transfer KRC-20 tokens. These are described in more detail below. Users can check the KRC-20 balance of a wallet address at KasPlex.

Non-Fungible Token Support (KRC-721) creates the framework for creating non-fungible tokens (NFTs), which have gained significant popularity in the cryptocurrency community. NFTs primarily signify ownership and are commonly associated with digital artwork collections. However, they can also represent various assets, such as in-game items, tickets, and real-world assets.

A Gas Fee Mechanism was developed to maintain the Kaspa ecosystem. Through Kasplex, a fee is paid to miners when KRC 20 tokens are minted or deployed. 

Background on BRC-20 Tokens

BRC-20 tokens are the Bitcoin version of Ethereum's ERC-20 tokens. BRC-20 tokens were introduced in March of 2023 and stand for "Bitcoin Request for Comment,” like the "Ethereum Request for Comment.” Unlike ERC-20 tokens, the BRC-20 tokens cannot include smart contracts. They use ordinals, which attach a serial number to a Bitcoin satoshi through JSON (JavaScript Object Notation). All BRC-20 tokens utilize ordinals, but not all ordinals are BRC-20 tokens. ARC-20 tokens use something called the Atomicals protocol to create fungible tokens. While similar to BRC-20 tokens, they differ in that ARC-20 tokens link tokens to a satoshi, while BRC-20 tokens inscribe the data directly to a satoshi. 

KRC-20 Tokens

With the addition of BRC-20 tokens, pitfalls have come to the Bitcoin ecosystem—namely, network congestion and absorbently high gas fees. Another challenge associated with the BRC-20 tokens is that they produce a lot of UTXO dust, which can only be created, not merged. Once the dust is merged, the assets are lost. 

These challenges are eliminated on the Kaspa network due to its advanced data inscription protocol, high bandwidth and throughput, and efficient pruning method. Kasplex. When issuing tokens on Kaspa, the gas fees remain low. The UTXOs can be transferred or merged anytime, eliminating the UTXO bloat seen on Bitcoin. (To read more about Kaspa's pruning method, please visit the KASMedia article The Silver Standard: Rusty Kaspa Ushers in a New Era of Innovation.)

Similar to ordinals, KRC-20 tokens utilize a JSON payload. Unlike ordinals, however, they embed the JSON payload on-chain into the Envelope structure. Because the data is stored on-chain, token balances can be determined by examining transaction history and compiling all relevant activities. The basic operations related to KRC-20 tokens include deploy, mint, and transfer, and they must adhere to KIP9 requirements.

A significant achievement made by the Kasplex team is that KRC-20 tokens do not need to be wrapped and can be swapped directly to KAS due to the support for Partially Signed Kaspa Transactions (PSKTs) in Rusty Kaspa. To read more about Rusty Kaspa, please see the KASMedia article on Rusty Kaspa, The Silver Standard: Rusty Kaspa Ushers in a New Era of Innovation, as well as the KASMedia Rusty Kaspa FAQs

Image 3f132d72e1.png

KRC-721 Tokens

Inscriptions with the KRC-20 tokens allow the creation of non-fungible tokens (NFTs), known as KRC-721 tokens. While KRC-20 tokens are inscribed on-chain, users should upload metadata to an IPFS for KRC-721 tokens, as storage is limited. This is similar to an ERC-721 token on Ethereum.  

Deployment Mode

There are two ways to deploy KRC-20 tokens with Kasplex. The first is the Fair Mint model, which utilizes the mint operation. In this model, no tokens are reserved, and all mint operations below the supply limit are permitted. The second method is the Pre Allocation method,  where developers can allocate a specific amount to a wallet address prior to minting.

Better than Smart Contracts

To fully understand the differences between issuing tokens on Ethereum and Kaspa, it is important to grasp the function and design of smart contracts. The function of the smart contract is to process data. Smart contracts do not change the blockchain when creating applications. For example, an ERC-20 is a smart contract, while a decentralized exchange (DEX), like Uniswap, is a piece of code. The smart contract consists of input data, logic processing, and output data. The input data holds the instructions of the smart contract, while the logic processing acts like a virtual machine to process the data, and the output data is the final state of the data after execution. 

With Kasplex, the input data is added on-chain and then protected through a set of protocols. This does not require a virtual machine and is lighter to implement than a traditional smart contract. Kasplex aims to supplement by providing similar functionalities, rather than rival, smart contracts. 

Gas Fees

Introducing gas fees increases payments to Kaspa miners and reduces unnecessary congestion on the Kaspa network. The minimum fee to deploy a KRC-20 token is 1,000 KAS, while the minimum fee to mint a KRC-20 token is 1 KAS. 

Reserved List

Looking at the future of the Kaspa network, some token names are unavailable when creating KRC-20 tokens. These include names of already popular tokens that might be traded on the Kaspa network in the future. The full list is shown below.

Screenshot 2024 06 19 at 7 24 06 Pm 4ddadc0d31.png

Kasplex Q&A

On May 5, 2024, Dr. Jason hosted an AMA (Ask Me Anything) on Twitter as part of the Kaspa Chinese Community Biweekly Space. He spoke with the Head of Kasplex (@5bb55b) to give an overview of the project and answer user questions regarding the platform. Some technical questions arose during Dr. Jason's Twitter AMA question and answer segment that might be of interest. 

How is data encoded in Kasplex?

Answer: Kasplex data is encoded in JSON and is then uploaded to the chain via ASCII. 

How can users interact with the Kasplex protocol?

Answer: Users can interact with the Kasplex protocol via web and browser extension wallets. Additionally, as the protocol is open-sourced, users can build other applications to integrate with Kasplex APIs.

 Do users have to use the provided APIs to interact with the protocol? 

Answer: No, as the protocol is open-source, users can build and deploy their own APIs by using their own indexers and nodes. 

Who are the main developers of Kasplex?

Answer: The main developers of Kasplex are @5bb55b and @khriskang, and the official X account is @Kasplex.

Is the KRC-20 a smart contract protocol? 

Answer: No, it is not, but it has some of the same functionalities that smart contracts do. 

Is Kasplex creating a marketplace for KRC-20 and/or KRC--721 tokens?

Answer: No, Kasplex is not creating their own marketplace, but will create some examples in the future. 

Do users need a specific wallet to support these tokens?

Answer: No, users do not need a special wallet to hold the new tokens. Users can check the KRC-20 balance of a wallet address at KasPlex. Wallet developers can also incorporate the Kasplex APIs.

Looking Ahead

The open beta launch of Kasplex is a monumental step towards creating applications to interact with the Kaspa network. This includes the minting and deployment of fungible and nonfungible tokens with Layer 2 applications in the future. The Kasplex team summed up the benefits of Kasplex nicely, as follows:

“It’s hard to make people aware of the technical advantages of Kaspa. I think the biggest benefit is that, with Kasplex, more users can directly try out apps instead of obscure technical jargon, thereby they can experience the cutting-edge technology of Kaspa. This will bring more users to Kaspa.”

Also, the roadmap shows the progress made on the Kasplex project, as well as its future direction. 

Image 5e075645da.avif

Kaspa KRC20 Beta Launch Post Mortem

Kasplex launched its KRC20 beta on June 30, 2024. While the Kaspa mainnet worked flawlessly, remaining secure and operational, there were some issues with the Kasplex implementation of KRC20. Specifically, users experienced longer confirmation times, and some community-built applications could not handle the increased throughput. With increased network usage, raising transaction costs to expedite transactions is common. This feature was not built into the KRC20 coding on Kasplex, causing issues with the KRC20 network. This is a frontend fix with the application and does not affect the Kaspa mainnet. 

  • The RPC did not load the balance, resulting in a crash due to multiple users using the same RPC. RPC stands for Remote Procedure Call and is the software protocol enabling applications to interact with a blockchain or DAG network. 

  • A high volume of tiny UTXO values clogged the memory pool, resulting in many stuck transactions due to their need for higher fees. Certain tools impose additional service fees on each transaction separately, resulting in a high volume of small UTXOs clogging the memory pool. This congestion caused many transactions to be delayed or incomplete due to their need for higher fees.

  • Due to an oversight in KIP9 (Kaspa Improvement Proposal 9), only about 40 transactions per block were processed, compared to the expected capacity of over 200 transactions per block available in Rust. KIP9 (Kaspa Improvement Proposal #9) was created to regulate the "growth rate of the UTXO set in both organic and adversarial settings."This proposal introduced a "transaction cost" or "mass" function that limits state bloat attacks. 

While not associated with the Kasplex project, some of the Kaspa core community developers provided insight into the technical aspects of the launch. Through Reddit, Kaspa community developer Shai Wyborski clarified, "It is more nuanced than that. KIP9 prevented many such transactions from being included, protecting the network from lasting storage damage and instead converting it to temporary congestion. The reason such congestion could result in a denial of service is that the logic for transaction selection does not yet take mass into account; fixing that would make transactions with 17000 mass that only pay 1kas of a fee have very low priority even if they do cause the mempool to fill up."

The Kasplex team tested the KRC20 features on testnet11, which processed transactions at 10 BPS — currently higher than the mainnet. This increased throughput of the testnet could keep up with transactions and masked the issues described above. 

Only one day after the issues of the KRC20 beta launch, developer Michael Sutton and team are already working on a solution, referred to as 

“Simple replace by fee on mempool” on Github to allow Kaspa wallets the ability to adjust transaction fees. Sutton states that the solution is “easy” and should go live in a matter of “days”.

The community is appreciative of the Kaspa development team’s responsiveness and attentiveness to the situation, as seen in the tweet below:

Screenshot 2024 07 03 at 3 54 09 Pm 047f902dd2.png

While there were technical snafus with the KRC20 launch, it is important to note the situation's silver lining (pun intended). The beta test launch was meant to test the software and catch any bugs before the main launch. Additionally, the launch of KRC20 brought much awareness and volume to the Kaspa network. According to Coincodex, the 24-hour trading volume for Kaspa from June 30, 2024, to July 1, 2024 was $486.71M, after $KAS reached an all-time high(ATH) of $0.20. Even with the bloat of the launch, Kaspa paid out 1.9M KAS in fees to miners. In addition to generating immense volume, the launch also allowed the Kaspa mainnet to showcase its technical achievement of reaching a transaction throughput of upwards of 100TPS.  

Kaspa developer Shai Wyborski summarized the launch in saying:

“The KRC network is having some issues, as expected from a first day of BETA under INSANE user engagement. Overall, it is doing very well. What's satisfying to me is that the $kas mainnet is operating under loads upwards of 100TPS without breaking a sweat.”

In addition to Wyborski’s commentary, Kaspa’s core community developer, Michael Sutton, had this to say about the launch:

“What we are witnessing is the remarkable phenomenon that a network encountering a new situation for the first time might face some engineering challenges related to that situation.

In this case, if a network becomes congested for the first time, meaning it's entering a fee market, many ecosystem tools, exchanges, and wallets might be caught off-guard without proper fee management tooling.

On the other hand, despite this new situation, the core consensus engine and nodes are working flawlessly, so these are external challenges that can be easily sorted out in short time frames.”

Sutton was also available via X (twitter) AMA (ask me anything) to answer user questions about the KRC-20 launch. Some of the more relevant questions and answers have been reposted in their entirety below:

  • How long do KAS transactions from wallet to wallet stay in mempool before canceling?

    Answer (MS): This is a good question. Generally, nodes expire transactions pretty often. However, the node you had RPC connection to and to which you directly submitted your tx to, currently keeps the tx until it gets accepted into the DAG. So as of now, only restarting that node will cleanup.

  • Why did this bloat not happen on testnet ?

    Answer (MS): I wasn't tracking testnet closely enough, but I think (1) testnet-11 has higher bps, so it was processing things faster, (2) tests did not emulate the peak load of mainnet launch.

  • Why were some Tangem transactions failing?

    Answer (MS): Fee is not high enough --> tx waits in the mempool for too long

  • The tokens were minted on the testnet, so the testnet didn’t have enough horse power to process them?

    Answer (MS): The KRC20 beta is on mainnet. Once on mainnet there's no relation to testnet at all, it's the "real deal"

  • Do wallet providers such as Tangem need to enable user selectable dynamic fees, and is this possible?

    Answer (MS) MS: Yes, this shows us that wallets need to be able to adjust fees. On the core development side, we need to develop 2 features: (1) RBF (replace by fee) = allow the mempool to replace a previously submitted transaction if the new one has higher fee, and (2) dynamic fee estimation. 

  • Was it a good idea to let krc20 exist on #Kaspa?

    Answer (MS): KRC20 uses the current consensus rules, so it's a legitimate usage of the network. The fact that for the first time they are creating a fee market and bringing to light related issues is completely positive imho [in my humble opinion]

Additionally, Sutton shared this screenshot to respond to multiple questions:

An informative listen explaining the KRC20 beta launch is this X (twitter) live shared a live recording “Blockchain Banter - Was the KRC20 Beta launch smooth?”, hosted by LevendiPro.  

Keep up with the Kasplex progress by following their official X (twitter) account, @Kasplex, and check out the following websites to learn more about the Kasplex protocol:

Introduction | Kasplex Document

Chinese Kaspa Community XSpace Ep13 - Kasplex - Kaspa

KASPLEX XSpaces Script - Kaspa

KASPlex FAQ - Kaspa

Enjoyed reading this article?

More articles like this

Comments

k

kas fan

very informative, thank you very much !!!

Post a comment

KasMedia logo