{"uid":"cap_JTBf1hjfYXE2Bb1NatxGe","slug":"brainiac-staking-reward-fairness-analyzer-c466eb38","name":"BRAINIAC Staking Reward Fairness Analyzer","description":"Pay-per-call APIs for AI agents: OFAC sanctions screening, compliance checks, token security, and Base chain data via x402. No account. Fixed USDC price. MCP-ready.","url":"https://www.brainiac.software/api/v1/staking-operations/reward-fairness?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"reward":{"type":"integer","maximum":9007199254740991,"exclusiveMinimum":0},"shares":{"type":"array","items":{"type":"object","required":["id","weight","allocated"],"properties":{"id":{"type":"string","maxLength":80,"minLength":1},"weight":{"type":"integer","maximum":9007199254740991,"exclusiveMinimum":0},"allocated":{"type":"integer","maximum":9007199254740991,"minimum":0}},"additionalProperties":false},"maxItems":200,"minItems":1}}},"responseSchema":{"type":"json","example":{"allocation_fairness_score":87,"rounding_error_percentage":13}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.04","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.04/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.04","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.04","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_zfZleQ_K1zEBuLqzhbrc6","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.04","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Analyzes the fairness of a staking reward allocation across multiple participants, returning a fairness score and rounding error percentage.","exampleAgentPrompt":"Check whether this staking reward distribution was fair — total reward is 1000000 units, split across 3 participants: Alice with weight 50 got 500000, Bob with weight 30 got 300000, and Carol with weight 20 got 200000. Give me the fairness score and rounding error.","exampleUseCases":[{"title":"Audit validator reward split","prompt":"We just distributed 5000000 staking rewards across 5 validators — their weights are 100, 200, 150, 250, and 300, and they received 714000, 1428000, 1071000, 1786000, and 1001000 respectively. Can you tell me how fair that distribution was and what the rounding error looks like?"},{"title":"DeFi pool fairness check","prompt":"I need to verify our liquidity pool reward payout was proportional — total reward was 2000000, and 4 LPs with weights 1000, 2000, 3000, and 4000 were allocated 200000, 400000, 600000, and 800000. Run the fairness analysis."},{"title":"Smart contract reward compliance review","prompt":"Before we finalize this staking contract deployment, can you score the fairness of a simulated reward run? Total reward is 750000, with 2 participants: Participant A has weight 3 and was allocated 450000, Participant B has weight 2 and was allocated 300000."}],"resultDescription":"Returns a JSON object with two fields: `allocation_fairness_score` (integer 0–100 indicating how equitably the reward was distributed relative to weights) and `rounding_error_percentage` (integer percentage representing how much of the total reward was lost or misallocated due to integer rounding).","failureModes":["Missing or zero reward amount results in validation error","Shares array with zero or negative weights rejected due to exclusiveMinimum constraint","Sum of allocated amounts exceeding total reward may cause unexpected scoring","More than 200 participants in shares array returns a schema validation error","Non-integer weight or allocated values cause type errors","Empty shares array rejected by minItems:1 constraint"],"whenToPreferThis":"Use this endpoint when you need to programmatically verify that an integer-based staking reward distribution is proportionally fair relative to participant weights — especially when rounding errors in integer arithmetic could cause inequitable allocations. It is well-suited for DeFi protocols, staking contract audits, and compliance checks where on-chain reward fairness must be quantified. Prefer it over manual calculation when participants number in the dozens or when you need a normalized fairness score for reporting.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-13T18:46:51.257Z","isFirstParty":false,"canonicalSlug":"brainiac-staking-reward-fairness-analyzer-c466eb38"}