Skip to content

olejardamir/Hertz

Repository files navigation

HERTZ (Erc20 token whitepaper)

0x6a4b6316D1d03d2f2B3A0294502F8fAF0F38cA14

A token built for everyone and nobody in particular


Story behind this project, Introduction, and a personal note ...

This is a solo project, one person, one team-member. While coding a project which is supposed to allow people to mine BTC model without any hardware, thinking about what I am doing and why, I tried to come up with a core explanation to all crypto-currencies and their market affairs. No matter how bad or good the project is, no matter what technology is applied, none of this matters as long as it can turn cents into dollars. It was a time to stop the coding and doing the complex things in vain, and simply follow the conclusion. What would happen if there were a stable-coin with a constantly increasing price ? If we can have stable-coins with a stable price relative to anything, then why not constantly increase that price ? what features must exist, and how would it work ?

All of these questions had some solution, however, it took a lot of thinking to come up with the best one. As a great fan of a current fad called “deflationary coins”, I have noticed something wrong with them... Although deflationary, their prices weren’t changing no matter how big or small the supply was. As a main developer of a project called ButtCoin (The Reaper, and Snayl), I have noticed one basic and simplest fact about people who are interested in the crypto-currencies... The truth is, majority of people simply want to make the money, and therefore good project is the one which helps them make the money. Furthermore, there is a very small amount of individuals who would contribute their hard efforts to any project, and for free. As a consequence, projects can gain the required publicity by depositing their investments, while at the end everyone ends-up losing to new technologies or the market manipulations. It is just a matter of a time and a question of “when ?” the zero-sum (game theory) kicks-in. Therefore, good projects are also the ones that simply prolong the inevitable destruction and a ruin (either financial or by the competing technologies). I have also seen great projects getting destroyed and burned to a ground with people losing their money in tears...

For this reason, I have decided to make this a solo-project, unrelated to any past projects I was working on, and create a coin that will never have the falling prices. It is a coin where everyone can profit at any time... It is a project with a minimal loss of 2% and where the community can benefit from any behaviour associated with the market manipulations. Whales, bots, and other creatures will never go away, so it would be great if we could simply make them join us at one point where we can all benefit from one-another. I took an idea from deflationary coins to burn tokens at each transfer, but also to create a micro-exchange and a storage of Ethereum within a contract. The result was very simple while the implications are huge. Furthermore, I have realized that the code I have made can be used with any ERC20 token, and Tethter is the one on my list, which will be run in a parallel with Hertz. A generalized source-code with instructions will be made so that anyone can take it and generate their own token in order to deflate any other token they want. We can even deflate deflationary tokens, including the Hertz ! However, this is a topic beyond the scope of this white-paper.

How does it work ?

The explanation is very simple. Imagine people putting money on one pile. Each time someone wants to take the money back or send it to someone else, they have to leave 2% of that amount on the pile. The 2% that remain on a pile are shared with everyone since the Hertz token simply tells how much of a pile you own rather than how much of money you got. Therefore, nobody can lose more than 2% of what they put on a pile, while everyone profits together from the money-flow. This is how we can have a deflationary stable-coin where nobody loses and where everyone always gains.

How is it a stable-coin ?

It is a stable-coin in comparison to Ethereum. USD as well as BTC is in progress using the same mechanism.

Why should I purchase this token ?

If you believe in a long-term holding of Ethereum, and if you can afford a 2% loss of your Ethereum, then you can use this token for the safe keeping with a high probability of getting more Ethereum than you have initially deposited.

How to purchase from the contract

To purchase directly from a contract, there are a few steps involved.

  • The best way is to install Metamask plugin for your browser.
  • Go to https://etherscan.io/token/0x6a4b6316d1d03d2f2b3a0294502f8faf0f38ca14#writeContract
  • Locate the text that says " Write Contract Connect to Web3" and press the "Connect to Web3".
  • Accept all popups and interactions with Metamask (if prompted).
  • Locate the field which says "purchaseTokens", type in the amount of Ethereum you'd wish to use.
  • Please have some additional ETH for the GAS fees (always type in less than the maximum that you hold).
  • Press the blue "write" button under "purchaseTokens", and accept the Metamask popup notification.
  • Your Ethereum will be deposited and HZ tokens sent to you.
  • You may need to add the token to Metamask using the contract ID: 0x6a4b6316d1d03d2f2b3a0294502f8faf0f38ca14
  • You can also search your ETH address on etherscan.io to see whether you got the tokens.

How to get ETH back from the contract

The procedure is the same as the "How to purchase from the contract" explained above. However, instead of pressing the write button under "purchaseTokens", you can use the sellAllTokens to exchange all HZ you got. If you want to specify the amount of HZ, use the "purchaseEth" field and remember to type in 18 decimals too (there is no decimal point).

How to see the conversion values

Go to https://etherscan.io/address/0x6a4b6316d1d03d2f2b3a0294502f8faf0f38ca14#readContract Use the fields tokensToWei (to see how much wei you will get) or weiToTokens (to see how many tokens you will get for your deposited wei). Keep in mind, both Ethereum and HZ have 18 decimals and results will be displayed without those decimals. You can use any online Wei to Ethereum calculator such as http://eth-converter.com/

About Token

  • Pre-minted: 0
  • Contract owner: nobody, meaning, nobody collects Ethereum.
  • Decimals: 18. Since token price will always increase, zeros will become very important.
  • Total Supply: 21000 tokens. Since we are using 18 decimals, 21000 tokens is enough to make traders put a token on exchanges due to a low supply, and sell it.
  • Minting: when the current supply reaches 21000 we cannot mint more tokens. However, when tokens are burned by transferring or by exchanging back to Ethereum within a contract, the number becomes lower, and we can mint them again using the contract.
  • Current Supply: The current supply shows the current amount of circulating tokens. The current supply is reduced by burning and increased by purchasing tokens from a contract.
  • Trade fees: No fees for a token purchase, 2% for converting back to Ethereum. Initial idea was to have no fees at all, however, people could avoid burning Hertz by converting it to Ethereum. This is only a safety mechanism making sure that Hertz will be used as intended, at least once.
  • Everyone profits when Ethereum is taken away from the contract.
  • Everyone profits when token is transferred from one account to another.
  • Starting price: 1 Ethereum = 1 Hertz. From that point, Hertz price is always increasing.
  • Minimum purchase: 0.000000000000000001
  • Maximum purchase: Total Supply minus Current Supply

Web-pages and the social media

Performance and expectations

  • Burning function has been commented-out because it can be used to abuse the contract. For example, if A and B invest, and then B decides to burn their tokens while A exchanges tokens back to Ethereum, we could have witnessed a possible money-laundering scheme. A 2% fee per transfer is good and slow enough to prevent this from happening. Furthermore, the burning would increase the prices in unpredictable manner, and it would lower the distribution of a token while implying a manipulation.

  • Initial 5 ETH has been deposited in order to lower the price increase rate. For example if person A places $0.1 and then burn 50%, they would have increased the price for anyone else to purchase a token. For this reason, the price-safety deposit has been made right after the token launch to prevent us from using too many zeros and too soon.

  • It is not possible to miss-out on this token’s increasing price since the price is always increasing. Furthermore, since everyone profits together from the burning, there is no ponzi-scheme.

  • In the beginning, the price will oscillate around token’s contract price. This is why the name Hertz was chosen. However, as the token becomes spread across the accounts, this will become more predictive.

  • It is my highest hope that bots will work together with the human traders and holders, and that everyone will profit. This is simply because bots can profit from arbitrage between the contract’s price and the exchanges. When this happens, we will have a constant and a straight line of an increasing price. This way, we will all profit from the bots as the bots will profit from the token and exchanges.

  • A new deflationary token will be created by someone else to deflate Hertz once we reach 21000 tokens as a current supply... or once we start using too many zeros; since the prices may become too high on exchanges. Furthermore the bots could take the arbitrage as an advantage earning more than others can earn if there is a large gap between the contract price and a market price. This deflationary token, however, is not going to be made by Hertz (or me), while the general source-code will be available to everyone.

  • While discussing Hertz online during a development, the eavesdroppers have done their task and created a poor copy of a Hertz token. Please be aware of the other projects which claim to do the same thing as Hertz. Please double-check their source-code to avoid getting scammed. It is extremely easy to turn this project into a ponzi-shceme given the nature of it, and it is a matter of only a few lines of a code. Furthermore, Check their source code history for any development, and you will see which one was gradually developed and which one was a copy-paste and a mockery.

Source code review

External functions

function purchaseTokens() external payable {

This is a function which enables the purchase of Hertz tokens. Since the contract doesn't belong to anyone, nobody has an access to Ethereum deposited to a contract. Therefore, only the addresses who made an Ethereum deposit can have an access to Ethereum by exchanging their HZ tokens to Ethereum. Once the 21000 tokens are minted, this function will not produce any more tokens. However, when tokens are burned, this function can be used again. Tokens are burned by doing a transfer or by purchasing ETH for HZ tokens. Zero purchases are not allowed.

Internal functions

function _transfer(address to, uint tokens) internal returns(bool success) {

This is a helper function, used to separate the burning fee from a transfer. It is used only to make the code cleaner.

function _transferFrom(address from, address to, uint tokens) internal returns(bool) {

This is a helper function, used to separate the burning fee from a transfer. It is used only to make the code cleaner.

Public functions

function transfer(address to, uint tokens) public returns(bool success) { 

A transfer function with a 2% fee. 2% of tokens get burned and a circulating supply reduced by the same amount of tokens. No zero transfers are allowed. No burning allowed. No minting allowed. Checks if balance is greater or equal to tokens amount.

function transferFrom(address from, address to, uint tokens) public returns(bool success) { 

Same as the transfer function except that we must include the from and to addresses with the approved amount.

function approve(address spender, uint tokens) public returns(bool success) { 

The approve function for the transferFrom function, usual token standard.

function approveAndCall(address spender, uint tokens, bytes memory data) public returns(bool) { 

The approve and call function for the transferFrom function, usual token standard.

function purchaseEth(uint tokens) public { 

Use this function to exchange your tokens back to Ethereum. The 2% charge will take an effect. You must include all 18 decimals. No zero purchases are allowed.

function sellAllTokens() public { 

This is a function to exchange all of the HZ tokens you got available without worrying about the decimals.

View functions

function totalSupply() public view returns(uint) { 

Displays the total supply of tokens (which is 21000).

function balanceOf(address tokenOwner) public view returns(uint balance) { 

Displays the token amount for the tokenOwner address. This is a strandard ERC20 token function.

function allowance(address tokenOwner, address spender) public view returns(uint remaining) { 

Displasy the allowance amount for a transferFrom function. This is a strandard ERC20 token function.

function tokensToWei(uint tokens) public view returns(uint) { 

Shows how much wei you can get for the entered amount of tokens.

function weiToTokens(uint weiPurchase) public view returns(uint) { 

Shows how much tokens you will get for the entered amount of wei, given the current token price.

Declared variables

symbol Token symbol (HZ)

name Token name (Hertz)

decimals 18

_totalSupply 21000

_currentSupply 0 (initiated)

_DECIMALSCONSTANT 10^18

weiDeposited 0 (initiated)

balances a map

allowed a map

constructorLocked true (after running a constructor)