ShenaniganDApp / shenanigan-monorepo

17 stars 4 forks source link

Gitcoin donation and Liquidity Providers script #220

Closed youngkidwarrior closed 3 years ago

youngkidwarrior commented 3 years ago

Description

Goal: Write scripts for both Gitcoin Donators and Liquidity Providers.

Gitcoin

Go to etherscan and grab addresses and donation amounts for the past 3 donation rounds. You should be able to get a csv for thetoken transfer within these dates. You might also have to go to zksync as well. We can talk about how to do that in a call.

Organize the addresses into 3 categories: $1, $<10, <$100

There are two addresses that we used for grants.

Address 1: https://etherscan.io/address/0x68c5ae32f00c2b884d867f9ea70a4e4b6d04e0f6#tokentxns https://zkscan.io/explorer/accounts/0x68C5ae32f00c2B884d867f9eA70a4E4B6D04E0F6

Address 2: https://etherscan.io/address/0x5A9CE898f0B03c5A3Cd2d0c727efdD0555C86f81#tokentxns https://zkscan.io/explorer/accounts/0x5A9CE898f0B03c5A3Cd2d0c727efdD0555C86f81

Gitcoin Round dates

Round 7: September 14th — September 28th 2020 Round 8: December 2nd — December 17th 2020 Round 9: 3/10/21 - 3/25/21

Liquidity Providers

Take a snapshot of the last 4 months of liquidity for each month for each of our big pairs.

Organize addresses into these categories <$100 LP Stake, <$500 LP Stake, <$1000 LP staked, <$5000 LP Staked

HNY-PRTCLE WXDAI-PRTCLE

Note

You will have to convert the prices to $ for each coin. Feel free to just do it with current prices

chair28980 commented 3 years ago

Hackmd: https://hackmd.io/sqCVYO5bTmKiFjLOnVInhg

chair28980 commented 3 years ago

Remember to nvm use 12.0.0

chair28980 commented 3 years ago
  1. Loop thru the dates, first for ETH, then for all ERC20 tokens
  2. Strip everything other than FROM, AMOUNT, ADDRESS, and ERC20 token Address (or eth)
  3. Loop thru all that, with the coingecko API, put in the token address and add a field for DOLLAR AMOUNT. Use current prices.
  4. Then take those numbers and run through an existing script Victor has.
  5. We will use initiatives to distribute the rewards.
  6. Victor's script takes in a CSV and returns an initiative file
  7. Change Victor's script so it will work with the CSV file produced by CHAIR
  8. This should make it work automatically.

--

  1. Get it working for LP's first
  2. Then Gitcoin
chair28980 commented 3 years ago

For LP's, figure out all the ADDS and REMOVES for the month.

The sum at the end will be the reward numbers.

chair28980 commented 3 years ago

https://github.com/1Hive/uniswap-info/blob/3bd9791c780579701c906f59fae747af95b1915d/src/apollo/queries.js#L769

chair28980 commented 3 years ago

For LPs do WxDai and HNY pairs

chair28980 commented 3 years ago

Gold medal: Accurate numbers for March Else: Get accurate numbers to reward LP's....accurately.

chair28980 commented 3 years ago

Closed in favor of this ticket in SCOREBOARD repo: https://app.zenhub.com/workspaces/shenanigan-605a78c794095d001a527c29/issues/shenanigandapp/scoreboard/24

chair28980 commented 3 years ago
  1. Start with snapshot of Liquidity on March 1st
  2. Find the percent total proportional to each account
  3. Normalize the liquidity to 1 for that day
  4. For each day after, run a for loop, or each hour, add up the burns and mints for that hour, and adjust the scores, then take another snapshot to normalize.
  5. Continue until you reach present day, and normalize the output.
chair28980 commented 3 years ago

If we can get a snapshot for every (arbitrary time), then it eliminates the step of getting the adds and removes.

Then you can just track the snapshot totals and normalize the liquidity numbers.

Idea:

Go to 1hive discord and ask them about taking a daily snapshot and how you might be able to execute this.