The ERC-918 spec is rather new, and is a novel way to distribute tokens for an ICO: proof of work. Specifically, the ERC-918 spec provides an interface for coins to be distributed by miners actually performing hashes and "mining" the coins, as opposed to an airdrop or token sale.

Only one token yet exists using ERC-918, which is 0xBitcoin. We decided to take ERC-918 and add in ERC-721, creating a non-fungible token that you can mine - a bit like Cryptokitties, a bit like 0xBitcoin.

What it does

The Mineable Gem token lets users specify at which difficulty, or "rarity", they wish to mine at. They then can point the mining software at the smart contract, and mint gems with the selected rarity. A smaller rarity score - closer to one - is better - and takes longer to mine.

These mined gems can then be added to the marketplace, where anyone can pay with Ethereum to purchase the gems.

How I built it

We adapted the existing 0xBitcoin codebase for an ERC-721 token spec, and added in our custom ERC-721 mineable Gem token. We used the existing 0xBitcoin mining software with a few small tweaks to adjust to the new contract. We built the frontend in Bootstrap, web3, and jQuerry.

Challenges I ran into

The frontend for this project was the hardest part; debugging the Solidity contracts was surprisingly simple. Neither of us are frontend developers, this was the most challenging part.

Accomplishments that I'm proud of

I'm proud that we were able to integrate all four components with time to spare - the frontend, the ERC-721 token, the ERC-918 spec, and the miner software. We were able to test and confirm that we could mine tokens with a GPU before 12 hours had passed!

What I learned

Always find a good front end developer. Always.

What's next for Mineable Gem Tokens

We can add more traits to the Gems, such as hardness, and add more features - such as "melt down less rare gems to form more rare gems", or some other form of interactivity. Also, a better frontend (and perhaps a real frontend dev).

Share this project: