Skip to content

Commit

Permalink
feat(api): updated scorer weights (#312)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucianHymer authored Jul 12, 2023
1 parent ada43cb commit 6ee7457
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 77 deletions.
152 changes: 77 additions & 75 deletions api/scorer/settings/gitcoin_passport_weights.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,82 +2,84 @@

# Weight values for each stamp based on its perceived significance in assessing the unique humanity of the Passport holder
GITCOIN_PASSPORT_WEIGHTS = {
"Brightid": "0",
"CommunityStakingBronze": "2.29",
"CommunityStakingGold": "0.83",
"CommunityStakingSilver": "0.83",
"Coinbase": "1.67",
"Discord": "1.67",
"Ens": "2.4",
"EthGTEOneTxnProvider": "1.56",
"EthGasProvider": "1.56",
"ethPossessionsGte#1": "1.77",
"ethPossessionsGte#10": "2.81",
"ethPossessionsGte#32": "1.04",
"Facebook": "0.52",
"FacebookFriends": "0.83",
"FacebookProfilePicture": "0.83",
"FiftyOrMoreGithubFollowers": "3.12",
"FirstEthTxnProvider": "1.67",
"FiveOrMoreGithubRepos": "1.77",
"ForkedGithubRepoProvider": "1.77",
"GitcoinContributorStatistics#numGr14ContributionsGte#1": "1.77",
"GitcoinContributorStatistics#numGrantsContributeToGte#1": "1.67",
"GitcoinContributorStatistics#numGrantsContributeToGte#10": "1.67",
"GitcoinContributorStatistics#numGrantsContributeToGte#100": "0",
"GitcoinContributorStatistics#numGrantsContributeToGte#25": "1.56",
"GitcoinContributorStatistics#numRoundsContributedToGte#1": "1.67",
"GitcoinContributorStatistics#totalContributionAmountGte#10": "1.77",
"GitcoinContributorStatistics#totalContributionAmountGte#100": "1.67",
"GitcoinContributorStatistics#totalContributionAmountGte#1000": "1.98",
"GitcoinGranteeStatistics#numGrantContributors#10": "1.98",
"GitcoinGranteeStatistics#numGrantContributors#100": "2.4",
"GitcoinGranteeStatistics#numGrantContributors#25": "2.29",
"GitcoinGranteeStatistics#numGrantsInEcoAndCauseRound#1": "3.44",
"GitcoinGranteeStatistics#numOwnedGrants#1": "2.81",
"GitcoinGranteeStatistics#totalContributionAmount#100": "2.6",
"GitcoinGranteeStatistics#totalContributionAmount#1000": "1.04",
"GitcoinGranteeStatistics#totalContributionAmount#10000": "0.52",
"Github": "0.52",
"githubContributionActivityGte#30": "1.875",
"githubContributionActivityGte#60": "1.875",
"githubContributionActivityGte#120": "1.875",
"githubAccountCreationGte#90": "1.875",
"githubAccountCreationGte#180": "1.875",
"githubAccountCreationGte#365": "1.875",
"GitPOAP": "2.92",
"GnosisSafe": "1.67",
"Google": "1.67",
"gtcPossessionsGte#10": "1.67",
"gtcPossessionsGte#100": "1.77",
"Lens": "1.77",
"Linkedin": "1.77",
"NFT": "1.67",
"POAP": "1.67",
"Poh": "1.77",
"SelfStakingBronze": "2.78",
"SelfStakingGold": "1.56",
"SelfStakingSilver": "0.58",
"SnapshotProposalsProvider": "1.67",
"SnapshotVotesProvider": "1.77",
"StarredGithubRepoProvider": "1.67",
"TenOrMoreGithubFollowers": "2.4",
"twitterAccountAgeGte#180": "1.21",
"twitterAccountAgeGte#365": "1.21",
"twitterAccountAgeGte#730": "1.23",
"twitterTweetDaysGte#30": "1.21",
"twitterTweetDaysGte#60": "1.21",
"twitterTweetDaysGte#120": "1.23",
"Twitter": "0.52",
"TwitterFollowerGT100": "1.67",
"TwitterFollowerGT500": "1.67",
"TwitterFollowerGT5000": "0",
"TwitterFollowerGTE1000": "1.77",
"TwitterTweetGT10": "1.67",
"ZkSyncLite": "0.835",
"ZkSyncEra": "0.835",
"Brightid": "0.689",
"CivicCaptchaPass": "1",
"CivicLivenessPass": "2.25",
"CivicUniquenessPass": "2.25",
"Coinbase": "1.35",
"CommunityStakingBronze": "1.27",
"CommunityStakingGold": "1.27",
"CommunityStakingSilver": "1.27",
"Discord": "0.689",
"Ens": "2.2",
"EthGasProvider": "2.4",
"EthGTEOneTxnProvider": "1.27",
"ethPossessionsGte#1": "1.79",
"ethPossessionsGte#10": "1.27",
"ethPossessionsGte#32": "1.27",
"Facebook": "0.689",
"FacebookProfilePicture": "0.689",
"FirstEthTxnProvider": "1.16",
"GitcoinContributorStatistics#numGr14ContributionsGte#1": "1.41",
"GitcoinContributorStatistics#numGrantsContributeToGte#1": "1.57",
"GitcoinContributorStatistics#numGrantsContributeToGte#10": "2.30",
"GitcoinContributorStatistics#numGrantsContributeToGte#100": "0.52",
"GitcoinContributorStatistics#numGrantsContributeToGte#25": "1.48",
"GitcoinContributorStatistics#numRoundsContributedToGte#1": "1.57",
"GitcoinContributorStatistics#totalContributionAmountGte#10": "1.53",
"GitcoinContributorStatistics#totalContributionAmountGte#100": "1.37",
"GitcoinContributorStatistics#totalContributionAmountGte#1000": "1.18",
"GitcoinGranteeStatistics#numGrantContributors#10": "0.71",
"GitcoinGranteeStatistics#numGrantContributors#100": "0.73",
"GitcoinGranteeStatistics#numGrantContributors#25": "0.61",
"GitcoinGranteeStatistics#numGrantsInEcoAndCauseRound#1": "1.18",
"GitcoinGranteeStatistics#numOwnedGrants#1": "1.10",
"GitcoinGranteeStatistics#totalContributionAmount#100": "0.689",
"GitcoinGranteeStatistics#totalContributionAmount#1000": "0.689",
"GitcoinGranteeStatistics#totalContributionAmount#10000": "0.689",
"githubAccountCreationGte#180": "1.21",
"githubAccountCreationGte#365": "1.21",
"githubAccountCreationGte#90": "1.21",
"githubContributionActivityGte#120": "1.21",
"githubContributionActivityGte#30": "1.21",
"githubContributionActivityGte#60": "1.21",
"GitPOAP": "1.54",
"GnosisSafe": "2.65",
"Google": "2.25",
"GuildAdmin": "0.689",
"GuildMember": "0.689",
"GuildPassportMember": "0.689",
"HolonymGovIdProvider": "4",
"Hypercerts": "0.689",
"IdenaAge#10": "1.48",
"IdenaAge#5": "1.48",
"IdenaStake#100k": "1.41",
"IdenaStake#10k": "1.16",
"IdenaStake#1k": "0.9",
"IdenaState#Human": "1.61",
"IdenaState#Newbie": "0.51",
"IdenaState#Verified": "1.35",
"Lens": "2.45",
"Linkedin": "2.45",
"NFT": "0.69",
"PHIActivityGold": "1.16",
"PHIActivitySilver": "1.67",
"Poh": "1.21",
"SelfStakingBronze": "1.21",
"SelfStakingGold": "1.21",
"SelfStakingSilver": "1.21",
"SnapshotProposalsProvider": "2.82",
"SnapshotVotesProvider": "1.41",
"Twitter": "1.21",
"TwitterFollowerGT100": "1.21",
"TwitterFollowerGT500": "1.21",
"TwitterFollowerGT5000": "1.21",
"TwitterFollowerGTE1000": "1.21",
"TwitterTweetGT10": "1.21",
"ZkSync": "0.400",
"ZkSyncEra": "0.400",
}


# The Boolean scorer deems Passport holders unique humans if they meet or exceed the below thresholdold
GITCOIN_PASSPORT_THRESHOLD = "15"
GITCOIN_PASSPORT_THRESHOLD = "20"
4 changes: 2 additions & 2 deletions api/scorer/test/test_create_community_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,5 @@ def _():
"""that Community uses the latest weights and threshold."""
community = Community.objects.all()[0]
scorer = community.scorer.binaryweightedscorer
assert scorer.threshold == Decimal("15.00")
assert scorer.weights["Discord"] == "1.67"
assert scorer.threshold == Decimal("20.00")
assert scorer.weights["Discord"] == "0.689"

0 comments on commit 6ee7457

Please sign in to comment.