Electra - rules of Staking and technical questions

Various informations about the Forum

Electra - rules of Staking and technical questions

Postby Good Habit » Fri Oct 13, 2017 10:50 pm

Difference between POW / and POS – with focus on Electra-Coin.

All cryptocurrencies need a sufficient number of full nodes, that are computers who have an up to date copy of the entire database and are mostly online, and can therefore communicate with other notes and participate in the validating of the blockchain trough consensus.

If they are truly decentralized, they need an incentive for people to provide hardware, energy and network connections, and therefore, each block found (that is – added to the blockchain) receives some newly generated coins as block reward. The node that adds a block is called Miner.

If the coins are somewhat valuable, there could be many people that try to mine them, and thus not only will the maximum coin supply be reached soon (if there IS a maximum coin supply) – but to many blocks in short sequence might create problems to reach consensus among the nodes.

Therefore, a threshold is needed to decide who can get (mine) the next block. Classical Coins like Bitcoin or Litecoin use Proof Of Work (POW) to decide who can next mine. Under POW, potential miners need to perform some additional mathematical operations to qualify. Thus the threshold is called difficulty.

If a miner qualifies and gets a block, there is at least one transaction – new coins are generated and are credited on the miners address. If there are additional transactions, there might as well be transaction fees. Those are added to the BlockReward. The new coins that are now new at the miners address are kept together as one INPUT – but kept separate from earlier or later inputs.

According to he UXTO-Model (Unspent Transaction Output Set) – each Address can have separate «Piles» of coins that are separated from each other (called Inputs). And if you send coins from this address, you can only send entire Inputs (Inputs are always either spent or unspent). If you send less than the total of one Input to an address, the change goes either back (as a new smaller input) to the original address (if this is set as default change address) or to a separate newly generated address within the same wallet.

Now, if a POW coins becomes very valuable, like Bitcoin, the difficulty has to be raised exponentially to keep Blocktime stable, thus raising the threshold very high. So, to mine a bitcoin block, you have to waste a lot of energy and hardware to qualify for a block, and thus Bitcoin-mining has become expensive and highly centralized.

So, to avoid this problem, Proof Of Stake, POS, is a different method to determine who can mine the next block, a different threshold. To qualify, Coin-holders need to keep a certain amount of coins unspent (not moved) for some time.
The wallet that runs a full node calculates staking weight by multiplying the inputs in all the addresses it controls with their respective age (CoinDays), broadcasts this to other nodes. The sum of all the broadcasts forms the network weight. Comparing network weight with staking weight of each wallet, the network determines which wallet will mine the next block. The wallet then selects one of its inputs, generates the new coins for he block reward (transaction 1) and in a second transaction resets the staking input (sets it to spent) and creates a new input (unspent) out of the former staking input + block reward + evtl transaction fees.

There are two main forms of POS Block reward – fixed reward or proportional reward. With fixed reward, as in POW, each block gets an equal amount of new coins. So – to optimize your wallet to get as many blocks as possible makes sense – more blocks = more reward.

With proportional reward, the amount of newly generated coins per block varies. It is calculated as a proportion of the « coin Days destroyed » of the input that gets the reward, that is number of coins multiplied with coin age multiplied (or divided) by a fix factor. Thus, the inputs that don’t get reward now are likely to get reward later, and if they get reward later, their reward will be bigger – more CoinDays.

Electra is – after a short POW stage – a full POS Coin with proportional reward. (Reward is CoinDays of the input getting the block divided by 730) (=50 % of 365 equals 50% annual).
So there is not really an incentive to have many small inputs and get as many blocks as possible, the rewards per block just get smaller, and if the network uses more blocks to reward all staking inputs, it takes longer for everyone to earn the expected reward.

If the proportional block reward is high enough – like with Electra – it would – for the staker – make sense to have as large inputs as possible – or just one – stake rarely – but get reward for the full amount. As this reward time would on average be earlier than with small blocks, the staker can get more compound interest.

Staking the same Addresses on multiple wallets might result in earlier getting a block – and thus in less reward per block. But certainly not in more reward (you can’t get reward for the same input more than once). The Coins are not IN the wallet, they are on a given Address on the Blockchain, the wallet holds only the keys to the Address. So, if an address is controlled by multiple wallets, each wallet will notice that the input has been redeemed (spent).

Now some specifics for Electra:

Each input starts counting for stake (earning weight) 24 hours after its creation. Block reward is 1/730 of the CoinDays redeemed – that includes the first 24 hours. Each input that earns reward within the first 11 days after its creation is split at output (including block reward) in 2 new inputs of equal size. There is a possibility to auto-merge inputs at reward, but this has been observed only for very small inputs. All inputs that get reward are rewarded for the full coin-age – irrespective of how long the wallet has been offline. There is no maximal coin age to get reward (AFAIK).

There seems to be an inbuild bias towards slowing down reward – frequently smaller inputs that get less reward, or relatively young inputs that can still be split, are rewarded earlier than those within the same wallet that would get more reward. This was probably designed that way to create a sufficient supply of staking nodes and keep the network weight high.

Some of the best performers among stakers seem to have only a small number of inputs and keep their wallet offline for some time (>11 days). This tendency seems to have increased recently, so that the network weight actually declined. This tactic, of course, runs against the purpose of staking, because it reduces the number of nodes that are actually active.

This is a field where I really see a necessity of some technical improvement: Reduce maximum age for splitting (e.g. <3 days) – introduce auto merging of older inputs (e.g. >9 days) – and exclude inputs that are mostly offline from reward (e.g. all inputs with more than 30 days coinage – a transition period of a few thousand blocks would be required here). A further area of technical improvement is the block time – while the OP states that the target is 288 / day, we rarely get >210, although many inputs are expecting reward. It seems that there is a flaw in the difficulty adjustment formula, which increases fast – but decreases slow, and thus often leads to large distances between blocks – up to one hour. Here I’d suggest to keep the adjustment for every block, but not calculated from the last block, but from a rolling average (let’s say 12 blocks / one hour back).
Good Habit
 
Posts: 21
Joined: Fri Dec 24, 2010 7:10 pm

Return to Administration

Who is online

Users browsing this forum: No registered users and 2 guests

cron