Proposal for "Create NXTcoins" function
Before I code it up, I wanted to make sure I didnt miss anything obvious. I will use a centralized pool server, but this is very similar to a lot of coins at launch where there is only one or a few pools and solo mining is not practical.
My model is that a NXTcoins will have an issuer that is the basis for the coin. It is assumed that the issuer will also be the pool operator or be working closely with the pool operator. Maybe I will offer NXTcoins pool operating service. Anyway, if this works out well, I can always add support for multiple pool operators later.
All miners will be monitoring adherence to the NXTcoins parameters to ensure compliance.
The coin issuer will issuer the asset (up to 1 billion) and distribute whatever presale amounts (if any) to the NXTaccts before issuing the Create NXTcoins AM. Once the Create NXTcoins is processed, the parameters are enforced by peer review. The coins that are to be mined will be either with the issuer or the pool operator. It will be the responsibility of the issuer to make sure the pool operator has enough coins to distribute to miners.
I have specified royalty, bounty and donation rates. This is a percentage of the mined coins that go to the issuer, bountyfund and donationfund. I will default the donationfund to me, hopefully people wont have a problem with that. The royalty goes to the founder, but it is not a premine, it is from the coins that are mined. I think this is much better for a coin. I put the presale in there though, so people can choose how they want to distribute their coin. 100% presale would be PoS. I also have a bountyfund so that as the coin grows, it will be possible to have a continuous stream of funds, if there is any coins mined.
There is maxblockrewards[16][2] that is set to be the maximum number of coins that can be issued at any point in time, along with when that limit is enforced. The details of how the coin is mined is totally up to the issuer as long as the maxblockrewards are followed.
There is a URL to sourcecode that implements the mining and pooling part of the coin.
If this structure looks good, I will implement a reference pooler for nodecoin along with nodeminer, subject to changes as I run into implementation issues, but I think this is a decent place to start. Once this is done, there will essentially be a create coin API for NXT, and we dont have to wait for any NXT core changes, I am designing to current testnet version.
James
struct NXTcoins_data // 1% of presale and mined goes to pooling acct, send (authorized - .99*presale) to pooling acct
{
int64_t totalcoins __attribute__ ((packed)); // in satoshis
int64_t presale __attribute__ ((packed)); // in satoshis, must be less than authorized and exactly match preissued
int64_t royalty __attribute__ ((packed)); // rate in satoshis, goes to issuer
int64_t bountyrate __attribute__ ((packed)); // rate in satoshis, goes to bountyfund
int64_t donation __attribute__ ((packed)); // rate in satoshis, goes to donationfund, defaulted to NXTcoins
int64_t maxblockrewards[16][2] __attribute__ ((packed)); // in satoshis reward and threshold active
char coin_name[16];
char website[64],sourcecode[64];
char issuer[MAX_NXTADDR_LEN],poolingacct[MAX_NXTADDR_LEN],assetidstr[MAX_NXTADDR_LEN];
char bountyfund[MAX_NXTADDR_LEN],presalefund[MAX_NXTADDR_LEN],donationfund[MAX_NXTADDR_LEN];
};