Friday, March 1, 2019

Imagine This..

Follow a guide like this to make a new ERC20 Token: https://hackernoon.com/how-to-create-your-own-cryptocurrency-token-b4e3eeac34aa

By default, all of the tokens will be assigned to your Ethereum address as the deployer/creator. However, that sucks and isn't decentralized like real cryptocurrency (people might think you are stupid) so simply modify the code a bit so that does not happen. Instead, anyone can call a method in the contract called mint() or something to generate new tokens, so it works like a real cryptocurrency.

Now this won't work very well just yet because everyone will be spamming that method like crazy and it will become a giant gas spending war. So just add a SHA Proof of Work requirement (like Bitcoin's for example) in order to call that method; that's easy to do in Solidity. (https://medium.freecodecamp.org/how-bitcoin-mining-really-works-38563ec38c87)

Then, to auto-regulate that, write a bit of code that auto adjusts the difficulty of the Proof of Work (the 'target number') inside the contract based on how often its being successfully completed. Now, the mint() method will be globally called on a relatively regular interval assuming relatively stable mining hashrates, like say once every 10 minutes.

Imagine if that existed wouldn't that be so interesting? A pure mined token with no governance, one that worked like an actual cryptocurrency. That would be so cool to have in Ethereum wow.



No comments:

Post a Comment