Scoring Algorithms
CES production function, HHI diversity bonus, MeritRank, participation coefficient, Gini, and Shannon entropy
ƒxyz Network quantifies member contributions using a multi-input scoring system rooted in production economics and network science. The CES production function synthesizes three token-denominated contribution types. MeritRank provides Sybil-tolerant reputation. Network-level inequality is tracked via Gini and Shannon entropy.
Implementation: packages/neo4j-scoring/src/services/contribution-score.ts, packages/neo4j-scoring/src/services/network-metrics.ts
Paper references: D7, G2, A1
CES Production Function
Overview
The Constant Elasticity of Substitution (CES) production function is the mathematical core of contribution scoring. CES captures the economic insight that contributions of different types (capital, labor, knowledge) are imperfect substitutes - doubling Florin tokens cannot fully replace deep knowledge work.
Formula
Score = A * [alpha*F^rho + beta*J^rho + gamma*H^rho]^(1/rho) * (1 + k*(1-HHI))
Where:
F = Florin token holdings (capital/liquidity provision)
J = Joule energy tokens (work energy, task completion)
H = House of Wisdom tokens (knowledge, governance participation)
rho = substitution parameter (rho < 0: complements, rho = 1: perfect substitutes)
A = total factor productivity (network-wide scaling constant)
alpha, beta, gamma = contribution weights (governance-configurable, default 1.0 each)
k = diversity bonus coefficient
HHI = Herfindahl-Hirschman Index (contribution concentration)Substitution Parameter
The parameter rho controls how easily the three contribution types substitute for each other:
| rho value | Regime | Interpretation |
|---|---|---|
| rho → -inf | Leontief | Perfect complements - need all three in fixed ratio |
| rho < 0 | Complements | Balanced contributions rewarded |
| rho = 1 | Linear | Perfect substitutes - token types are interchangeable |
| rho > 0 | Substitutes | Specialization is acceptable |
The platform uses rho = -0.5 (sigma = 0.67, moderate complementarity) to reward members who contribute across all three dimensions, not just one.
Elasticity of Substitution
The elasticity of substitution sigma = 1/(1 - rho) measures how responsive the mix of inputs is to changes in their relative prices. For rho = -0.5: sigma = 0.67 (moderate complementarity).
Weights Configuration
The weights (alpha, beta, gamma) are stored in NetworkConfig governance parameters and can be adjusted by DAO vote. Current defaults are equal weights -- "work trumps money" is enforced by emission design (workers earn all three tokens, investors only get Florin), not by weight multipliers:
// contribution-score.ts SYNTHESIS_WEIGHTS defaults
alpha = 1.0 // Florin capital weight
beta = 1.0 // Joule work weight
gamma = 1.0 // Wisdom knowledge weightImplementation
// calculateSynthesizedScore() in packages/neo4j-scoring/src/services/contribution-score.ts
calculateSynthesizedScore(
florin: number,
joule: number,
wisdom: number,
config: NetworkConfig
): numberStatus: LIVE - CES production function with rho = -0.5, equal weights (1.0/1.0/1.0), and HHI diversity bonus (k = 0.3). Implementation: packages/neo4j-scoring/src/services/contribution-score.ts.
HHI Diversity Bonus
Overview
The Herfindahl-Hirschman Index (HHI) measures concentration of contributions across the three token types. A member who contributes exclusively via Florin capital (no labor or knowledge) receives a lower HHI bonus than a member who contributes across all three dimensions.
Formula
HHI = sum_i (s_i)^2
Where s_i = share of token type i in total contribution
s_F = F / (F + J + H)
s_J = J / (F + J + H)
s_H = H / (F + J + H)
HHI ranges from 1/3 (perfectly diversified) to 1 (fully concentrated)
Diversity bonus = (1 + k * (1 - HHI))
k = bonus coefficient (governance parameter, default 0.3)
HHI = 1/3: bonus = 1 + k*2/3 = 1.20 (20% bonus for perfect diversity)
HHI = 1: bonus = 1 + 0 = 1.0 (no bonus for single-type contributions)The HHI diversity bonus multiplies the CES base score, creating an incentive for multi-token participation without penalizing specialists absolutely.
Implementation
// contribution-score.ts
computeHHI(florin: number, joule: number, wisdom: number): number
applyDiversityBonus(baseScore: number, hhi: number, k: number): numberStatus: LIVE - HHI is computed as part of the contribution scoring pipeline.
MeritRank
Overview
MeritRank (Paper G2) is a Sybil-tolerant reputation system based on personalized PageRank. Unlike global PageRank (which can be gamed by creating clusters of fake accounts), MeritRank is computed from each member's individual perspective - reputation is relative to the evaluating member, not absolute.
Algorithm
MeritRank runs a personalized random walk starting from member i:
MR_i(v) = (1 - d) * e_i(v) + d * sum_u [A_uv * MR_i(u) / k_u]
Where:
d = damping factor (probability of continuing the walk, typically 0.85)
e_i(v) = 1 if v == i (teleport vector personalized to member i), else 0
A_uv = edge weight from u to v (trust/vouch strength)
k_u = out-degree of u (normalizing factor)Sybil Resistance
The key Sybil-resistance property: a cluster of fake accounts controlled by one attacker can only boost each other's scores within the cluster. From any legitimate member's perspective (the teleport vector is centered on them), the fake cluster looks isolated - the walks don't naturally flow into it unless a legitimate member has vouched for it.
This means:
- Creating fake accounts does not boost reputation in the global ranking
- Only legitimate vouches from real members propagate reputation
- The cost of a Sybil attack scales with the number of legitimate vouches required
Interpretation
MeritRank values are not comparable across evaluating members (MR_alice(v) != MR_bob(v) for the same v). They are used for:
- Local trust routing: When member A wants to transact with an unknown member C, they check MR_A(C)
- Shadow ranking: The platform runs MeritRank from a trusted seed set to produce a global ordering for governance weighting
Implementation
// computeMeritRank() in packages/neo4j-scoring/src/services/contribution-score.ts
// Internally calls personalizedPageRank() -- the pure-function implementation
computeMeritRank(
memberId: string,
graph: VouchGraph,
dampingFactor?: number
): Map<string, number>
// personalizedPageRank() in packages/neo4j-scoring/src/services/contribution-score.ts
personalizedPageRank(
nodes: string[],
edges: Map<string, Map<string, number>>,
teleportNode: string,
damping?: number
): Map<string, number>
// GraphQL:
query GetMemberMeritRank($memberId: String!) {
memberMeritRank(memberId: $memberId) {
scores { memberId score }
}
}Status: LIVE (shadow) - MeritRank is computed continuously. Full Sybil-tolerant version runs in shadow mode. Exposed via memberMeritRank GraphQL query but no UI consumer yet.
Participation Coefficient
Overview
The participation coefficient P_i quantifies how evenly a member distributes their connections across different circles. It was introduced by Guimera and Amaral (2005) in the context of modular network analysis.
Formula
P_i = 1 - sum_s [ (k_is / k_i)^2 ]
Where:
k_is = number of connections from member i to circle s
k_i = total connections from member i (sum over all circles)
s = circle (community module)
P_i ranges from 0 to 1:
P_i = 0: all connections are within a single circle (pure specialist)
P_i ≈ 1: connections are distributed perfectly evenly across all circlesInterpretation
| P_i range | Role type | Meaning |
|---|---|---|
| 0.0 - 0.05 | Ultra-peripheral | Connects only within home circle |
| 0.05 - 0.62 | Peripheral | Mostly internal connections |
| 0.62 - 0.80 | Connector | Significant cross-circle links |
| 0.80 - 1.00 | Kinless hub | Spreads connections evenly across all circles |
Members with high P_i are cross-community bridges - they are critical for information flow across the network and resistant to being targeted by community-splitting attacks.
Use Cases
- Governance: High-P_i members are natural cross-circle mediators
- Network health: A drop in average P_i indicates increasing siloing
- Contribution scoring: P_i can serve as a diversity measure alongside HHI
Implementation
// computeParticipation() in packages/neo4j-scoring/src/services/network-metrics.ts
// Pure function: computes P_i from layer degree map
computeParticipation(
layerDegrees: Record<string, number>
): number
// getMemberParticipation() in packages/neo4j-scoring/src/services/network-metrics.ts
// Service method: queries Neo4j and calls computeParticipation()
getMemberParticipation(
memberId: string
): { participationCoefficient: number; connectionsByCircle: Record<string, number> }Status: WIRED - Implemented and exposed via memberParticipation and topParticipants GraphQL queries. Target UIs: Profile page, /graph?mode=advanced node detail, /network leaderboard.
Gini Coefficient
Overview
The Gini coefficient measures inequality in the distribution of contribution scores across all network members. It ranges from 0 (perfect equality - all members have equal scores) to 1 (maximum concentration - one member holds all score).
Formula
G = (2 * sum_i [i * y_i]) / (n * sum_i y_i) - (n + 1) / n
Where:
y_i = score of member i, sorted ascending (y_1 <= y_2 <= ... <= y_n)
n = total number of members
i = rank index (1 to n)This is the discrete Lorenz curve formulation. The Gini is the ratio of the area between the Lorenz curve and the line of equality to the total area under the line of equality.
Implementation
// computeGini() in packages/neo4j-scoring/src/services/network-metrics.ts
computeGini(scores: number[]): number
// Exposed via networkMetrics GraphQL query (LIVE on dashboard)Status: LIVE - Gini is computed and displayed on the dashboard as part of networkMetrics.
Shannon Entropy
Overview
Shannon entropy measures the diversity and unpredictability of score distributions. High entropy indicates a well-distributed, active network with many meaningfully different contribution levels. Low entropy signals concentration or a two-tier system (active vs inactive).
Formula
H = -sum_i [p_i * log2(p_i)]
Where:
p_i = probability of observing score level i
= (count of members at level i) / (total members)
H = 0: all members have identical scores (no diversity)
H = log2(n): maximum entropy, scores are uniformly distributedFor practical use, the score distribution is binned into quantiles before computing entropy.
Implementation
// computeEntropy() in packages/neo4j-scoring/src/services/network-metrics.ts
computeEntropy(scores: number[]): number
// Exposed via networkMetrics GraphQL query (LIVE on dashboard)Status: LIVE - Shannon entropy is computed and displayed on the dashboard.
Boltzmann Temporal Decay
Overview
The applyDecay() function implements exponential (half-life) decay on pending token balances. Approved work never decays; only pending (unapproved) work loses effective value over time. This incentivizes timely approval of contributions and prevents stale pending balances from inflating scores.
Formula
effective_pending = pending * 0.5^(days_elapsed / half_life_days)
effective_balance = approved_portion + effective_pendingThe decay follows a half-life model: after half_life_days, the pending portion retains 50% of its value. After two half-lives, 25%, and so on.
Implementation
// applyDecay() in packages/neo4j-scoring/src/services/contribution-score.ts
applyDecay(
balance: number,
approved: number,
lastEarned: Date | null,
halfLifeDays: number | null
): numberApplied automatically to Joule and HoW balances in the scoring pipeline. Florin (capital) does not decay.
Status: LIVE - Integrated into the contribution scoring pipeline. Applied to Joule and HoW balances before CES computation.
Planned Extensions
ConVo Hybrid Voting (Paper F10)
Convex Voting (ConVo) combines conviction voting (time-weighted stake) with quadratic voting (square-root cost) to achieve both Sybil resistance and preference intensity expression:
Vote power = sqrt(stake * time_held)ConVo prevents plutocratic capture (via the square root) while rewarding long-term commitment (via time weighting). Planned as an extension to the governance scoring system.
Paper References
| Paper | Title | Relevance |
|---|---|---|
| D7 | DeTEcT Contribution Scoring | CES production function, HHI diversity bonus |
| G2 | MeritRank Sybil-Tolerant Scoring | Personalized PageRank reputation |
| A1 | Network Participation | Participation coefficient P_i |
| D1 | Rich-Get-Richer Tracking | Gini-based wealth concentration monitoring |
| F10 | ConVo Hybrid Voting | Conviction + quadratic voting (planned) |