Multi-signature minting with phone app re-imagined

A good year to everyone.

This post is a follow up on Multi-signature minting how the Peercoin Foundation is minting with its donation address. Why not start the new year with a scenario how cold minting could be done with peers with their Peercoins phone app.

Let’s introduce Alice and Bob each holding their phone app:

Alice wishes to stake with her 500 coins but does not want to download and run a desktop wallet 24-7. Bob on the other hand has no coins but wish to earn them, so he too, can stake coins one day when he has earn enough by providing a service.

Alice and Bob find each other on Discord / forum and/or the flutter app and they have come to an agreement where Alice becomes the Cold minter and Bob becomes a Pool Operator.

Bob, being the operator asks Alice to give him 2 public keys for the operating service. Bob, creates creates a 2-3 multi-sig address with a public of his own. This way, Alice will always have the ability to spent her coins as she holds the majority of keys. 1 key is kept separately off - phone to have it cold while the other one is used to stake future stakes.

To create a 2-3 multisig address, Bob goes to Cointoolkit and enters Alices 2 public keys and Bobs own public key. Now he has a multisig address starting with a lowercase p: pBMmfTPNSUsay3NPE2gLWLXXiaEVXPETyt which he shares with Alice along with the redeem script. Bob will never be able to spend from this address as he only has 1 key while Alice has 2. Alternatively, Alice wants to be in full control as she is putting her coins in there, therefor asks Bob for his public key to generate it herself (would be a nice to have feature in the app :smiley: ).

Alice sends her 500 coins to this created multi-sig address(pBMmfTPNSUsay3NPE2gLWLXXiaEVXPETyt). 30 days needs then to pass before minting can occur. Bob agrees to find stake prospects for Alice on a 2 weekly basis, for each actual minted stake he gets 1 whole shiny peercoin for it.

On day 31 Bob goes to findstake fills in the form and tries to find stake prospects for Alice for the next 14 days. The max is 20 days, but the agreement was a 2 weekly basis.
If Bob finds one or several prospects, he signs the future transaction on Cointoolkit with 1 whole shiny peercoin to his address which is part of the multi-sig address. The rest goes back to pBMmfTPNSUsay3NPE2gLWLXXiaEVXPETyt. Now he has a link to a signed transaction. He send this link to Alice (via the phone app) stating: Hey Alice, I have found a future stake that will mint in exactly 214 hours and 28 minutes from now, provided that the POS difficulty stays below 42.3, please sign this transaction with your mint-key and give me back the transaction that has 2 signatures. :slight_smile:

Alice looks at the transaction, sees when it occurs and verifies that 1 shiny Peercoin will be allocated to Bobs address, signs and gives Bob the then twice signed transaction. Bob loads this transaction to his desktop wallet and both wait till D day arrives.

Upon D day, the POS difficulty at the time was 21.9, so the signed transaction stakes! Now Bob has earned 1 shiny coin while Alice received 502.84 (formula here: A = P(1 + 0.03*t) + 1.2 with t at 40 days) minus 1 coin to Bob.

Bob is very pleased and and has meanwhile extended its service to signup up Charlie as his Pool operator.

Thats all folks!


Very nice. Do you think we should try to combine the cointoolkit functions into findstakejs? Do you think we can automate Alice’s job more, like maybe as simple as clicking yes on an app notification that verifies the 1 ppc output and the reward for her? It would of course be nice to improve Bob’s life, but making Alice happy is Bob’s livelihood.

Making Alice happy is central, we need to work out how Alice can do the things in this story with just her peercoin app on her phone. Bob comes secondary, the more clients he is handling as a pool operator the less likely he will be using a webbased findstakejs to findstake with.

Based on the above, we could ask follow up questions like:

  1. Is it possible for Alice to generate 2 public keys to share with Bob with the flutter app? In such a way 1 can be (re)stored off phone and the other one to have ready to verify
  1. is it possible for Bob to enter 1 ppc as a reward in findstakejs?
  1. how do they communicate? Also how do they find each other? (edited)

  2. can cointoolkit be opened within flutter app by passing a link?

a idea would be to integrate some features from cointoolkit into flutter app for full intgration

  1. when Alice wants to spend a few coins with her 2 keys and the redeem script, how is this done with flutter app?