---
id: TASK-145
title: Power Badge in Delegation Manager
status: To Do
assignee: []
created_date: '2026-04-16 18:56'
labels:
  - rnetwork
  - governance
  - power-indices
dependencies:
  - TASK-144
references:
  - modules/rnetwork/components/folk-delegation-manager.ts
  - src/encryptid/power-indices.ts
priority: medium
---

## Description

<!-- SECTION:DESCRIPTION:BEGIN -->
Add Banzhaf power percentage badge to `folk-delegation-manager.ts` inbound delegation section.

## What
Each user's inbound delegation count already shows "3 delegations received". Add a power badge: **"3 delegations → 23% power"** fetched from `/api/power-indices/:did`.

## Primitive
- Fetch user's power index on component load: `GET /rnetwork/api/power-indices/{did}?space={space}`
- Display per-authority: weight% vs Banzhaf% with color coding (green if proportional, red if disproportionate)
- Tooltip: "You hold 10% of delegation weight but 23% of actual voting power because smaller players can't form winning coalitions without you"

## Implementation
- `folk-delegation-manager.ts`: Add `fetchPowerBadge()` in `connectedCallback`, cache result
- New `renderPowerBadge(authority)` method → returns HTML for the badge
- Insert into the inbound delegations header row per authority
- ~40 lines of code, one fetch call, zero new files
<!-- SECTION:DESCRIPTION:END -->

## Acceptance Criteria
<!-- AC:BEGIN -->
- [ ] #1 Banzhaf % shown next to inbound delegation count per authority
- [ ] #2 Color coded: green (proportional ±20%), red (overrepresented), blue (underrepresented)
- [ ] #3 Tooltip explains power vs weight difference
- [ ] #4 Graceful fallback when no power data available
<!-- AC:END -->
