TokenMiningPool.com now supports MiningKing and DoubleKingsReward

infernal_toast
2 min readJul 21, 2018

--

A new upgrade to TokenMiningPool.com allows the pool to call arbitrary smart contracts while it mints new blocks. The most interesting part of this new feature is that it is able to PROVE to these contracts that it is minting a 0xBTC block and therefore those contracts perform rare and powerful methods.

The first ‘proxyMint’ contract, MiningKing, simply stores a publicly-readable address called miningKing. This contract is not owned by anyone. This address can only be set by the actual miner who minted the block. The miner sets this address by setting the first 160 bits of their 256-bit mining nonce to a custom value!! 0xBTC mining software should soon support this feature. The MiningKing contract is located here :

The second ‘proxyMint’ contract, DoubleKingsReward, is also being ‘minted through’ by TokenMiningPool for every mint(). This contract is owned by TokenMiningPool and 50 0xBTC tokens are stored inside. It will detect if the same miner mints a 0xBTC block through TokenMiningPool and becomes king while they are ALREADY the king! If this happens, then it will pay out its entire balance (50 0xBTC tokens) to that lucky miner immediately! This contract can be read here:

If you read those contracts more closely, you will see that they are almost identical. This is because they follow a special standarized pattern for building a proxyMint contract. Any number of these contracts can be cascaded through by the pools and miners. Many many more proxyMint contracts can be built with new and interesting powers and properties. Pools can choose to mint THROUGH these contracts in order to prove to these contracts that they are indeed minting 0xBTC through them, and they can perform powerful and rare actions which are ‘gated’ behind Proof of Work. They are public contracts and their methods can be called by anybody, but their methods can only be called if 0xBTC is being mined THROUGH them.

You may view the working javascript tests for these contracts here:

https://github.com/0xbitcoin/lava-wallet/blob/master/test/LavaWallet.js

Enjoy!

--

--

No responses yet