Casper FFG

Casper FFG, also known as Vitalik Buterin’s Casper, was designed as a hybrid PoW/PoS consensus mechanism aimed to be the first implementation of Casper to ease the transition into PoS. Casper FFG was designed so there is a PoS protocol overlaying on top of the normal ethash PoW protocol. As blocks are mined via PoW, every 50th block would be a PoS checkpoint where finality is assessed by a network of validators.

In loose terms, finality means that once a particular operation has been done it cannot be reverted. Of course, as Buterin notes, no system can provide 100% finality. With a centralized system it is possible to hack into system or physically break into a registry, and decentralized systems have faced the same issues as well. But, according to Buterin, Casper is guaranteed to provide stronger finality than PoW for three reasons:

Two-thirds of validators make maximum odd bets to finalize the blocks. Because of this, there is little incentive for them to collude and attack the network since their own stakes are at jeopardy.

Validators have no incentive to collude and act maliciously because they always stand to lose money.

If double finality does occur, then users have a choice as to which chain they want to go for. Whichever chain gets the majority of votes becomes the dominant chain. Double finality in Casper will end up in a hard fork instead of a reversion.

The development of FFG has undergone some critical changes to improve the protocol by introducing sharding and a new algorithm to increase fault tolerance all the way to 99%. We will be watching closely to ensure Bithereum has the strongest PoS protocol possible.

Bithereum’s Casper w/ Opcodes

Since a Casper contract can be created using Ethereum smart contracts, which isn’t the case with Bitcoin, Bithereum will use various opcodes and introduce new opcodes to create a Casper-like contract. Bitcoin Opcodes, are defined as Operation codes from the Bitcoin Script language which push data or perform functions within a pubkey script or signature script. The existing opcodes that will be leveraged are OP_CHECKLOCKTIMEVERIFY from BIP 65, along with the proposed OP_GROUP in BCH. Additional new opcodes to be introduced will be as follows: OP_VALIDATORSELECT, OP_RANDAO, and OP_SLASH.

The first step is to create the designated address called the Bithereum Staking Address, which will be built into the network in which users will be able to stake their coins to be selected as validators. The opcode OP_CHECKLOCKTIMEVERIFY will be leveraged in order to freeze the funds in the Bithereum Staking Address for X amount of time, as defined by our staking guidelines at the time of the release.

For Bithereum, OP_GROUP will be utilized for the initialization of the staking process in each round, and work in conjunction with other opcodes to facilitate Bithereum’s PoS model. In October 2017, Andrew Stone issued a proposal for a new opcode to be implemented to Bitcoin Cash, referred to as OP_GROUP. What this opcode creates is a system of representative money in which certain tokens can be “colored” to create additional native tokens to represent something specific.

As elaborated by Stone, OP_GROUP colored coins allow direct representation of assets as satoshis and embed the colored coin transfer and validation into the Bitcoin scripting language in a manner that allows colored coins to take advantage of scripting and that makes them very easy to implement for existing Bitcoin Cash implementations. Coins are essentially colored, or “minted”, when a certain amount of the token is associated with a unique ID (color). Only the creator of this particular color has the ability to mint additional ones, as well as un-color, or burn the unique ID to change it back to the native token. The colored coins are going to inherit all the features normal bitcoins have, you can lock them, you can send them freely to anyone and you can use more advanced scripting options on them.

As Bithereum will begin as a PoS hybrid, and validators will only be chosen every 100th block, validator selection will be triggered upon the completion of the 99th block. The validator selection process will be done via the opcode OP_VALIDATORSELECT, which will contain Bithereum’s staking guidelines based on coinage as well as additional randomization methods that will be detailed at a further time, in order to pick 5 validators.

To specify, this new opcode will be added through a soft fork and will allow for the selection of various validators from the Bithereum Staking Address. Validators will be selected in a random, nondeterministic way with varying probabilities based on coinage. This makes for pre-planned attacks far more difficult. Coinage is calculated by N*D, where N is the number of coins you have staked, and D is the number of days those coins have been staked. There will be a maximum number of days you can have your coins staked in one go, which will prevent validators with large stakes from dominating.

As this process is occuring, another process will be occurring simultaneously via the opcode, OP_RANDAO. Like Casper, we will be using RANDAO to verify that validators get selected. When a validator sends their stake to the Bithereum Staking Address, they will receive a private, random number S that will be associated with their stake. After the selection process takes place, the selected validators are required to display their unique random number.

Once the validators have been selected and each staker has presented their unique S variable from RANDAO successfully, the selected validators’ coin colors (unique IDs) through OP_GROUP will be broadcasted via the blockchain explorer. At this point, the new opcode OP_SLASH is then utilized to ensure that each validator is displaying honest behavior, and if not, the particular malicious actor’s stake is lost/slashed immediately. Once the block has been validated post-slashing, the validators receive the block rewards in proportion to the amount each of them staked. This entire process is then repeated again after the next 100 blocks and so forth.

As staking begins, Bithereum will also have a built-in algorithm that is associated with the interval of blocks that will need to pass before staking takes place. As mentioned above, the validation checkpoint for staking will occur every 100 blocks to start, but this interval will be slashed in half every few months, for the most part. It will begin as every 100 blocks, but will reduce to 50 blocks after 2 months and keep on reducing as such. After a year, validators will be chosen after every 6 blocks. Once a year passes, the blocks will reduce 2 more times, once into 3 and finally into every block. In conjunction with this staking halving interval, a difficulty bomb will be implemented into the PoW mining efforts; as time passes, mining PoW blocks will become more difficult, ultimately pushing everyone into a pure-PoS system.

A Proof of Stake consensus model will not only be an economical advancement by increasing transaction speed and reducing fees, it will also be an ecological advancement by lowering the excessive energy consumption used by Proof of Work mining. Bithereum essentially creates an outlet for both Bitcoin and Ethereum, allowing Bitcoin to take on its new role as a store of value, and allowing Ethereum to be used for its true purpose as fuel for a worldwide computer that can contain a vast ecosystem of dApps on its platform. With Ethereum’s technology atop a modified version of Bitcoin, Bithereum will bring together the best of the two leading cryptocurrencies to create an unparalleled peer-to-peer digital currency.

Bithereum Network

Visit the Bithereum Network website to learn more. Stay-up-to date with our project news and announcements by following our social media channels: Facebook, Twitter, and LinkedIn. Join the conversation on our community channels: Telegram, and Reddit.