Spedn: Smart Contracts in Bitcoin Cash

Spedn: Smart Contracts in Bitcoin Cash

Today an anonymous developer announced Spedn, a new contract-oriented language for Bitcoin Cash

While Spedn shares some similarities with Ivy, a smart-contract language developed by Chain for Bitcoin, it supports additional functionalities such as local variables, if/else statements and BCH opcodes that were brought back in May ’18

Smart contracts in Bitcoin Cash?

Before you may or may not get too excited about smart contracts for Bitcoin Cash, let’s make a quick reality check and understand what smart contracts really are because they often sound ‘too smart’ for what they are actually are.

A smart contract on Ethereum is an address that has some code associated with it. You can think of a smart contract as a program, a combination of persistent scripts, or a set of instructions for the Ethereum Virtual Machine. For example, we can use Solidity programming language to write a smart contract that will send 2 ETH to Alice’s address if the contract has 3 ETH. So when we send 3 ETH to our contract, it passes instructions to the EVM and the machine takes 2 ETH from the contract and sends them to Alice. This smart contract is possible because Solidity is Turing-complete, meaning it can express all kinds of logical or arithmetic operations and therefore supports commands like if statements.

Bitcoin also has a language called Script. In a way, Bitcoin addresses are primitive smart contracts that lock your unspent transaction outputs. Script is way less powerful than Solidity and does not support if statements or any other commands that regular programming languages do. However, it was specifically designed so for security reasons and you can still write simple contracts for Bitcoin, as Script can check signatures, calculate hashes and make timelocks. Exchanges use Script to create multi-signature Bitcoin addresses.

So what does Spedn do?

Announced in a today’s post on Medium, Spedn is a new smart-contract language developed by an anonymous developer under the name Tendo Pein. Spedn can be used to write programs for Bitcoin Cash, which can then give instructions to the Bitcoin Cash ‘virtual machine’. By virtual machine, I mean the piece of the Bitcoin Cash protocol responsible for executing Script programs. Spedn supports functionalities such as:

  • if/else statements — control the flow of the program by stating conditions;
  • local variables — temporarily store values;
  • BCH opcodes — are basic operations that were removed from Bitcoin long ago for security purposes but some of them were brought back in May in Bitcoin Cash.

All of the above are not available in Ivy, a similar smart-contract language developed by Chain for Bitcoin.

For now, it is too early to say whether Spedn will gain any popularity but you can already learn the documentation.

BTC

3,995 USD
-0.63%

ETH

136.85 USD
-0.79%

BCH

162.98 USD
-0.69%

Related news

Bitcoin [BTC] Futures in good stead against its Spot equivalent: Bitwise Report

Bitcoin [BTC] Futures were thought to be a snippet of the overarching cryptocurrency market, though meager in comparison to the larger spot market. A recent report from Bitwise Asset Management, the crypto-centric investment firm has stated otherwise. In a March 20 report presented to the United States’ Securities and Exchange Commission [SEC], Bitwise analyzed the Chicago Mercantile Exchange [CME], and the Chicago Board Options Exchange, with ten prominent cryptocurrency exchanges’ in terms of their trade volume. Prior to shedding light on their Futures versus Spot findings, it must be noted that the report revealed that 95 percent of the trading volume of unregulated exchanges were seemingly “fake and/or non-economic wash trading”. Taking into account this disparity, the percentage of futures volume to their spot equivalent increases from 1.51 percent to 33.33 percent. Reported Spot volume totaled $6 billion, but after removing the “suspicious exchanges”, the actual volume recorded dropped to $273 million, in comparison to the futures market volume of $91 million. Furthermore, the increase in futures’ volume as a percentage of the spot market has been steadily increasing. From November 2018 to January 2019, the futures market was just over 15 percent, and almost doubled in February 2019 to 33 percent. Since the Futures contracts were approved in December 2017, only on two occasions did the Futures volume, in comparison to the Spot market, shoot above 20 percent; this was in May and August 2018. Futures Volume expressed as a percentage of their Spot Equivalent In terms of their stand-alone trade volume, the CME and the CBOE are in good stead against the world’s top cryptocurrency exchanges. The daily volume the CME, which brings in $84.82 million, ranks second behind Binance’s $110.5 million and ahead of Bitfinex, which records $38.06 million in daily trade volume. The CBOE also fairs well, taking the ninth spot on the ladder, ringing in $6.12 million in daily trade volume. Gemini takes the eight spot with $8.11 million and itBit caps off the top-10 with $5.58 million in daily volume. Notable, among the top-12, eight exchanges are registered within the United States. Despite the CBOE’s comparative success against the spot exchanges’, it has not been performing well against its cross-town rival, the CME. This slump forced the CBOE to delist their Bitcoin Futures [XBT] for March 2019. However, the XBT futures that are yet to expire later in the year will not be off-loaded prematurely. Bitwise also points out that the CME Futures Price tracks the Global Spot Price based on an arbitrage model. Given below is a chart attesting the same: Arbitrage between the CME Futures price and the global Spot price The post Bitcoin [BTC] Futures in good stead against its Spot equivalent: Bitwise Report appeared first on AMBCrypto.
AMBCrypto

Blockchain Apps and the Mineral Supply Chain Could Help Verify Origins of Resources

Mining companies are constantly working to determine the source of their minerals and to ensure a quality extraction process. Under the 2010 Dodd-Frank Act, mining companies based in the United States must source minerals in a responsible manner. Further, the minerals could not be used to enrich those involved in armed conflicts. The European Union […]
Bitcoin Exchange Guide

Ethereum [ETH] core dev clarifies acceptance of ProgPow in future hard forks

Programmatic Proof-of-Work [ProgPow] has been one of the most talked-about updates in the Ethereum community. Its implementation proposal saw the support of a majority of the Ethereum community, with some expecting it to go live in the Istanbul hard fork and others claiming that it would have its own small hard fork. In a Reddit post on the Ethereum subreddit, Hudson Jameson, one of the core devs of Ethereum Foundation, spoke about the future of ProgPow, whether it would go live in a hard fork, and most importantly if it would go live or not. He said: “Back when we were deciding the issuance reduction at the end of 2018, ProgPoW was brought up a lot. Some considered it a ‘bargaining chip’ for miners to accept the issuance reduction. Some miners believe that it was agreed upon that we would put ProgPoW in a hard fork in exchange for an issuance reduction.” This was followed by Hudson stating that during the end of 2018, the core devs decided to “investigate ProgPow to the fullest extent” and that there were “no promises” made in terms of its implementation. Further, he stated that even on January 4, 2019, at the core devs meeting, the decision to tentatively go ahead with ProgPow was made after he asked for consensus amongst team members on whether they had any opposition with it. However, no one responded to the question. Hudson said: “It’s sort of like accepting a proposal by silence. To be clear, there were some core devs who were in favor of ProgPoW and had been for a long time so there was no need to reiterate their support at that moment. We were only looking for dissenting opinions and otherwise we would go forward with it.” Source: Reddit This was followed by Hudson stating that the Ethereum Cat Herders were working on finding the “appropriate auditor and rising funds” for ProgPow audit, adding that the complete details pertaining to this would be released next week. He added, “In summary, a decision was made to move forward with ProgPoW, but no timeline was given as to when it would be activated in a hard fork. It may be activated in its own fork or with Istanbul. If an issue is found by the ProgPoW audit, we may not go forward with implementing and activating ProgPoW.” Source: Reddit The post Ethereum [ETH] core dev clarifies acceptance of ProgPow in future hard forks appeared first on AMBCrypto.
AMBCrypto

Hot news

By continuing to browse, you agree to the use of cookies. Read Privacy Policy to know more or withdraw your consent.