BTCBAM Chain’s Emphasized Smart Contract Module

According to IBM’s smart contract definition, Smart contracts work by following simple “if/when…then…” statements that are written into code on a blockchain. A network of computers executes the actions when predetermined conditions have been met and verified. These actions could include releasing funds to the appropriate parties, registering a vehicle, sending notifications, or issuing a ticket. The blockchain is then updated when the transaction is completed. That means the transaction cannot be changed, and only parties who have been granted permission can see the results.

Within a smart contract, there can be as many stipulations as needed to satisfy the participants that the task will be completed satisfactorily. To establish the terms, participants must determine how transactions and their data are represented on the blockchain, agree on the “if/when…then…” rules that govern those transactions, explore all possible exceptions, and define a framework for resolving disputes.

Then the smart contract can be programmed by a developer — although increasingly, organizations that use blockchain for business provide templates, web interfaces, and other online tools to simplify structuring smart contracts.

On the BTCBAM Chain, emphasized smart contract model runs as to achieve the interoperability and combine the UTXO model and the smart contract Account model, and decouple the value transfer layer from the contract execution layer, BTCBAM created the Account Abstraction Layer (AAL).

BTCBAM developed optimizations for the interface and conversion between smart contract operations and UTXO operations, and developed four new opcodes:

OP_CREATE: create a smart contract

OP_CALL: call smart contract (send BTCBAM to the contract)

OP_SPEND: spend btcbam in smart contract

OP_SENDER: allow address other than contract call sender to pay for Gas

When the BTCBAM blockchain generates new blocks, in addition to making regular checks on transaction scripts, it also needs to check whether transactions contain the above-mentioned opcodes.

OP_CREATE is used to pass the contract bytecode to the virtual machine. OP_CALL sends data, gasPrice, gasLimit, VMversion and other key parameters required to run smart contracts through transaction scripts, and finally passes them to the virtual machine. Relying on this design, the BTCBAM x86 virtual machine can run on the blockchain in parallel with the EVM (Ethereum Virtual Machine), without the need to significantly modify the underlying protocol and retaining good functional scalability. In the future, any virtual machine based on the account model can be adapted to run on the BTCBAM blockchain.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
BTCBAM Official

BTCBAM Official

BtcBam is a Vienna-based cryptocurrency mining company managed by entrepreneurs and professionals.