# HASHTAG STAKING

**Staking** is simply a process wherein users deposit their **Hashtag NFT** tokens into the Staking contract and farm tagcoin every hour based upon the performance of their hashtag on twitter. Staker's can claim their farmed Tagcoins at all times. Staker's can also un-stake their hashtag NFT token at any time this will lead to their **Hashtag NFT token** from collecting any further tagcoin yield. This is the primary function that enables the creation and the distribution of Tagcoin.

**How does it work?**



![](https://lh4.googleusercontent.com/VjHSH9ysTvup3OMAvfavsgfYdugWOXQkL703iJA6LMiTpXOhV7Wq2x3MkW9lxqBOlZyjjLBS3Q8bp4mVTL524Ly8oTVzYQOkK5VUlDwvwe7Gx0R8Q3fNmer8Cto6wzId3eQC9N2x)

**Data Collection:** Raw data is collected by calculating the number of unique individual pages indexed by google for each #hashtag for a particular social media platform. For e.g. If we ran a query using google.com search API ( site:twitter.com “#love” ) it will fetch the result for the number of twitter posts google has indexed with a specific #hashtag such as #love included in them. When this query runs every day at a specific time, for instance 12.00 GMT the oracle can calculate the increase in the number of pages indexed on a daily basis.  The oracle's job is to store this performance data for each #hashtag on a daily basis.

![](https://lh6.googleusercontent.com/JBBowsnbAPYq-F3H4WICJzR4nWiqf1qs3SznGUG66OiWn8pVJ8kG3JHlTXNIrtO0_2BoV28uFUsITkxpjcQIAhTy9vxicXcXOZSmsCxoN6x6kRIYMismlreXGPyhPitVWL6iGyNL)

**Ranking:** The oracle’s use this raw data to compute the rank of each #hashtag on a daily basis based on the number of indexing on that particular day. The ranks of every #hashtag will change based on their performance hence will affect their earnings on a daily basis.

**Grading System:** The system places each #hashtag in a grading bucket. The grading system works by dividing the total number of #hashtags by 21. For e.g. If the system has registered 2100 #hashtags then they will be divided by 21 and each bucket will have 100 #hashtags respectively. In such a scenario  #hashtags from rank 1 to rank 100 will be in bucket 1 and #hashtags from rank 2001 to 2100 will be in bucket 21. Think of each of these buckets as a grade. So all #hashtags are graded between grade 1 to grade 21.

![](https://2242798044-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MUnEWa-nDhTLxDJDKhL%2F-MdPFjGWn3fl3fHZD0dq%2F-MdPHZS3za30UkiMuYul%2Fgrading%20math.jpg?alt=media\&token=2e1c6754-9502-4d5d-9b6f-ef5afe766deb)

**Earnings Calculation:** Each bucket has a predefined amount of Tagcoin allocated to it. This is done by applying a bell curve wherein grade 1 #hashtags collects plus 50% of the median value and grade 21 #hashtag collects minus 50% of the median value.

![](https://2242798044-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MUnEWa-nDhTLxDJDKhL%2F-MdPFjGWn3fl3fHZD0dq%2F-MdPHv-ejP-06BN0uqah%2Fearnings%20calculation.jpg?alt=media\&token=6034b758-3514-4fd5-b810-14d1ddafdb8f)

_Table below shows the exact allocation of Tagcoins for each grade based on 10,000 Tagcoin supply per hour and 2,100 staked #hashtags. The hourly supply will change after every halving event. Refer to Tagcoin token supply_

![](https://lh6.googleusercontent.com/2wSdjdcnkjy0RpPy6YACHLSvlhT-9wy1YMaisODxQnaZwRS8e6YgJJ-9hWMdDVj1maPpqFBXIbnUnZA4W-c7zrJ1cVLC8MNqJ4l3ko_YTkYGUWfqDN02BE4WYljoqR5A00JQB7hG)

**Merit:** The objective behind placing #hashtags in a grading system based on rank is to reduce the cost on oracles to broadcast data to the Tagcoin Mining Contract. It also serves the purpose of reducing the number of transactions the oracles have to fire to the staking contract.&#x20;

The base logic being if the system works purely of the ranking based performance then if a #hashtag moved rank from 2,100 to 1 on a given day then oracles would have to fire 2,000 transactions to update the contract as rank of all other #hashtags would have changed. In the grading system this particular #hashtag would have moved from grade 20 to grade 1 but oracles would now just need to update the grade of only 20 #hashtags as only one #hashtag would be displaced from grade 1 as its rank went from 500 to 501. This logic repeats itself down the line up to grade 19 bucket. One #hashtag in and one out of the grade buckets. This allows the system to manage both scale and cost efficiency of the mining process.
