hoprnet / hopr-community

A selection of awesome HOPR projects.
GNU General Public License v3.0
5 stars 20 forks source link

Position of HOPR early adopters (Genesis DAO members) #2

Closed QYuQianchen closed 3 years ago

QYuQianchen commented 3 years ago

The following is a bounty issue, meant for external contributors to pick up and work on the analytics of HOPR tokens.

Introduction

Recently our community has launched a three-phase token distribution on xDai chain and Ethereum blockchain at the end of February 2021. More than 30,000 of transactions were generated from various decentralized exchanges (DEX) since the launch. The HOPR token was even ranked as one of the top 20 tokens by trading volume on CoinMarketCap.

From the vast public data, we want to get a better understanding of HOPR trading activities. We invite you to explore the public Ethereum and xDai chain and provide answers to the following questions with source code and visualizations.

HOPR token was deployed on Ethereum mainnet on the 19th Feb. Shortly after the deployment, 85 million HOPR were minted for the token launch. 50 million out of the 85 million were pre-sale (1st phase of token launch) tokens that were bridged to xDai chain for HOPR Genesis DAO members to purchase. HOPR Genesis DAO members are accounts that hold gHOP tokens. Those presale tokens have a locking period until almost the end of the Balancer LBP sale (2nd phase of token launch). DAI collected from presale and the remainder of pre-sale tokens were bridged back to Ethereum mainnet to be put into the Balancer LBP sale pool, together with the 30 million HOPR tokens planned for the 2nd phase of token launch. Towards the end of the LBP sale, pre-sale tokens were unlocked on the xDai chain. All the DAI and HOPR staying in the LBP pool were transferred to Uniswap for the 3rd phase of token launch. Those tokens were the initial liquidity providers for the HOPR/DAI pair. This pool remains open.

Besides the 85 million token launch, there are around 13.3 million circulating HOPR tokens later minted for bounties (bridged to xDai) and 31.9 million tokens minted for treasury.

Some analytics has been done for the LBP sale part of HOPR token launch. See the dashboard here.

Task Description

HOPR Genesis DAO consists of people who previously participated in HOPR testnets. They have the privilege of purchasing HOPR tokens during the 1st phase of token launch at a favorable price of 0.05 USD/token. We want to understand the current position of HOPR Genesis DAO members.

  1. How many of them hodl their presale tokens? (on both xDai or and Ethereum mainnet)
  2. How many of them re-invested in HOPR through other platforms (not restricted to LBP/Uniswap)?
  3. How much did they gain/lose? (Transaction gas costs need to be considered, assuming an average ETH price of 1600 DAI/ETH)

Definition of complete

We expect to see a DuneAnalytics dashboard that contains visualizations/queries which provide answers (both table and chart) to the subquestions. Please choose appropriate charts for visualization. Here below are the minimum requirements for visualization.

Useful sources

gitcoinbot commented 3 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 400.0 HOPR (352.56 USD @ $0.88/HOPR) attached to it as part of the hoprnet fund.

gitcoinbot commented 3 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 265 years, 7 months from now. Please review their action plans below:

1) mhrann has applied to start work _(Funders only: approve worker | reject worker)_.

mhrannnnnnnnnnnnnnnnnnnnnnnnnn 2) fauzan1211 has applied to start work _(Funders only: approve worker | reject worker)_.

Surr, it's will be finr in near future as well 3) wjy7551376 has applied to start work _(Funders only: approve worker | reject worker)_.

Dear Chen and HOPR team,

We are BytesIO that focuses on blockchain data analytics. After check our descriptions and resources link, we think we have the idea to handle this issue since we are familiar with Dune Analytics and on-chain data analytics.

Best, BytesIO 4) matwaller has applied to start work _(Funders only: approve worker | reject worker)_.

I have applied for another data visualization bounty you have available, I will happily take on all of these and start later today 5) t0bij has been approved to start work.

I follow Hopr for quite some time. Participated in some testnets, being a DAO member, reviewed the Hopr farm contract and became a Hopr farmer afterwards. Besides this Hopr knowledge I'm experienced in software engineering and also did quite some data analysis over the years. SQL and dashboards aren't strangers to me. I checked the existing Dashboards on Dune Analytics and I really want to do some on-chain-analysis myself since. Would be awesome to combine it with this task for the Hopr project. After some Easter family time I could start on Tuesday the 6th April (besides my day job as software architect) and could deliver on Monday the 12th April.

Learn more on the Gitcoin Issue Details page.

gitcoinbot commented 3 years ago

@t0bij Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

t0bij commented 3 years ago

@gitcoinbot - yes, got the approval today ;)

t0bij commented 3 years ago

@QYuQianchen - my understanding of the definition of complete is that it's mandatory to visualize data from xDai and Ethereum mainnet together in charts and tables. Currently DuneAnalytics has no feature to combine both sources in a single chart or query. It's always either xDai or mainnet. I first thought that I might missed out a feature but a community manager on their Discord confirmed my understanding.

Did you maybe solve a comparable challenge in the past or have a recommendation on how to approach the issue? Maybe it's necessary to prepare separate queries in DuneAnalytics and combine the data outside.

QYuQianchen commented 3 years ago

Hey @t0bij ! That's indeed a problem. We didn't really have such a problem in the past, where the exact same array of addresses need to be used across chains. Maybe, just an idea, to build an array that contains all the gHOP users (retrieved from a different query, or inserted manually)

SELECT * FROM unnest(ARRAY[
        -- some addresses here
        '097707143e01318734535676cfe2e5cf8b656ae8',
        'f6a78083ca3e2a662d6dd1703c939c8ace2e268d',
        '9fea9a2f645d08866e972935595f393bddff0749'
]) AS list

and parse them when using:

...
WHERE recipient IN (
            SELECT decode(list, 'hex') FROM list
)
gitcoinbot commented 3 years ago

@t0bij Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

gitcoinbot commented 3 years ago

@t0bij Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

t0bij commented 3 years ago

@gitcoinbot I'm still working on it and will submit it for review soon.

t0bij commented 3 years ago

@QYuQianchen - you can find a WIP dashboard for data from xDai here: https://duneanalytics.com/t0b/hopr_dao_members_xdai_base

In addition I wrote you a message on TG.

gitcoinbot commented 3 years ago

@t0bij Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

gitcoinbot commented 3 years ago

@t0bij Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

gitcoinbot commented 3 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


@t0bij due to inactivity, we have escalated this issue to Gitcoin's moderation team. Let us know if you believe this has been done in error!

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

gitcoinbot commented 3 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


@t0bij due to inactivity, we have escalated this issue to Gitcoin's moderation team. Let us know if you believe this has been done in error!

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

t0bij commented 3 years ago

@gitcoinbot - the reminders went to my spam but I whitelisted the address now.

I'm still working on the bounty. I added a dashboard for the mainnet. The boards should contain all the data needed for the definition of complete. @QYuQianchen maybe you can have a look before I combine them. I also have some more ideas which aren't in the original list.

xDai: https://duneanalytics.com/t0b/hopr_dao_members_xdai_base Mainnet: https://duneanalytics.com/t0b/hopr_dao_members_mainnet_base

gitcoinbot commented 3 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 400.0 HOPR (243.21 USD @ $0.61/HOPR) has been submitted by:


t0bij commented 3 years ago

@QYuQianchen - I submitted dashboard https://duneanalytics.com/t0b/DAO-Members

As we discussed earlier DuneAnalytics currently has no feature to combine xDai and mainnet data in a single chart or query. I worked around this issue by a fixed list of DAO members in mainnet queries. Furthermore some queries are semi-automatic. I created 2 queries which export data from mainnet or xDai as JSON:

DAO Members - 02 - JSON Export Mainnet - https://duneanalytics.com/queries/40394 DAO Members - 04 - JSON Export xDai - https://duneanalytics.com/queries/41187

The JSON-output is used as input in queries which are marked as semi-automatic. So refreshing data from the other network requires a manual step.

The ranges in the histograms and the ETH price for the fee calculation are configurable by parameters. Please let me know if you need further information.

QYuQianchen commented 3 years ago

@QYuQianchen - I submitted dashboard https://duneanalytics.com/t0b/DAO-Members

As we discussed earlier DuneAnalytics currently has no feature to combine xDai and mainnet data in a single chart or query. I worked around this issue by a fixed list of DAO members in mainnet queries. Furthermore some queries are semi-automatic. I created 2 queries which export data from mainnet or xDai as JSON:

DAO Members - 02 - JSON Export Mainnet - https://duneanalytics.com/queries/40394 DAO Members - 04 - JSON Export xDai - https://duneanalytics.com/queries/41187

The JSON-output is used as input in queries which are marked as semi-automatic. So refreshing data from the other network requires a manual step.

The ranges in the histograms and the ETH price for the fee calculation are configurable by parameters. Please let me know if you need further information.

Hi @t0bij Interesting walk around of the cross-chain issue! While looking at your approach, I'm thinking, if it would be easier to use Dune's "Labels", which marks accounts with "HOPR genesis DAO member", "HOPR Avado airdrop", etc.

Then in queries, DAO members' addresses can be retrieved with WHERE EXISTS clause.

What do you think?

QYuQianchen commented 3 years ago

I just went though all the queries of your dashboard. AMAZING job! Really IMPRESSIVE!

Could you please help me better understand the following:

  1. In "inflow sources" query, "transfer from other accounts" is not a kind of "source" right? For example, account 0x0f9fF5028ef1Aa963C965632F0Bc113A140e63d2 has received some tokens from other Genesis DAO members. How is it treated?
  2. In the "Base Table" query, are "harmers" taken into account? What if a Genesis DAO member provides liquidity with their HOPR tokens (thus, HOPR tokens get converted to UNI-V2 tokens), is somehow their nominal HOPR balance counted in the table?
QYuQianchen commented 3 years ago

Three more cosmetics suggestions (Numbered following the previous comment):

  1. Could you please change the dashboard name to "Position of HOPR DAO Members"? (On the dashboard interface -> Edit -> Settings -> Dashboard title)
  2. Add tags "HOPR", "Uniswap", "DEX" and "trade"? (On the dashboard interface -> Edit -> Settings -> Dashboard tags)
  3. Add a text component that describes the purpose of the dashboard (e.g. Farm dashboard) (On the dashboard interface -> Edit -> Settings -> Add text widget)
t0bij commented 3 years ago

Hi @QYuQianchen, thanks for the feedback and your input. I'll address your points asap. By the end of the week at latest.

t0bij commented 3 years ago

Hi @QYuQianchen ,

again, thanks for your valuable feedback. I finally found the time to check it.

First, using Dune's Labels definitely would make things easier for static groups like "HOPR genesis DAO member". Great idea.

Regarding your numbered feedback:

1) exactly, transfers from/to other accounts is not part of the final dashboard. In https://duneanalytics.com/t0b/hopr_dao_members_xdai_base I had a look at this, especially in DAO adresses which got additional tokens from other DAO adresses. As I wrote earlier some of these movements look suspicious to me but as it wasn't part of the DoD I decided to skip for now. 2) no, the farming is only considered in https://duneanalytics.com/queries/40445/79804. So If somebody put Hopr on the farm it's not longer in the current balance. 3) is missing I think or has been removed ;) Your first comment has feedback points 1+2, the second 4-6. 4) done 5) done 6) done

Let me know if you have other points. I also refreshed the queries right now. I also looked a bit into automate this. I played around with an AWS Lambda to execute to launch the JSON export queries and set the result in the queries from other chains. I think it could work but would be quite ugly and fragile because probably some ugly HTML parsing would be involved.

gitcoinbot commented 3 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 400.0 HOPR (115.69 USD @ $0.29/HOPR) attached to this issue has been approved & issued to @t0bij.