Bitcoin Cash is programmable money, this means developers can write smart contracts which are more complex than a normal spending transaction. Bitcoin Cash smart contracts are either written in raw BCH Script or in CashScript, a high level language with syntax similar to solidity that is compiled down to BCH Script itself. Multi-Signature wallets are the simplest example of smart contracts but clever finance or recurring payment applications can also be written! The notable team working on BCH smart contracts, more specifically DeFi, is General Protocols, they developed the Anyhedge smart contracts to enable on-chain future contracts, this is usable in their BCH Bull today! With the CashTokens upgrade there has been new Web3 DeFi applications in Bitcoin Cash such as Tapswap, the non-custodial marketplace to trade CashTokens, Caldron DEX an UniSwap-like AMM and Bitcats, a NFT project utilizing a minting contract.
The promise of DeFi
"DeFi" or Decentralized Finance means financial applications without middlemen. It's a different paradigm that levels the playing field by removing barriers to entry and, because there are no middlemen, is non-custodial. The non-custodial nature of DeFi applications provides an incentive for cryptocurrency holders to withdraw from an exchange to take part in them. These finance applications increase the liquidity a cryptocurrency and can use the speculative climate of the cryptospace to offer useful hedging contracts to merchants for example. Currently the most popular DeFi applications are automated market makers (AMMs), algorithmic stablecoins and borrowing & lending applications. There is a lot a room for growth, with sythetic assets on a decentralized network traditional finance products like stocks would be tradeable without the limits of legacy finance. The execution of DeFi smart contracts is trustless but outside datasources called oracles are still often required to provide (price) data to the blockchain.
AMM DEXes have been called DeFi's zero-to-one moment, Bitcoin Cash now also has multiple AMMs for trustlessly trading CashTokens!
Advantages of BCH
Bitcoin Cash has undergone multiple hard fork upgrades which expanded its smart contract capabilites, most important
of which are the native introspection opcodes to create covenants, the opcode "checkdatasig" to enable
the verification of oracle data, the change to 64bit integers and the re-enabling of opcodes like OP_MUL and OP_CAT.
Together these enable complex smart contracts which are not possible on BTC.
Compared to more powerful smart contract blockchains like ETH, Bitcoin Cash has the advantage of using a
UTXO model while ETH has an account based model with a global state.
Put simply this means BCH scales much much better than the ETH architecture so it will not have the
same fee problem with increased usage. Complex decentralized applications such as ICOs, DOAs, AMM-style DEXes and sidechains are
now all technically possible due to the Cashtokens upgrade of May 2023.
There's been a number of other BCH improvements proposals (CHIPs) and disucssion for future upgrades continues, you can find those on
Bitcoin Cash research forum.
Some prominent ideas for the future to extend this focus on smart contract features to enable complex and scalable decentralized applications
on Bitcoin Cash include enabling bounded loops, redesigning the virtual machine (VM) limits to get rid of the 201 opcode limit and
of the 520 bytesize limit for smart contract developers and adding composite arithmetic opcodes.
To get a better idea of the difference in smartcontract capabilities read: "Smart contracts on Ethereum, Bitcoin and Bitcoin Cash".
BCH Bull
"BCH Bull", is the in-house project by the General Protocols team that uses their AnyHedge smart contract. The AnyHedge smart contract in principle allows BCH denominated futures on any asset with an oracle price feed. An exciting usecase of AnyHedge is that it allows merchants to stabilize the value of their BCH without having to sell for trusted stablecoins. Their protocol and smart contract is usable by anybody but they made it into a end-user product themselves with BCH Bull. The AnyHedge functionality however is more general and has been integrated in the Paytaca Wallet recently. The BCH Bull production release was on April 17th and now it lists 6 different assets for users to long or hedge against. Hedging your BCH against your local currency pair stabilizes its value without having to sell for trusted stablecoins. BCH Bull falls under the umbrella term "DeFi" because it is a non-custodial finance application. The website of the BCH Bull website is bchbull.com, and the non-custodial app is at app.bchbull.com.
There is a great independent video explaining the mechanisms behind the anyhedge contract "How AnyHedge works"".
May 2023 upgrade
The latest upgrade has continued this focus on the smart contract capabilites of Bitcoin Cash. The most important CHIP for the May 2023 upgrade has been Cashtokens! As the name suggests, the CHIP enables native tokens on BCH (both fungible and non-fungible) which means the tokens are scalable and consensus validated just as BCH itself and unlike layer-2 token systems such as SLP. But importantly Cashtokens also enables contract-verifiable messages for onchain applications which is improvement to the scripting system yet!! To demonstrate the capabilities of the proposal the author, Jason Dreyzehner, made a full proof of concept implementation of a DEX, called Jedex a decentralized exchange which runs fully onchain! The Jedex smart contract follows a modular approach so it consists of 8 separate smart contracts. Because of this it does not run into the rather strict VM limits for smart contracts in terms of opcodes and bytesize. Cashtokens has been the biggest upgrade for BCH to-date and makes Bitcoin Cash the most advanced UTXO-based smart contract blockchain! There were three other minor improvements included May 2023 namely upgrading P2SH to 32bytes (instead of just 20 bytes) to mitigate hash collision attacks, making correct use of transaction version a consensus rule and lastly allowing transactions smaller than 64 bytes.
The CashTokens upgrade was the biggest upgrade in the histroy of Bitcoin Cash, read the announcement blogpost by Jason dreyzehner
Prediction Markets
A major driver for the Castokens proposal is that it enables Prediction Markets. The idea to do prediction market on Bitcoin dates well back, solutions like Bitcoin Hivemind explorerd the idea to run the prediction markets on Bitcoin sidechains. Unfortunately the development of this sidechain technology was stalled for a very long time and has still not activated. The Hivemind design uses decentralized oracles corporations to resolve the outcomes of real world events. Decentralized prediction markets have the potential to be one of the most important innovations in the cryptocurrency space.
To understand more about Prediction Markets read the blogpost "Prediction Markets on Bitcoin Cash" by Jason Dreyzehner.