Stealth Development Blog 002: 12/14/2018

in blockchain •  6 years ago 


Cryptocurrencies as Capital


I’m going to start this week’s development blog with a discussion that we had on Telegram. In this discussion, I explained how to view cryptocurrencies as capital, in that they can be considered as a means of production. As such, they share properties with other kinds of capital. I also discussed how these properties factor into the qPoS design.

The Difficulty of Staking XST


The following conversation was sparked by the observation that it should be easier to stake XST. Staking is a process where an individual buys XST from an exchange, creates a wallet on their own computer, runs a client with this wallet in an unlocked mode that allows for signing blocks, and earns a reward in XST for each blocked signed. This process requires both technical ability and effort and also an investment in capital. These capital investments include computing power and the original XST.

Staking XST is not trivially easy because it has a few technical requirements that absolutely cannot be circumvented. The individual staking must:

  1. Fully sync the chain in order to verify blocks
  2. Run an active client because it must to be continuously online to stake – some coins claim that they support “cold staking”, but this is a misnomer because “cold staking” cannot secure the network
  3. Have a password protected wallet to protect against malware and cyber attacks
  4. Ensure the client is unlocked only for staking

The typical instructions for staking XST covers all of these requirements as simply as possible, meaning that there is very little room, if any, to make it easier to stake XST.

Comparative Advantage in Staking XST


If one thinks about it from a profit-making perspective, this necessary level of difficulty is great for those who acquire the technical ability to stake coins because it gives them a comparative advantage. Roughly speaking, a comparative advantage means that an expert can be more efficient than non-experts, allowing the expert more earnings for their labor. The expertise requirement excludes those who cannot or refuse to obtain this technical ability, and rewards individuals for their efforts and knowledge. Staking XST is therefore a merit-based system.

Depreciation, Labor, and Expertise


There are deeper economic issues at work too if one thinks of owning coins as owning capital, or the means of production. One important property of capital is that it depreciates. For example, a tractor is capital, and the fair market value of the tractor will go down over time even if the tractor is never used. Manufacturers release new models with improved technology, the seals dry on the tractor’s hydraulics, maybe some sensitive electronics begin to deteriorate. This process is called depreciation.

Because of depreciation, a capitalist system necessitates putting capital to work to create production. For a sustainable business model, it is critical that the revenue from this production should more than offset depreciation.

To operate capital so that it may be used in production, you need (1) labor and (2) expertise. A tractor owner requires people who know how to operate the tractor, and also labor is required to put this expertise to use.

XST, or any PoS cryptocurrency for that matter, requires labor and expertise. Most cryptocurrencies are also subject to inflation of the money supply, which represents depreciation. Gaining the knowledge to operate a node and maintaining it are the labor and expertise components of staking coins, respectively.

If a company is in the business of buying and selling tractors without actively using them as capital, the company will suffer losses to depreciation, meaning turnover should be pretty quick. If turnover is not quick, and this type of company does not have the expertise and labor to be owner-operator, then a profitable model would be to lease the tractors and then sell them for a profit as well. These profit models apply to XST or any PoS coin. Owners may stake their XST (requiring expertise and labor) and then sell it when it makes sense to take profit that way.

Economics of Staking XST


The current inflation rate of XST is about 7%. The rate of return for staking is about 20%. This difference puts a tremendous premium on the expertise and labor components of XST, amounting to about 13% per year of profit, valued in XST.

To put it in the terms of capitalism that I used above: by operating your XST capital (staking it) you beat depreciation by 13%.

Economics of qPoS

This 13% difference turns out to be about the return that cryptocurrency owner-operators are comfortable with, and I approached qPoS economics with this number in mind. qPoS economics are designed with the expectation that operating a staker gives about a 13% advantage over depreciation (money supply inflation). A central objective of the qPoS design is to reduce the inflation of XST to about 1% per year. These two constraints (13% per year advantage over depreciation combined with 1% per year inflation) combine with a desired number of stakers to determine the price of stakers. This math is explained in detail in the qPoS Whitepaper.

In terms of economics, the main goal is to accommodate two types of users. First, individuals who treat XST as a currency and don’t want to use it as capital, will experience almost negligible depreciation of 1%. Second, stakers should continue to enjoy about 13% net earnings, valued in XST. Along with accommodating the two types of XST owners, network security should be about as good as with other types of high performance PoS.

-------

Weekly Development Highlights


Validation: Gatekeeper of Consensus


As I develop qPoS and provide weekly updates, I will discuss, in a seemingly endless manner, topics centering around validation. For this reason, today I’ll introduce validation and why it is so important.

With cryptocurrencies, the most important types of validation are (1) transaction validation and (2) block validation. Validation is essentially a series of binary (yes/no) tests that say whether a transaction or block should be accepted. For example, does a transaction double-spend a coin, yes or no? If yes, the transaction is rejected, failing validation. Money supply validation is only one, very important type of validation. There are many others. For example, blocks should be accepted with chronologically ordered datestamps, blocks should be labeled with their number, and this numbering should be sequential, just to name a few.

Validation is far and away the most critical component of authoring cryptocurrency protocols. The reason validation essentially defines the protocol is because it says what state changes and data structure formats are permitted. Put loosely, as long as all clients have the same set of validation tests, they will be able to achieve consensus. A more accurate way to state this principle is in the negative: if clients do not share the same set of validation tests, they will not be able to achieve consensus. Of course the importance of consensus should be manifest, but if it isn’t, consider that bitcoin’s primary technological breakthrough is that Proof-of-Work represents a way to achieve consensus without a central authority.

This week I worked almost exclusively on block validation, and here I share some of my technical notes and observations.

Blocks will have no coinbase transaction.

Probably the main conclusion from this week is that it will be possible to remove coinbase and coinstake transactions completely from the qPoS block structures. Coinbase and coinstake refer to special transactions at the beginning of a block that specify the block reward in Proof-of-Work and Proof-of-Stake consensus. They have defined structures. Because of the defined structures, they are used as markers for block type, which influences how the blocks get validated.

The reason I can remove coinbase and coinstake transactions is because qPoS block rewards are virtual. A virtual transaction is not directly recorded in the blockchain. A concrete example will help. Imagine Staker A signs a block and deserves a block reward. For the sake of this example, we will say the block reward is 1 XST. Upon first seeing the block and validating it, a client on the network will credit Staker A’s balance with 1 XST. This credit represents a virtual transaction because nowhere in the block does it specify Staker A should receive 1 XST. This reward is simply inferred from the fact that Staker A produced a valid block. In contrast, Bitcoin does not use virtual block rewards because the block reward is specified in the coinbase transaction.

Removing coinbase and coinstake transactions means that blocks need to be marked in a different, but more efficient way. First, all blocks need to have its block height recorded as part of the block data. Currently in XST (and in Bitcoin), block height is added to an unused part of the coinbase transaction (specifically the scriptsig). For qPoS, the block height will be recorded in a numerical data field designated for this purpose. Second, qPoS blocks need to be marked as qPoS. This marking will be satisfied by inference, using the value of a new numerical data field for Staker ID. Because the Staker ID needs to be recorded as part of every block, a non-zero Staker ID means the block is qPoS. This system places only one constraint on Staker IDs, which is that their numbering should start at 1.

These changes will improve the storage requirements for the XST blockchain, especially for empty blocks (blocks with no transactions). Empty blocks only need to have the bare block header and signature of about 70 bytes. Coinbase and coinstake transactions require much more storage.

Checkpointing will be removed.

With qPoS, checkpointing will be completely removed. Checkpointing in XST currently exists in two types. Hardened checkpoints that are hardcoded into the client codebase, and sync-checkpoints that are issued by a checkpointing server. XST has used checkpoints in the past, but they will be unnecessary in qPoS, which will use a type of asynchronous byzantine fault tolerance (aBFT). In XST’s aBFT, blocks will be finalized when ⅔ of all known stakers sign the block. This process should be nearly instant because the number of stakers is small. Also, the aBFT signatures are not required for consensus, so the signatures can be pruned after a specific number of blocks. Pruning means that the aBFT signatures do not have to be part of the permanent blockchain, saving storage.

–––––

Hondo

https://www.stealth.org

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!