├── .gitignore ├── README.md ├── img_1.png ├── results ├── eligible.csv ├── result_2022.txt ├── tier-1.csv └── tier-2.csv └── scripts ├── create_views.sql └── queries.sql /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Shadowy Super Coder 2 | ## Background 3 | A couple of days ago, U.S. Senator Elizabeth Warren expressed that _**"Crypto Puts Financial System in the Hands of 4 | 'Shadowy Super-Coders'"**_. 5 | Check out the full story [here](https://decrypt.co/76997/elizabeth-warren-crypto-big-banks-shadowy-super-coders). 6 | This quickly turned into a trending meme on CT: 7 | 8 | ![img_1.png](img_1.png) 9 | 10 | While crypto skeptics make criticisms, we want to give tributes to all Shadowy Super-Coder out there who contributed to 11 | the blockchain ecosystem! 12 | 13 | 14 | ### Result Summary 15 | This repo contains queries run on [ethereum public dataset on google bigquery](https://bigquery.cloud.google.com/dataset/bigquery-public-data:crypto_ethereum) 16 | which are used for the NFT and perks drop. Here are the rules and result: 17 | 18 | **110,294** Ethereum addresses who: 19 | 1. Deployed at least 1 contract on Ethereum mainnet before _August 1st, 2021_. 20 | 2. Deployed contracts that had at least 2 different non-deployer addresses interacted. 21 | 22 | These addresses are ranked in two tiers: 23 | 1. Tier 1 **7,466 Shadowy Super-Coders**: those that served >=500 unique addresses & contracts had at least 1 transaction in 2021. 24 | 2. Tier 2 **102,828 Shadowy Coders**: those that served less <500 unique addresses or those that served >=500 but have no active transaction since 2021. 25 | 26 | Special shout out to our Super-Coder friend @banteg who helped curate data. 27 | 28 | ### Result Files 29 | As we run the queries on Google big query, we export the results to a public google folder [here](https://drive.google.com/drive/folders/1OobRsPXVO66PlKUE6cxOHpPxesxrYiru?usp=sharing). 30 | You can also find it under this repo, it's under: 31 | ```path 32 | results/eligible.csv 33 | results/tier-1.csv 34 | results/tier-2.csv 35 | ``` 36 | 37 | ### Reproduce The Results 38 | Check below scripts in this repo for details: 39 | ```path 40 | scripts/create_views.sql 41 | scripts/queries.sql 42 | ``` 43 | 44 | -------------------------------------------------------------------------------- /img_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NFTGalaxy/shadowy-super-coder/d4ac0c5f519e59964aa4d1d41d14849f4d4ecd33/img_1.png -------------------------------------------------------------------------------- /results/result_2022.txt: -------------------------------------------------------------------------------- 1 | ssr data 2 | data calculated bofore 2023/1/1(all transactions bofore 2022 are included) 3 | 4 | eligible 5 | https://storage.googleapis.com/vincent-ssr/ssr-2022/eligible-2022 6 | 7 | tier1 8 | https://storage.googleapis.com/vincent-ssr/ssr-2022/eoa-tier1-2022 9 | 10 | tier2 11 | https://storage.googleapis.com/vincent-ssr/ssr-2022/eoa-tier2-2022 12 | -------------------------------------------------------------------------------- /scripts/create_views.sql: -------------------------------------------------------------------------------- 1 | -- create views for: 2 | -- 1. contract deployer 3 | -- 2. contracts txs and callers info 4 | -- 3. aggregations 5 | -------------------------------------------------------------- 6 | -- view 1: 7 | -- shadowy-super-coder.coder_from_traces.eoa-deployer 8 | -- coder STRING 9 | -- contract STRING 10 | 11 | -- Method-1: USING TRACE 12 | SELECT 13 | from_address AS coder, 14 | to_address AS contract 15 | FROM 16 | `bigquery-public-data.crypto_ethereum.traces` 17 | WHERE 18 | -- is contract creation 19 | trace_type = 'create' 20 | -- successful 21 | AND status=1 22 | AND to_address IS NOT NULL 23 | -- snapshot 24 | AND DATE(block_timestamp) < "2021-08-01" 25 | -- deployer is not a contract 26 | AND from_address NOT IN ( 27 | SELECT 28 | address 29 | FROM 30 | `bigquery-public-data.crypto_ethereum.contracts`) 31 | GROUP BY 32 | coder, 33 | contract 34 | 35 | -------------------------------------------------------------- 36 | -- view 2: 37 | -- shadowy-super-coder.coder_from_traces.contract-caller 38 | -- contract STRING 39 | -- caller STRING 40 | -- last_success_tx_ts TIMESTAMP 41 | -- txn INTEGER 42 | -- total_gas_used INTEGER 43 | 44 | -- Method-1: USING TRACE 45 | SELECT 46 | to_address AS contract, 47 | from_address AS caller, 48 | MAX(block_timestamp) AS last_success_tx_ts, 49 | COUNT(1) AS txn, 50 | SUM(gas_used) AS total_gas_used 51 | FROM 52 | `bigquery-public-data.crypto_ethereum.traces` 53 | WHERE 54 | -- NOT contract creation 55 | trace_type != 'create' 56 | -- contract successfully deployed before 2021-08-01 by non-contract deployer 57 | AND to_address IN (SELECT contract FROM `shadowy-super-coder.coder_from_traces.eoa-deployer`) 58 | -- successful 59 | AND status=1 60 | -- snapshot 61 | AND DATE(block_timestamp) < '2021-08-01' 62 | GROUP BY 63 | contract, 64 | caller 65 | 66 | -------------------------------------------------------------- 67 | -- view 3: 68 | -- coder-aggr 69 | -- coder STRING 70 | -- unique_caller INTEGER 71 | -- last_tx_ts TIMESTAMP 72 | 73 | SELECT 74 | coder, 75 | COUNT(DISTINCT caller) AS unique_caller, 76 | MAX(last_success_tx_ts) AS last_tx_ts, 77 | -- COUNT(DISTINCT c.contract) AS unique_contract, 78 | -- SUM(txn) AS total_txn 79 | FROM 80 | `shadowy-super-coder.coder_from_traces.contract-caller` c 81 | JOIN 82 | `shadowy-super-coder.coder_from_traces.eoa-deployer` d 83 | ON 84 | c.contract=d.contract 85 | GROUP BY 86 | coder -------------------------------------------------------------------------------- /scripts/queries.sql: -------------------------------------------------------------------------------- 1 | -- eligible: 2 | SELECT 3 | DISTINCT coder, 4 | unique_caller, 5 | DATE(last_tx_ts) as last_tx_date, 6 | unique_contract, 7 | total_txn 8 | FROM 9 | `shadowy-super-coder.coder_from_tx.coder-aggr` 10 | WHERE 11 | unique_caller>=2 12 | ORDER BY 13 | unique_caller DESC 14 | 15 | 16 | -- tier 1: shadowy super coders 17 | SELECT 18 | DISTINCT coder, 19 | unique_caller, 20 | DATE(last_tx_ts) as last_tx_date, 21 | unique_contract, 22 | total_txn 23 | FROM 24 | `shadowy-super-coder.coder_from_traces.coder-aggr` 25 | WHERE 26 | unique_caller>=500 27 | AND DATE(last_tx_ts)>"2021-1-1" 28 | ORDER BY 29 | unique_caller DESC 30 | 31 | 32 | -- tier 2: shadowy coders 33 | SELECT 34 | DISTINCT coder, 35 | unique_caller, 36 | DATE(last_tx_ts) as last_tx_date, 37 | unique_contract, 38 | total_txn 39 | FROM 40 | `shadowy-super-coder.coder_from_traces.coder-aggr` 41 | WHERE 42 | unique_caller>=2 43 | AND 44 | (unique_caller<500 OR DATE(last_tx_ts)<="2021-1-1") 45 | ORDER BY 46 | unique_caller DESC --------------------------------------------------------------------------------