Expansion Consensus

FerrariSwap
4 min readDec 26, 2020

In order to handle complex financial application scenarios and respond to second-level transactions in a timely manner, Ferrari adopts a scalable consensus technology that combines the technology of delegated proof-ofstake (DPoS) and proof-of-authority (PoA) mechanisms.

The mechanism:

Blocks are generated by a limited set of validators.

Verifiers take turns to generate blocks in PoA, similar to the Ethereum consensus engine.

According to equity-based governance, select validators to enter and exit.

Through an algorithm called follow-TO-the-Ferrari (FTTF).

The working principle of FTTF is as follows:

Use pseudo-random function (PRF) to identify atomic blocks in tokens (such as satoshi in Bitcoin, wei in Ethereum);

If the atomic block belongs to stakeholder a, output a. The input is a series of random seeds, and FTTF outputs a pseudo-random sequence of stakeholders, so that the chance of any stakeholder joining it is proportional to the number of tokens owned by the stakeholder.

At the beginning of the block cycle k, an empty block header EBk is generated according to the consensus rules and spread on the network.After receiving EBk, the stakeholders calculate the N-tuple vector seed as follows:

bk1 is the previous block, and SF is an N-tuple with a fixed suffix value. After N is a predefined value, S is used as the input of TTFS to calculate the pseudo-random sequence of stakeholder pSeq, which is also an N-tuple. Each value bit in pSeq needs to be signed and broadcast signature. The block pass includes the transaction and N signatures, and broadcasts the final block Bk to the network. All stakeholders of pSeq share Bk rewards with EBk validators.

Ferrari based on the security analysis chain can tolerate up to 50% of its shares being maliciously controlled. Since each token can be marked, the fault tolerance is further extended to 50% of all tokens in the network. If a conspiracy attacker controls more than 50% of the shares, they can grow

their malicious chain faster than other attackers and perform double-overhead attacks, which is similar to the 51% attack in the PoW blockchain. However, from an economic point of view, the motivation of Ferrari attackers is low due to the risk of capital loss. Recorded in the form of transaction scripts,

blockchain users can retrieve pledge records from which the consensus agreement can legally penalize violators, such as canceling equity and prohibiting violators from participating in the future pledge process.

Similarly, the Ferrari network uses POA+DPOS as the block proposal,and chooses honeybackrbft as the block termination to obtain the best performance under asynchronous network conditions.

Network Efficiency

In addition to the block proposal, the choice of Ferrari

network information dissemination mechanism also largely depends on the topology of the underlying network. In the Ferrari network, under-lying is the default information dissemination method. In order to improve efficiency, we will

use broadcasting between the identified nodes <1024. The Ferrari block verification mechanism is linked to the block suggestion mechanism, taking the current blockchain as input. The purpose of the incentive mechanism is to

promote the correct execution of the previous task.

Off-chain Consensus

Ferrari is a multi-chain consensus structure, so it is necessary to consider off-chain management factors in Ferrari’s expansion consensus, such as long-term system sustainability, financial stability, and subtle security issues.

The off-chain consensus will be further studied in subsequent versions.

Reward

In order to coordinate the incentive mechanism for participating accounts,Ferrari introduced a reward and punishment mechanism. Ferrari rewards encourage all parties to remain honest.

The value of the Ferrari node is determined by the transaction fees under

the node.

The Ferrari node reward system is extracted from the value of the Ferrari

node for reward and distributed to the verifiers who signed the node.

The reward amount is specified in the Ferrari node. If the account is a

pseudonym or is randomly selected to receive rewards, you can apply for

rewards.

Rewards to miners and main block signers, including the value of the top

reward node plus the newly issued tokens (determined by the currency rate

of the tokens).

Punishment

Penalize miners and master block signers who signed multiple competing

master blocks, and members who signed multiple competing nodes of

Ferrari. These penalties eliminate the incentive to sign multiple major

blocks or Ferrari reward nodes. Therefore, signers are encouraged to sign

a single block that is most likely to be part of the canonical chain, pool

members are encouraged to sign a single Ferrari node that is most likely

to become the main chain, and miners are only encouraged to sign a single

main block.

Penalize pool members of Ferrari nodes whose signatures may prove

invalid. This reduces the motivation of pool members to commit fraud.

Penalize pool members who fail to attach a proof when signing; this

proof is a signature of the data they must download in order to verify the

proof. This reduces the motivation for a herd effect, that is, pool members

sign a verified Ferrari node without verifying the node itself, because

the verificationThe pool members are required to download all the data

required by the verification node.

--

--

FerrariSwap

Ferrari--the first decentralized smart public chain that links DeFi and CeFi interconnection