Post
Topic
Board Altcoin Discussion
Re: List of all cryptocoins
by
Hazard
on 04/12/2013, 07:20:34 UTC
Delete the pre-mine on StableCoin, all the pre-mined coins on Stablecoin were destroyed when the coin was revived.

I assume there is a proof for that, is there ?

DESTRUCTION OF THE PREMINE

As some of you may remember, as part of the old mixing service, there were 1.2 million coins premined to act as the basis of the mixing pool. Of course, this caused much anger within the community, with accusations that the money would be used improperly, among other things. 5 months later, these funds have yet to be touched, so I'm happy to have proved those people wrong on those front.

However, under the new mixing system, these coins are no longer necessary. Accordingly, these coins will be publicly destroyed, as they were never intended to be used for anything other than mixing.

In this case, the 1.2 million coins were created in the genesis block. You might notice this is different than most coins that do their premine in block 1 and onward. This is because there is a well documented quirk within bitcoin that makes the genesis block unspendable. This is because when Satoshi designed the client, he decided not to add the coinbase transaction from the genesis block to the global transaction database.

To make these funds spendable, I added a simple bit of code during the initialization of the client (init.cpp). This code adds the genesis transaction to the global transaction database, making it spendable.
Code:

Code:
       // Genesis block
    const char* pszTimestamp = "June 7 2013, The Times, Prince Philip admitted to hospital for two weeks";
    CTransaction txNew;
    txNew.vin.resize(1);
    txNew.vout.resize(1);
    txNew.vin[0].scriptSig = CScript() << 486604799 << CBigNum(4) << vector((const unsigned char*)pszTimestamp, (const unsigned char*)pszTimestamp + strlen(pszTimestamp));
    txNew.vout[0].nValue = 1250000 * COIN;
    txNew.vout[0].scriptPubKey = CScript() << ParseHex("0449D77B9B62E0DB1FD6150ECFC5722F31FEE52E585DE31B5AEFAD2CAC415D5698991F8F0B0CBBA7B9F4431BBE79B684876EDFBD369554ACC4182753FA48A3CD80") << OP_CHECKSIG;
    CBlock block;
    block.vtx.push_back(txNew);
    block.hashPrevBlock = 0;
    block.hashMerkleRoot = block.BuildMerkleTree();
    block.nVersion = 1;
    block.nTime    = 1370579804;
    block.nBits    = 0x1e0fffff;
    block.nNonce   = 2788;
                
        uint256 genesisHash("0x0a59605118489aa9cde58e64210d3d56e246758fbabcd1482e54bf4032545221");
        uint256 hash = txNew.GetHash();

{
        LOCK(mempool.cs);
        mempool.addUnchecked(hash,txNew);
}
                
{
        CTxDB txdb;
        txdb.TxnBegin();
        CBlockIndex* pindex = mapBlockIndex.find(genesisHash)->second;
        unsigned int nTxPos = pindex->nBlockPos + ::GetSerializeSize(CBlock(), SER_DISK, CLIENT_VERSION) - 1 + GetSizeOfCompactSize(block.vtx.size());
        CDiskTxPos posThisTx(pindex->nFile, pindex->nBlockPos, nTxPos);
    txdb.UpdateTxIndex(txNew.GetHash(), CTxIndex(posThisTx, txNew.vout.size()));
    txdb.TxnCommit();
}

By removing this code, the genesis block becomes unspendable, and the coins are essentially destroyed. This is the most eloquent way to accomplish the goal. Version 1.3 of StableCoin has this bit of code removed. I urge everyone to update immediately.

You can view the relevant commit here: https://github.com/stablecoin/stablecoin/commit/1912b4c1e9fb195c242e57459c613cb8c7846c8b