Overview Of Emercoin. Learn more about the new successful cryptocurrency

This article opens a series of articles devoted to EmerCoin technologies and describes the main differences between Emer core and other cryptocurrencies.
Under the hood Emercoin
First, let's define: emer is technology, network and infrastructure. Amercain – credit units, which circulate within the network of Ehmer. But since it is so accepted that the word EmerCoin is called all together, we will also follow the generally accepted semantics, using the word emer, only when we want to emphasize that it is about technology, not the settlement and accounting aspect. The words coin, money and etc. we will refer to non-cash credits that are traded in a distributed network of cryptocurrency.
Where he turned on
Historically, the EmerCoin core was inherited from the Peercoin core, which in turn was inherited from Bitcoin. Peercoin added a key innovation to its project – the mechanism of Proof-of-Stake consensus – building, creating a hybrid consensus mechanism that uses two basic mechanisms-and Proof-of-work(POW) and Proof-of-Stake(POS). Let us consider these mechanisms and the consensus itself in more detail.

Consensus is called the algorithm of public cryptocurrency, through which ordinary participants of the decentralized network vote for the truth of a particular version of the blockchain under construction.

Consensus arises as a result of the aggregated efforts of all miners who vote for a particular version of the blockchain branch with their resources, and receive a miner's award – freshly printed emission money and/or transaction payments. We can say that miners sell an impersonal coin-network service to maintain confidence in the blockchain (trust), and receive compensation for their services in the form of freshly minted coins.

An interesting question arises: what should be considered a voice in such a distributed network? The first obvious idea is a wallet. And clearly flawed: an attacker could generate millions of wallets and these souls of the dead to vote for the version of the blockchain, which is advantageous to him. The next idea is IP-address. Also does not work, as any provider can simulate a large network, and again to create hordes of dead souls. Voting requires a limited resource that cannot be replicated or falsified. Satoshi Nakamoto in the Bitcoin system offered as such Proof-of-work – proof via computational power. Indeed, if you have a computer with computational power X, you can virtually divide it into N sub-computers, but their total computational power will remain X. that is, the voice weight of the owner of such a computer will not increase.

Then other concepts of consensus were proposed, focused on the use of another computing resource – for example, the capacity of disk drives, Proof-of-capacity. All of these concepts are based on the limited physical resources – compute power or storage capacity. Naturally, in the process of development of the cryptocurrency ecosystem, this leads to an "arms race", when miners invest in the appropriate mining equipment until the cost parity for depreciation of equipment and income from mining is reached. Then snort and cry "mine became unprofitable, the crypt is sell and generally ugh".

A breakthrough idea Sonny king, author Regcap, was the concept of Proof-of-Stake, with limited voting resource was made by the coin controlled by the same system. This allowed us to get out of the trap of the "arms race of material resources" by replacing the material resource (processor, disks) with non – material-coins. This, in turn, stopped the senseless consumption of material resources, irrevocably spent on mining (electricity, equipment).

Each consensus mechanism has its own shortcomings. So, for example, not very popular pow cryptocurrency can be attacked by temporarily renting huge computing power (which has been done several times), and POS cryptocurrencies are potentially vulnerable to other types of attacks, such as attacks from the depth. To protect against the latest there are some additional mechanisms, for example, a dynamic reference (dynamic checkpoints), and in General, the mechanism of the POS has shown itself more stable than POW.

However, we consider The peercoin hybrid consensus mechanism to be the safest, and have used it as the basis for our project. To successfully attack emer, the attacker must have both 51% of the network's processing power and 51% of the total money supply. This creates two barriers of different nature for the attacker, which protect the network from compromise.

Also, our choice was influenced by the fact that Peercoin is based on the classic and Mature Bitcoin code, which is most deeply analyzed by a variety of experts in terms of security, and against which was almost carried out a lot of unsuccessful crypto attacks. We also focused on the fact that Bitcoin code has good support, and it can continue to be used for the development of its project.

In addition, we practice an industrial approach to our projects, which involves maximum adherence to existing standards and specifications. Since Bitcoin's de facto technologies and APIs are the standards of the crypto industry, we strive in our projects to maintain maximum compatibility with Them, and accordingly the use of Bitcoin as The basis of our core.

Similarities and differences
Here we will explain which components of the cryptocurrency have remained unchanged and which have been changed. Differences will be considered relative to Bitcoin, as the most illuminated of the project.

POW+POS vs POW
As mentioned above, Emercoin has a hybrid consensus mechanism that defined the starting point of our project. This hybrid mechanism was inherited from Peercoin with only one change – a big shift towards POS. In fact, emer is a POS cryptocurrency, in which THE pow mechanism is left for security reasons, and plays an important, but auxiliary role, and about 80% of the blocks are closed by the POS.

Sha256
The hash function of block closing is applied the same as in Bitcoin and Peercoin – sha256. The reason is that sha256 is the standard and continues to provide a level of security sufficient to maintain a stable network.

Also due to the fact that mining sha256 for a long time already is made by specialized processors, ASICs, we can be sure of two things:

Not going to happen the revolution of complexity, caused by the advent of specialized equipment for the other algorithm, which may lead to a shake-up of the network and consolidation of mining power in the hands of the owners of the new equipment.
We are against mining on universal computers, as with this approach may suffer uncomplicated. As you know, before the advent of ASB had a number of viruses that used the computing power of infected computers for bitcoin mining. The appearance ASO made such viruses are not economically profitable. Nevertheless, the danger remains for other cryptocurrencies that may be mining on universal computers.
Our position is described in more detail in the blog.

10 minutes
The closing time of the block remains the same as in Bitcoin and Peercoin – 10 minutes. We believe that Satoshi has chosen a successful parameter, and reducing the block time can lead to a large number of collisions with orphan blocks, and loss of network stability. Consider this statement in more detail.

The probability of a collision is the network refresh time divided by the block close time. The network refresh time depends on the topology and network load, and for the Bitcoin network Can already reach minutes. Accordingly, other cryptocurrencies (for example, Quark), which reduced the closing time to sub-minute intervals, risk getting permanent forks as soon as the load on them increases to more or less significant values.

We may argue that there is an excellent Ghost Protocol used in Ethereum, and it is not afraid of forks, as orphan-blocks (they are called uncles), though not fall into the resulting blockchain, participate in voting for a particular version of the chain, so there block time can be around 20 seconds.

We do not agree with these statements. We believe that this Protocol has a number of vulnerabilities. For example, a network under the Ghost Protocol can be affected by a network storm, an effect that occurs in broadcast Ethernet networks when a critical load is reached. Simply put, this will happen for the following reasons:

The network refresh time is proportional to the network load, that is, traffic. When the critical load is reached (a large number of transactions per second), the update time will be comparable to the block generation time. At the same time, different miners will independently produce candidate blocks for inclusion in the blockchain. And here's a surprise-these blocks will contain the same transactions. And these big blocks will be sent over the network again, which will create traffic animation, that is, load the network again, which again will lead to delays for even more uncles. The behavior of the network becomes similar attack like DNS/NTP Amplification , just as both attackers and victims are the same nodes of the network, and trigger becomes the achievement of critical loads, depending on network topology.

And if we take into account that only one of the candidate blocks will get into the blockchain, and the network spent its efforts not only on the decision of this block, but also on its brothers who only voted, but did not enter the blockchain, then a dramatic decrease in the trust of the adopted blockchain as a result of such a storm becomes obvious,

In General, Satoshi was not a fool, when he invented his system. And we agree with his approach.
Recalculation of difficulty after each block
Unlike Bitcoin, where the complexity of mining is recalculated once for every 2016 blocks (approximately every two weeks), the complexity in the emer network (as well as Peercoin) is recalculated after each block. We believe that this approach enhances the stability of the network. Given example:

For example, after the next recalculation of difficulty in the Bitcoin network stopped working half of the miners. This is by the way not a hypothetical case – it is enough time to adopt the relevant laws in the States in whose territories there are large mining pools. As a result, the blocks will be closed twice less often, that is, once in 20 minutes. Also twice will increase the time of confirmation of the transaction and the size of the blocks. And given the fact that now often the blocks reach their limit of 1 megabyte, there is a direct chance that many transactions in the blocks simply will not get, and many days will be unconfirmed. This will cause panic, and even more transactions related to the desire to sell what is, which will only aggravate the situation. And the system only a month will restore performance.

When calculating the complexity after each block, such a problem can not arise – the network immediately begins to adapt to the change in the total power of miners. In addition, since EmerCoin is basically a POS cryptocurrency in which mining and pools play a secondary role, even a full and one-step stop of all pools will increase the block time by 20%, which will be adjusted by the adaptation system during the day.

Recalculate rewards for A pow block
In EmerCoin, there is another mechanism for maintaining a more or less stable mining capacity-a loop of negative feedback on the hashrate of the network (aggregated mining capacity). The bottom line is that the miner's reward for the block is not fixed, as in Bitcoin, but is inversely proportional to the root of the 4th degree of complexity of the network.

As a result, if we put the cost of Emercoin increased in Fiat terms, it will begin to mine a large number of agents, which will lead to increased complexity and lower rewards for the block. As a result, the network is protected against strong inflation in Fiat terms. And Vice versa – in case of a strong reduction in complexity of the network due to the loss of the miners interest in Americaine for any reason the latter tries to keep the miners, offering a big reward.

Theoretically, the most effective strategy of mining Amercain – to come to terms, mine minimal capacity to share the maximum income among the participants. But this will not work because of the selfish miners who are in a situation described in The prisoner's Dilemma.

POS 6% APY
Since EmerCoin is a POS cryptocurrency, it can mine not only equipment, but also coins in your wallet. In our project, we chose the POS reward of 6% per annum. In other words, if a certain transaction coins without movement lay more than a month, they have a chance to close the block, and bring the owner a reward of 6% per annum. If coins were used somewhere, their period of maturing "burns out" and begins to accumulate a new for the new owner. That is, 6% is the upper limit of the POS reward, achievable only in the case of fixed money. Currently, the practical value of the growth of the money supply due to the POS-award is 4-5% per annum, and as the use of EmerCoin increases, It will decrease, reaching the values accepted in stable Fiat currencies, but not going to zero.

In response to a naive objection, something "you have the same inflation because of these 6%" note that Emercoin on the contrary shows deflation, that is, the value of the coin increases, and quite quickly. This can be seen at the rate of the coin, which has grown since the beginning of the year about four. This discrepancy with the naive model is explained by the fact that the value of the coin reflects the value of the relevant economy, and with the growth of the economy, the coin grows too, and the pumping of the money supply due to POS is negligible compared to other factors.

Emission and combustion
From the above we can conclude that the money supply of Emercoin will grow indefinitely. And this in a first approximation to the truth. Indeed, consensus-building participants sell their services to the network and receive freshly printed coins. However, in the Emercoin system there is a mechanism of destruction of coins, which is opposite to the emission. Destruction of coins is while using the services of the blockchain – the shipment of coins or the purchase of records in the NVS. That is, unlike the Bitcoin network, where the emission is limited, but the destruction mechanism is absent, the EmerCoin network has unlimited emission, and the process designed to counteract it.

We consider this approach fair: participants who provide services to the network receive a reward, and those who buy services from the network pay for them.

Our estimates suggest that, given the factors we know, an amount of 1 billion EMC will be reached in about 80 years. It is on this basis that, in response to the question of the money supply limit, we speak of this figure in order not to go into detail.

Rfc5389 STUN
The first unique innovation of EmerCoin is the use of rfc5389, STUN Protocol to obtain an external IP address. The program of-wallet through NAT need to know external IP. Bitcoin has previously received it (and other cryptocurrencies continue to receive it) by a request to a centralized server checkip.dyndns.org , but currently the code of this request is removed from Bitcoin, and only UPNP or manual configuration is used.

We were not satisfied with this approach for a number of reasons (for example, UPNP does not work correctly behind a multi-layer NAT), and we decided to get rid of dependence on a centralized server, and to apply STUN, which is just used for this purpose in IP-telephony, and is an industrial standard. The Emer group currently owns the most comprehensive list of public STUN servers on the network, and these servers are used by the Emer STUN subsystem to determine the external IP.

The subsequent attempt to transfer the innovation to Bitcoin developers was unsuccessful, and we faced a number of very interesting facts in the process of investigating the state of Affairs. These facts were stated in a personal letter to a certain person, and Leonid Kaganov with the permission of Oleg Hovaiko, the author of the idea of using STUN in cryptocurrencies, published a copy of the letter in his blog.

Both facts and assumptions set out in the letter and readers ' comments are of interest.

Currently the code to determine external IP via STUN was borrowed from us and used in other crypto projects (from public, you can specify the Novacoin).

We believe that the use of STUN increases the connectivity of the network, which has a positive impact on its stability and the speed of distribution of transactions and blocks. And of course, a decentralized system should not depend on a centralized service.

Transaction optimizer
Another unique innovation inherent only to Emer is the transaction optimizer.

In cryptocurrencies, the blockchain of which contains transactions, when creating another transaction, it is necessary to select a subset of the inputs that this transaction will spend. Bitcoin and other cryptocurrencies use a stochastic algorithm that makes 1000 random samples, and selects a subset with an amount as close as possible to the target. At the same time, even if the wallet contains a subset of transactions that allow you to collect the amount "for calculation", the standard algorithm almost always misses it, and in a new transaction will create an exit for payment and surrender to yourself. This leads to an excessive size of the created transaction, and to the appearance of a future transaction that will spend the surrender.

In addition, this algorithm creates a problem of "Golden sand", when the wallet accumulates a lot of transactions-delivery to small amounts.

We at Emer have applied a dynamic programming approach to select a subset of transactions, and our algorithm is guaranteed to find such a subset to provide the sum without surrender if possible. As a result, according to our estimates, the average transaction size decreased by 5%, which respectively reduced the growth rate of the blockchain size. Details about this-in the article.
Distributed dynamic control points
To the POS cryptocurrency can be applied to some exotic attacks that are specific to POS. The main of them is "attack from depth". The essence of it is that if someone gets control of the wallets that contain already spent coins, he can model to roll back the time to the time when these wallets contained coins, and thus receiving 51% of the coins, to build an alternative chain of blockchain, longer than the main, and thus change the contents of the blockchain retroactively.

To prevent this attack, control points (checkpoints) are used, deeper than which the system does not revise the blockchain structure. In Biicoin applied only hard checkpoints embedded in the code of the wallet, which are only updated with a new release of the wallet. Peercoin and Emer also have dynamic checkpoints when developers send checkpoint information over the network, which does not require client-side code updates and keeps the checkpoint structure up-to-date.

In the current Peercoin and old Emer versions, only one site could send out checkpoints. When sending them from several sites, there was a possibility of a conflict in the network. Accordingly, the failure of this node led to the fact that information about dynamic checkpoints ceased to be updated.

Emer, starting with version 0.5.0 contains a mechanism for distributed decentralized checkpoints in which the checkpoint is sent to the independent nodes, and an algorithm to avoid "double distribution". This increases the reliability of network as control points will continue to be updated, even if some nodes fail.

Smart contracts in the Ethereum style
There is not expected. We are categorically opposed to this for security reasons. We consider it critically dangerous to upload unauthorized Turing-compliant code to users ' computers and force it to execute on an external event. In more detail our position is covered in this interview.

We prefer the microkernel approach, where all external and not authorized by the developers of the code runs outside the kernel Emer.

Nevertheless, we are curiously watching developments in the Ethereum system, and so far we have only confirmed the correctness of our conservative approach.

Name-Value Storage (NVS)
The main innovation having external utilitarian value is the subsystem NVS-Name-Value Storage. The development of this subsystem was inspired by the distributed DNS from the Namecoin cryptocurrency.
And if such a Namecoin structure was rigidly focused on distributed DNS, then Emer NVS represents a trusted distributed General purpose storage with decentralized management. More information about this subsystem can be found on the website.

In short, the subsystem represents a binary data store (up to 20KB) of any kind. The data associated with the search key length 512байт. The key is unique within the entire network EmerCoin. That is, it is impossible to create a duplicate of an existing key. The record is associated with a payment address belonging to the owner of a wallet.

The record can only be managed by the owner of the billing address, and no one else. Management involves the creation of a new entry to replace the old, or the transfer of ownership to another billing address. But the old record does not disappear, and also remains available from the blockchain. Thus, a complete history of modifications and change of ownership of a particular record becomes available.

Technically, such a record in the blockchain represents a transaction output of 0.01 EMC to the payment address of the owner of the record. This output inside script-the contract actually contains the contents of the NVS. Only the owner of the entry can spend this exit, as only in his wallet there is a corresponding private key to sign the exit. If you spend this output, you can modify the record to replace value or other items, including the billing address. In the latter case, the record will be transferred to the wallet containing the recipient address.

You can interact with the NVS subsystem either via the JSON API in a way similar to interaction with the Bitcoin wallet or via the GUI of the wallet in a special tab.

It is this subsystem that became the basis for the creation of Emer services, which we will talk about in the following posts.

Additional information
If you have any questions about Emer, please visit Emer FAQ first, you may find answers to your questions.
If you still have questions or suggestions for cooperation or reasonable ideas, please contact the support team or leave your comment here.
+ 0 -