Mint Primitives and Stochastic Minting in the same protocol

Blockchain technology has progressed since the early days of Bitcoin and Peercoin, and smart contracts have brought a tantalizing amount of modularity and customization to chains like Ethereum. One criticism of encoding a full language into the chain is that it requires a vast supporting infrastructure, both in development and in chain consensus mechanisms. However, a contract language specifically designed for chain consensus has benefits for making the minting process more convenient and secure.

We run into the risk of over-engineering a process when we seek to make minting ā€˜smarterā€™ in some general, nondescript way. As such, we will build to address a particular need, but in a general enough way to allow for the added benefits of modularity. Orphan inclusion and the concept of ā€˜seen stakeā€™ can be uniquely tackled by the creation of an ā€˜intent to mintā€™ that we will call a ā€˜mint primitiveā€™.

A mint primitive is a form of smart contract that we can add to the protocol, and can thereby take advantage of newer concepts such as zk rollups for efficiency. A generalized concept of mint primitives includes 3 parts:

  1. The generator - declaration and definition of the smart contract. Coins are locked into the contract.

  2. The executor - a delegation of mint power and block formation. The executor can be aware of the chain state and mem-pool to include transactions and orphans.

  3. The nullifier - a description of how the contract is ended. This can be as simple as a send transaction or a time limit, but could also be complex such as triggering another mint primitive.

Because a mint primitive is a declaration of intent to mint, we can deterministically prove that a mint window was missed. This provides predictability of minter participation and should be seen as a boon to regular users of the chain. To reward this behavior and reflect it quantitatively on the chain trust, we can provide a reduction in Proof of Stake difficulty for mint primitives relative to normal stochastic minters. This benefit is to be nullified if a mint window is missed.

Missing a mint window with declared stake can be an entirely innocent process wherein another minter simply mints before you do. When this happens, the mint primitive can be made whole by broadcasting the coinstake as a ā€˜seen stakeā€™, to be referenced in the chain by the next block producer. In this case, the primitive seeking restoration will share some of its lower difficulty benefit with whoever finds the next block and includes the reference to their orphan. This can be repeated a few times, but eventually the benefit will run out and the mint primitive will devolve to a simple delegated stake contract.

There are a lot of open questions here, such as how to efficiently calculate missed windows for declared stakes. However, the behavior of this kind of approach hits many of the target upgrades for Peercoin discussed over the last decade. Simplified stake delegation and cold minting, smart modularity, tip hardening through orphan inclusion, and predictable block production are all benefits of this proposal. It functions in tandem with traditional stochastic minting and can be adapted to fit a wide variety of applications when considered in concert with multisignature schemes.

6 Likes

Interested to hear from others on this.

Will the reduction in difficulty for mint primitives affect the target inflation rate?

It shouldnā€™t. The difficulty will adjust to match the block frequency. If half of minters have a virtual difficulty of 10 while the rest see the natural difficulty of 20, then the stochastic nature of the system will eventally balance it around 30 to maintain 10 minute blocks on average (a ā€˜virtualā€™ halving results in a real doubling, and the average of 20 and 40 is 30). There should be no affect on aggregate reward. From a purely financial reward perspective, the ā€˜difficulty discountā€™ afforded minters using primitives should equate to them being more competitive for the static portion of the reward versus traditional stochastic minters. I.e. the financial reward for using primitives will come out of the pocket of traditional minters. The end result will be a higher PoS difficulty, which can be seen as higher chain security.

This is basically a continuation of what we spoke of last year. But in fewer words.

While this proposal is the logical evolution of minting, it changes the nature of minting. Right now minting is opt-out and we would likely have to go with opt-in approach to achieve what you propose.
Currently, minting happens automatically after the UTXOs have matured (30 days). The user does not have to do anything but install a full node, sync it and deposit some coins. After that, itā€™s all about sporadically opening the wallet and leaving it to do its thing. It is a very passive process.

The new process would require users to deliberately ā€œlockā€ some coins into an ā€œintention to mint contractā€, and then wait for the contract as a whole to mature before it can be used as proof for a future block. I personally like this a lot, because Iā€™ve always wanted to have the minting aspect of Peercoin to be detached from the ā€œcurrencyā€ aspect of Peercoin.

Is the community and the established pool of minters ready to accept the change and get used to the new process?

you have a link of that discussion? Penny hasnā€™t dropped yet I am afraidā€¦

IMO the small community we have will be behind any improvement to the chain but my concern here is will this make it more difficult (complicated) for the average newbie to hold coins on the blockchain. Although most of you think it is an easy process to store your coins in a QT to mint, I would like to see it made even easier for Mr and Mrs Newbie. Im not saying that I do not agree with the above idea because as you know I hardly understand it.

The process outlined above can work in tandem with traditional minting. We provide an incentive in the form of a difficulty discount for those willing to lock into a fresh smart contract, while those that dont are still able to mint in the traditional fashion. This is done to maximize minter participation in the consensus process, which I would argue is the primary concern of any minter proposal. This proposal directly creates a difference in quality of minters, quantitatively defined through the difficulty discount, derived from concepts of predictable and regular minters versus opportunistic or stochastic minters. But these properties are honestly a side note compared to increasing mint participation rates. @Jack17 summarizes nicely that we need to make the process accessible and newbie friendly. At the same time, we want to cater to our veterans that want convenient minting, even if it is more complex to set up. This proposal maintains a hybrid approach whereby normal minting can continue as we have done for a decade, while also introducing a 2.0 form with greater smart capability. The definition of two forms of minting is challenging to resolve, but it is the best case scenario for increasing minter participation.

I didnt realize i used a duplicate thread title, ill rename this one.

if the incentive is a mere difficulty discount, Iā€™d argue there isnā€™t any incentive at all? If the extra work involves manual labor, there is even less than none incentiveā€¦

A difficulty discount is an ROI increase via the static reward.

1 Like

This is good news! That being the case then I dont see how it can be a bad thing to add a ā€œMinting 2.0ā€ feature to try and increase participation.

Can you expand further what you mean by this?

ā€“

Iā€™m wondering about this. Say, for example, that you have someone with 100k PPC and they usually mint around 10 times per day. What kind of manual labor are we talking about for this person? Would it even be possible for them to keep up with so many blocks being minted per day?

ā€“

Nagalim mentioned here about how the ending of a contract could possibly trigger another mint primitive. Could this be used to automate the process? For example, when the contract ends after a block is minted, can the next contract be automatically triggered without manual input from the user?

ā€“

Would the smart contract nature of this new form of minting be compatible with mobile minting? For example, once minting 2.0 is active in the protocol, could we add the functionality to the iOS/Android mobile Peercoin wallet so users can opt-in to the contracts and mint from their mobile wallet? They would no longer be tied to the desktop wallet in this scenario.

Things are increasingly moving in the mobile direction and a lot of people no longer own a desktop or laptop, so I see mobile minting as an important step in keeping up with peopleā€™s evolving habits.

ā€“

It would be great to see Peercoin evolve as we finally implement all these items that weā€™ve been talking about for years now. Iā€™m eager to see the idea developed further.

2 Likes

Mint coins on a phone is IMO not an option due to battery constraints etc, but could be outsourced by ā€˜Bobā€™. If the incentive is you find easier stakes due to lower pos diff by discount, that could work economically as there is a static reward

What exactly is happening during minting that causes the phone battery to drain rapidly? And whatever the underlying cause is, are you sure the exact same thing would apply to this new system? If minting 2.0 works differently than traditional minting, itā€™s possible the issue may not be present in the new system.

finding stakes is like mining except the nonce is a future second iso a random bignumber you need to include to hash. Calculating hashes for a full 20 days could take about 20 minutes, that and continuously acting as a node on a blockchain is battery draining so should be delegated to a service.

1 Like