CashTokens: Smart Contracts built on Bitcoin Cash (BCH)

CashTokens are a new addition to the Bitcoin Cash ecosystem introduced in 2022 by Bitcoin Cash developer Jason Dreyzehner. CashTokens are digital assets that can be issued by anyone, anywhere, at any time, making token creation and management available to everyone around the world. In May of 2023, CashTokens went live on the Bitcoin Cash network as part of an annual upgrade.

CashToken Stats

Total Value Locked (TVL): $77K
Trade Volume (30 days): $23K
Contract Interactions: 38,403
CashToken Projects: 134


* Data courtesy of Cauldron DEX and Blockchair

What are CashTokens

CashTokens bring smart contracts to Bitcoin Cash all on a decentralized scalable layer one protocol. They are designed to be counterfeit-proof, ensuring the authenticity of each token. This robust security feature is maintained across contracts and wallets, which can effortlessly confirm a token’s legitimacy. This safeguards them from inadvertent destruction by software not designed to recognize tokens, thus enhancing their reliability.

CashTokens introduces two low-level token primitives: fungible tokens and non-fungible tokens (NFTs). Token primitives refer to the fundamental components that enable the creation and management of tokens on the Bitcoin Cash blockchain. The introduction of these token primitives on Bitcoin Cash allows for decentralized applications (dapps) comparable to those on platforms like Ethereum, but with a significant efficiency advantage in transaction and block validation.

Fungible Tokens

Fungible tokens have emerged as the standard bearer of the token world. They are interchangeable and divisible to facilitate fluid transactions. They are ideal for representing a variety of assets such as stocks, bonds, stablecoins, loyalty points, and utility tokens.

Non-Fungible Tokens

Non-Fungible Tokens (NFTs) are unique, indivisible assets. They serve as secure, verifiable tokens for unique items like art. This makes them perfect for covenants, public interfaces, and dApp communication. They add a new dimension to the token landscape.

Dapps

With Bitcoin Cash, decentralized applications (dapps) can serve millions of users while keeping fees low. In May 2024, Bitcoin Cash upgraded it's scaling protocol to add ABLA, which is an adaptive blocksize limit algorithm, allowing for global scaling and enhanced transaction throughput.

The CashTokens system is designed to be a logical extension of the existing Bitcoin Cash virtual machine (VM), ensuring compatibility and interoperability with BCH contracts. CashTokens aim to provide these primitives without the need for a universal token standard, allowing for more flexibility and efficiency in developing larger standards and applications on the Bitcoin Cash network.

CashTokens are natively supported on Bitcoin Cash, featuring unique addresses for transactions. They also include compatibility checks to ensure wallet readiness, even for BCH-only wallets. This seamless integration with opt-in support enhances user experience and promotes wider adoption. CashTokens are bringing new ideas and possibilities to Bitcoin Cash, offering versatility for both fungible and non-fungible tokens. It's also showing that Bitcoin Cash can compete with other smart contract platforms such as Ethereum or Solana. These new changes reflect the network's dedication to adaptability and innovation, giving Bitcoin Cash a position in DeFi.

For more visual learners who prefer to watch and learn with videos, check out this great overview by Bitcoin Cash developer Mathieu Geukens giving a presentation on what CashTokens are. In this snippet he covers token types, token standards, and smart contract functionality like committments and covenants.

This overview is a good starting point for newcomers. The entire video covers in great detail about the CashTokens upgrade, which you can watch the full video here.

CashToken Features

Below is a mind map diagram showing some of the multi-faceted features of CashTokens. Putting it all together you get a powerful ecosystem of possibilities and opportunity on top of a solid scalable foundation in the Bitcoin Cash network and protocol.

CashToken Features Diagram

Diving Deeper into Bitcoin Cash NFTs

Let's take a closer look into non-fungible tokens (NFTs) on CashTokens.

Bitcoin Cash NFTs act as immutable on-chain commitments, pivotal for secure dapp development. In the context of the Bitcoin Cash virtual machine (VM), a commitment can be defined as an irrevocable message that was provably issued by a particular entity. This new feature allows Bitcoin Cash smart contracts to create verifiable commitments without relying on trusted entities.

This unlocks decentralized oracles (multiparty verification systems) for dapps, enabling secure and trustless communication between them. Essentially, contract-issued commitments empower more advanced dapps on BCH without bloating transaction costs.

CashTokens NFT

Bitcoin Cash NFTs open a world of opportunities, from gaming and marketplaces to ticketing and virtual real estate. They facilitate direct sales of music and films, domain name systems, and even decentralized identity solutions. The possibilities are endless, paving the way for a new era of digital innovation.

Minting NFTs on CashTokens

Generating NFTs using CashTokens can seem confusing and daunting. There are tutorials on how to do it step by step. If you’re a developer who is programmatically inclined, you can read over the Mainnet.cash docs for CashTokens which has a REST API for token creation and other endpoints for using CashTokens in your application.

    
      # Code Example: mint 2 NFTs, amount reducing
      curl -X POST https://rest-unstable.mainnet.cash/wallet/token_genesis \
        -H "Content-Type: application/json" \
        -d '{
      "walletId": "wif:testnet:cRqxZECspKgkuBbdCnnWrRsMsYLUeTWULYRRW3VgHKedSMbM6SXB",
      "tokenId": "219f792ebf5019ad82ceb911dd7fc35fee862bf9db56e2324d6d23634a176f1f",
      "requests": [{
        "cashaddr": "bchtest:qqm4gsaa2gvk7flvsvj7f0w4rlq32vqhkq27mxesg8",
        "commitment": "01",
        "capability": "none",
        "value": 1000,
      }, {
        "cashaddr": "bchtest:qqm4gsaa2gvk7flvsvj7f0w4rlq32vqhkq27mxesg8",
        "commitment": "02",
        "capability": "mutable",
        "value": 1000,
      }],
      "deductTokenAmount": true,
      }'
    
  

CashToken NFT Wallets

You can also create CashToken NFTs using a wallet that supports it. For example you can use Electron Cash, Paytaca, Cashonize, or Zapit. All of these wallets both support token creation and usage in the wallet within the Bitcoin Cash ecosystem.

CashToken DEXs

You can buy, sell, and trade NFTs on a decentralized exchange (dex) that supports CashTokens such as Cauldron DEX or TapSwap.