AIMultiple ResearchAIMultiple Research

Bitcoin Smart Contracts in 2024: Challenges & Solutions

Bitcoin Smart Contracts in 2024: Challenges & SolutionsBitcoin Smart Contracts in 2024: Challenges & Solutions

Smart contracts have become popular in the last few years. Most people associate smart contracts with the Ethereum blockchain. Most are not aware of Bitcoin as a platform for smart contracts despite significant developments in Bitcoin smart contracts in the last few years. In this article, we explore basic types of Bitcoin smart contracts, the challenges and solutions for Bitcoin smart contracts. 

Basic types of Bitcoin smart contracts 

Script is a language that is used in the Bitcoin blockchain to write smart contracts. When smart contracts are saved into the blockchain, they will stay there permanently and their codes will be unchangeable. Some common types of smart contracts are:

Pay-to-Public-Key-Hash (P2PKH)

It is the most common form of Bitcoin transaction. It functions as follows: 

  1. The receiver generates a public & a private key pair
  2. The public key is turned into hash
  3. The hash is turned into an address 
  4. The receiver sends the address to the sender 
  5. Sender sends Bitcoin to the address 
  6. The receiver uses the private key to access the fund 

Multisignature (Multisig)

In a multi-signature contract, more than one party is required to allow the transaction to happen. For example, a 2 to 5 multisig contract requires at least 2 signers out of 5 to verify the transaction. 

The benefit of multisig contracts is that if one party loses access to its key, access to the funds is not lost as other parties have access to it and one party with malicious intent won’t be able to compromise the funds. 

Time locked

It controls the spending of Bitcoin up to a certain time or a block height. For example, a time-locked smart contract can restrict the spending of Bitcoin in the contract up to time X. 

Time locks can be used to make a more complex contract called hashed time-locked contracts. In this contract, the receiver must acknowledge the payment receipt within a certain time by providing cryptographic proof. Otherwise the funds will be returned to the sender. 

Limitations of Blockchain smart contracts

Syntax limitations

Bitcoin was made Turning incomplete by design in order to reduce the potential problems that arise with the added complexity introduced with Turing completeness. This means the language lacks the capacity for logical loops and conditionals. This characteristic has reduced Bitcoin’s capabilities for conducting complex transactions and contracts. 

Scalability & speed

Due to encryption and transaction complexity, Bitcoin is slow and hard to scale: 

  • Bitcoin handles around 3-4 transactions per second (tps), Ethereum around 11 tps, and the credit card company, Visa, handles more than 1500 tps.
    • The average block time(block time is the time it takes for the blockchain validators to verify the transaction in a block and create another block) on Bitcoin is 10 minutes while for Ethereum, it is less than 30 seconds. 
    • It might take up to an hour for transactions on the Bitcoin blockchain to become irreversible.
    • Micropayments are unviable due to transaction fees and inconsistencies in their confirmation.

Solutions to the limitations

Taproot Update

In November 2021 Bitcoin released a major update called Taproot. It facilitated smart contracts on the Bitcoin blockchain by increasing Bitcoin’s flexibility and privacy. It also reduced the size that smart contracts take on the blockchain. However, these improvements still do not enable it to be an effective smart contract platform on its own. 

Layer 1 solutions 

Laye 1 solutions are the base network in an ecosystem. They do not need other blockchains for processing and finalizing transactions, they can do all of it on their own blockchains. Bitcoin, Ethereum, and Solana are examples of layer 1 blockchains. 

Stacks blockchain 

Stacks is a blockchain that uses Proof of transfer (PoX) to connect to Bitcoin. It self describes as a Layer 1 blockchain because it maintains its own blockchain, however it also relies on another blockchain (i.e. Bitcoin) like a Layer 2 network. Stacks founder refers to it as a Layer 1.5 network to communicate these hybrid properties of Stacks.  

It uses a specific language called Clarity for creating smart contracts on Stacks which solves many of the syntax limitations of the Bitcoin blockchain. Clarity claims to have these advantages: 

  • Easy to read syntax
  • It is an interpreted not compiled language. Therefore, developers and users can read the source code on the blockchain to understand what the program will do in near plain-English. This is important because smart contracts are powerful and automated tools which could, for example, withdraw funds from users’ wallets.

Stacks blocks are anchored to the Bitcoin blockchain which means it takes approximately 10 minutes to mine a block on Stacks. However, Stacks uses an innovative mechanism called microblocks. It improves the transaction speed which makes it faster than the Bitcoin blockchain. Microblocks allow for faster transactions with Stacks blockchain.

Figure 1. Stacks microblock transactions with Bitcoin blocks 

Besides the improvement in the throughput speed and capacity, Stacks enables the creation of various types of apps such as DeFi and NFT marketplaces that will be able to utilize the security and capital offered by Bitcoin. 

Layer 2 Solutions 

Layer 2 is built on top of an existing blockchain. They have been developed to solve the scaling and transaction speed problems.

Lightning Network 

Lightning Network is a layer 2 solution that makes Bitcoin transactions faster and cheaper. It can handle 1 million tps and make micro-transactions economically viable as it transacts off-chain. 

Sidechains 

Sidechains are separate blockchains that run parallel to a main blockchain. They have their own set of rules, purpose, and functionalities.

Rootstock

Rootstock(RSK) is a Bitcoin-secured merged mining side-chain that enables smart contract development. It is Turing complete and it executes 11 tps but RSK is aiming for 20,000 tps in the future. The transaction confirmation time is around 6 Minutes which is an improvement over Bitcoin’s 10-minute confirmation time.

Figure 2. Overview of Solutions to the Bitcoin limitation

If you believe your business can leverage smart contact, feel free to check out our data-driven lists of vendors and development services.

And if you still have questions about smart contracts, we’d like to help: 

Find the Right Vendors
Access Cem's 2 decades of B2B tech experience as a tech consultant, enterprise leader, startup entrepreneur & industry analyst. Leverage insights informing top Fortune 500 every month.
Cem Dilmegani
Principal Analyst
Follow on

Cem Dilmegani
Principal Analyst

Cem has been the principal analyst at AIMultiple since 2017. AIMultiple informs hundreds of thousands of businesses (as per similarWeb) including 60% of Fortune 500 every month.

Cem's work has been cited by leading global publications including Business Insider, Forbes, Washington Post, global firms like Deloitte, HPE, NGOs like World Economic Forum and supranational organizations like European Commission. You can see more reputable companies and media that referenced AIMultiple.

Throughout his career, Cem served as a tech consultant, tech buyer and tech entrepreneur. He advised businesses on their enterprise software, automation, cloud, AI / ML and other technology related decisions at McKinsey & Company and Altman Solon for more than a decade. He also published a McKinsey report on digitalization.

He led technology strategy and procurement of a telco while reporting to the CEO. He has also led commercial growth of deep tech company Hypatos that reached a 7 digit annual recurring revenue and a 9 digit valuation from 0 within 2 years. Cem's work in Hypatos was covered by leading technology publications like TechCrunch and Business Insider.

Cem regularly speaks at international technology conferences. He graduated from Bogazici University as a computer engineer and holds an MBA from Columbia Business School.

To stay up-to-date on B2B tech & accelerate your enterprise:

Follow on

Next to Read

Comments

Your email address will not be published. All fields are required.

0 Comments