Smart Contracts

Step Fees

.000735 BURST (up to 1,000,000 steps per block)

Page Fees

.000735 BURST (up to 20 pages per contract)

Registration Fees

0.000735 BURST per contract

Small Project

Pages 2
Steps 20
API Calls 5

 

Setup .0147
Per Transaction .05145
Per 100 Executions 5.145

Medium Project

Pages 4
Steps 20
API Calls 10

 

Setup .0294
Per Transaction .1029
Per 100 Executions 10.29

Large Project

Pages 10
Steps 10,000
API Calls 1,000

 

Setup .0735
Per Transaction 14.7
Per 100 Executions 1,470

What is a Smart Contract?

A smart contract is a computer protocol that facilitates, verifies, and enforces the negotiation and performance of an agreement, a concept first proposed by Nick Szabo in 1996.

This technology involves presetting terms that both parties to a contract must meet.  It procedurally eliminates certain roles that might otherwise require the services of legal representatives, notaries, or executors.  For this reason, smart contracts are a disruptive technology for the future digital economy.

Smart contracts preset terms that both parties to a contract must meet.  They procedurally eliminates certain roles that might otherwise need to be filled by legal representatives, notaries, or executors.  For this reason, smart contracts are a disruptive technology for future digital economies.

In 2018, a US Senate report said: “. . . the concept is rooted in basic contract law.  Usually, the judicial system adjudicates contractual disputes and enforces terms, but it is also common to have another arbitration method, especially for international transactions. With smart contracts, a program enforces the contract terms that are built into the code.

BTDEX

A decentralized cryptocurrency that is based on Burstcoin’s smart contracts

Cryptoball

A fun game developed to showcase autonomous smart contracts at work on the Burstcoin Network.

dAppository

An online storefront for applications that operates using Burstcoin’s smart contracts.

Burstcoin's Smart Contracts

Burstcoin added Turing-complete smart contracts to its blockchain 2014 in the form of Automated Transactions (AT) as proposed and implemented by CIYAM.  Burstcoin’s blockchain is a distributed database (public ledger) whose consistency and validity are verified by a majority of the participating network nodes.  These nodes run the contract code, and the results are subject to the same verification process as any other transaction on the network.

As a Turing-complete formalism, ATs are both powerful (expressiveness) and dangerous (verifiability).  Because of the expressiveness, the potential for advanced applications is unlimited.  However, they must be designed carefully to avoid situations such as the DAO debacle that led to the split between Ethereum and Ethereum Classic.

Burstcoin was the first cryptocurrency to implement a Turing-complete blockchain-based smart contract system in a live environment. In January 2015, it initiated the world’s first decentralized lottery, which was the first program to run on top of a blockchain in a trustless and decentralized manner.  In this early implementation, creating (or programming) smart contracts required writing (assembler-like) bytecode and testing on-chain, making development cumbersome.

In 2019, BlockTalk was created to make smart contracts on the Burstcoin blockchain more accessible for developers.  It allows writing, debugging, and deploying smart contracts using Java and a simple text editor or preferred IDE.  BlockTalk is complemented by Burstcoin’s permanent TestNet.

Smart contract Basics

Smart contracts execute the terms of a contract based on if-then-else statements.  A task is executed if certain conditions are met and is not if the conditions are not met.  They provide a conflict-free transparent way to exchange money, property, shares, or anything of value while avoiding the need for 3rd party services.

Smart Contracts allow negotiation of and agreement to a contract’s code in advance and confidence that it will be completed as requested if it is summited to the network.  After it is submitted to the network, it cannot be changed.  The execution of the code is public and verifiable.

Properly implemented, Burstcoin smart contracts can provide a high degree of individual autonomy as well as efficiency.  There is no need to rely on 3rd parties which can introduce the risk of manipulation to the process.  Because contract execution is managed automatically, there is also a significant time savings for most business processes.

Many risks are mitigated when using Burstcoin smart contracts.  For example, documents become immutable when they are duplicated many times over on a shared ledger.  This also eliminated the risk that documents can be lost.

Example

In this example, a starting price is set in a smart contract that is programmed to operate as a decentralized auction.

  • The smart contract accepts bids in the form of fully funded transactions.
  • Each time the smart contract receives a larger bid, the previous transaction is automatically refunded.
  • At the block height specified, the winner of the auction is finalized.
  • Depending on the property type, the property’s distribution can also be automated by the smart contract.

This example illustrates several ways that an auction based on smart contracts has an advantage over a traditional auction.  In a standard auction, the highest bidder may not be able to complete the purchase.  This a significant risk to the auction operation as the second-highest bidder may no longer be available, and another auction might be necessary.

The smart contract eliminates this risk by accepting only fully funded transactions rather than bids that may or may not be funded after a traditionally held auction is complete.

The bidder can be confident that non-winning bids will be returned because the code for the smart contract is publicly available for verification.

Additional use case examples for decentralized smart contracts include atomic cross-chain transactions, crowdfunding, decentralized gaming, and many other applications.  Many examples are already running on the Burstcoin network.

BlockTalk

BlockTalk is a platform for writing smart contracts to run on the Burstcoin blockchain.  It consists of the following key components:

  • Contract.java: a Java abstract class defining the basic API available for contracts
  • Emulator: an emulated blockchain and respective UI
  • Compiler: a system to convert Java bytecode into Burstcoin AT bytecode that can run on the Burstcoin blockchain

Sample Contracts

Samples can be found in the samples source folder.

Sodium Upgrade

The SODIUM hard-fork (BRS version 2.5 and above) allowed much more powerful smart contracts to run on the Burstcoin blockchain, for more information, see CIP20.

BlockTalk

A platform for writing smart contracts to run on the Burstcoin blockchain

Java

Create smart contracts using Java. No need to learn a proprietary programming language.

NFTs

Easily create NFTs that can be transferred, sold, or auctioned.

More Information

To learn more about Burstcoin smart contracts, review the documentation provided by CIYAM.

To contact the development team or request assistance with anything related to this project, please contact us on the Burstcoin Discord channel.