Coder Social home page Coder Social logo

qc16 / float-whitelist Goto Github PK

View Code? Open in Web Editor NEW

This project forked from floatprotocol/float-whitelist

0.0 0.0 0.0 5.96 MB

Floating, low-volatility currency for web3 ๐Ÿง™โ€โ™‚๏ธ, by a team of anonymous researchers ๐Ÿ‘จโ€๐ŸŽ“

float-whitelist's Introduction

Democratic Launch

Why a Democratic Launch

Whitelist Expansion

As proposed we could expand the whitelist to include the results from Dune Analytics Query #19689 which contains the:

  • delegators on Compound
  • voters on Yearn
  • voters on UMA
  • delegators on YAM
  • voters and escrowers on Curve
  • delegators and voters on Uniswap.

This covers a total of 18,841 addresses; of which 13,477 are unique.

This increases the whitelist size from 51,462 to 64,939 addresses (+26%).

Governance Sources

# Timestamp
timestamp=$(date +%s)
mkdir "$timestamp"

# Snapshot
curl https://hub.snapshot.page/api/voters > "$timestamp/snapshot.json"
cat "$timestamp/snapshot.json" | jq '.[].address' | egrep -o '0x[a-Z0-9]{40}' > "$timestamp/snapshot.txt"

# MakerDAO
curl 'https://api.thegraph.com/subgraphs/name/protofire/makerdao-governance' \
  -H 'authority: api.thegraph.com' \
  -H 'content-type: application/json' \
  -H 'accept: */*' \
  -H 'origin: https://thegraph.com' \
  -H 'referer: https://thegraph.com/' \
  --data-raw '{"query":"{\n  voterRegistries(first: 1000) {\n    coldAddress\n    hotAddress\n  }\n  addressVoters(first: 1000){\n    id\n  }\n}","variables":null}' \
  --compressed > "$timestamp/makerdao.json"

cat "$timestamp/makerdao.json" | jq '.data.addressVoters | .[].id' | egrep -o '0x[a-Z0-9]{40}' > "$timestamp/hot-and-cold-makerdao.txt"
cat "$timestamp/makerdao.json" | jq '.data.voterRegistries | .[].hotAddress' | egrep -o '0x[a-Z0-9]{40}' >> "$timestamp/hot-and-cold-makerdao.txt"
cat "$timestamp/makerdao.json" | jq '.data.voterRegistries | .[].coldAddress' | egrep -o '0x[a-Z0-9]{40}' >> "$timestamp/hot-and-cold-makerdao.txt"
cat "$timestamp/hot-and-cold-makerdao.txt" | sort | uniq | tee "$timestamp/makerdao.txt"

# Compound
curl https://api.compound.finance/api/v2/governance/accounts?page_size=2000&page_number=1&with_history=false&network=mainnet > "$timestamp/compound.json"
cat "$timestamp/compound.json" | jq '.accounts | .[] | select(.votes > "0") | .address' | egrep -o '0x[a-Z0-9]{40}' > "$timestamp/compound.txt"

# Moloch DAOs
cat dao/* >> "$timestamp/daos.txt"

# The Whitelist
cat "$timestamp/snapshot.txt" >> "$timestamp/all.txt"
cat "$timestamp/compound.txt" >> "$timestamp/all.txt"
cat "$timestamp/makerdao.txt" >> "$timestamp/all.txt"
cat "$timestamp/daos.txt" >> "$timestamp/all.txt"
cat "$timestamp/all.txt" | tr '[:upper:]' '[:lower:]' | sort | uniq | tee whitelist.txt | wc -l
# Convert to json
python -c "import json; addresses = [ a.strip() for a in open('whitelist.txt').readlines() ]; print(json.dumps(addresses));" > whitelist.json

Snapshot

curl https://hub.snapshot.page/api/voters > "snapshot.json"
cat "snapshot.json" | jq '.[].address' | egrep -o '0x[a-Z0-9]{40}' > "snapshot.txt"

MakerDAO

https://api.thegraph.com/subgraphs/name/protofire/makerdao-governance

{
  voterRegistries(first: 1000) {
    coldAddress
    hotAddress
  }
  addressVoters(first: 1000){
    id
  }
}
curl 'https://api.thegraph.com/subgraphs/name/protofire/makerdao-governance' \
  -H 'authority: api.thegraph.com' \
  -H 'content-type: application/json' \
  -H 'accept: */*' \
  -H 'origin: https://thegraph.com' \
  -H 'referer: https://thegraph.com/' \
  --data-raw '{"query":"{\n  voterRegistries(first: 1000) {\n    coldAddress\n    hotAddress\n  }\n  addressVoters(first: 1000){\n    id\n  }\n}","variables":null}' \
  --compressed > "makerdao.json"

cat "makerdao.json" | jq '.data.addressVoters | .[].id' | egrep -o '0x[a-Z0-9]{40}' > "all-makerdao.txt"
cat "makerdao.json" | jq '.data.voterRegistries | .[].hotAddress' | egrep -o '0x[a-Z0-9]{40}' >> "all-makerdao.txt"
cat "makerdao.json" | jq '.data.voterRegistries | .[].coldAddress' | egrep -o '0x[a-Z0-9]{40}' >> "all-makerdao.txt"
cat "all-makerdao.txt" | sort | uniq | tee "makerdao.txt"

Compound

# Assumes no. voters < 2000, can easily verify by checking number of addresses < 2000

curl https://api.compound.finance/api/v2/governance/accounts?page_size=2000&page_number=1&with_history=false&network=mainnet > "compound.json"
cat "compound.json" | jq '.accounts | .[] | select(.votes > "0") | .address' | egrep -o '0x[a-Z0-9]{40}' > "compound.txt"

Top 10 DAOs by Bank Value

  1. MetaCartel Ventures
  2. The LAO
  3. Moloch DAO
  4. MetaCartel v2
  5. Raid Guild War Chest
  6. Machi X DAO
  7. TrojanDAO
  8. Rocket Bank LP Dao
  9. yEarn DAO
  10. Meta Gamma Delta (v2)

float-whitelist's People

Contributors

floatcoder avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.