Scoring Algorithms
CES production function, HHI diversity bonus, MeritRank, participation coefficient, Gini, and Shannon entropy
Scoring Algorithms
fXYZ Network quantifies member contributions using a multi-dimensional 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/src/services/contribution-score.ts, 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, sum to 1)
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 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 = -1: sigma = 0.5 (low substitutability).
Weights Configuration
The weights (alpha, beta, gamma) are stored in NetworkConfig governance parameters and can be adjusted by DAO vote. Current defaults weight knowledge and work slightly higher than capital:
// contribution-score.ts NetworkConfig defaults
alpha = 0.3 // Florin capital weight
beta = 0.35 // Joule work weight
gamma = 0.35 // Wisdom knowledge weightImplementation
// contribution-score.ts:127
calculateSynthesizedScore(
florin: number,
joule: number,
wisdom: number,
config: NetworkConfig
): numberStatus: LIVE (needs CES upgrade) — Current implementation uses a simplified linear model: F1.0 + J1.5 + H*1.5. The full CES formula is specified in docs/research/math-foundations-scoring.md:8 and is the target for the next contribution-score service upgrade.
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.2)
HHI = 1/3: bonus = 1 + k*2/3 ≈ 1.13 (13% 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-dimensional 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
// contribution-score.ts:682
computeMeritRank(
memberId: string,
graph: VouchGraph,
dampingFactor?: 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
// network-metrics.ts:459
getMemberParticipation(
memberId: string
): { participationCoefficient: number; connectionsByCircle: Record<string, number> }
// network-metrics.ts:519
getTopParticipants(limit: number): ParticipantRanking[]Status: WIRED — Implemented and exposed via memberParticipation and topParticipants GraphQL queries. Target UIs: Profile page, /cartography 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
// network-metrics.ts:123
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
// network-metrics.ts:144
computeEntropy(scores: number[]): number
// Exposed via networkMetrics GraphQL query (LIVE on dashboard)Status: LIVE — Shannon entropy is computed and displayed on the dashboard.
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 |