DINTaskAuditor.claimReward: per-participant floor-division dust is permanently stranded, every GI, every pool
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- solidity
- Área
- backend-api-design, blockchain
Línea de trabajo
Read foundry/src/DINTaskAuditor.sol, focusing on claimReward() around lines 590–628 and settleRewards() around lines 553–576; compare the three participant-level divisions with the treasury dust handling described for BL-14. Decide whether the intended outcome is to track and recover these remainders or document them as accepted dust. Done means the chosen behavior is covered for client, auditor, and aggregator pools, including multiple participants and rounding remainders.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
settleRewards splits a GI's giRewardPool[gi] into clientPool/auditorPool/aggregatorPool/treasury by bps, with the treasury share absorbing that split's rounding dust (BL-14, resolved). But each of the three role pools is divided again at claim time, once per participant, and that division's rounding dust is never tracked or swept anywhere.
Where
foundry/src/DINTaskAuditor.sol, claimReward() (~lines 590-628), building on settleRewards() (~553-576), verified against develop @ 6e361cb:
amount += (snap.clientPool * sub.finalMedianScore) / totalApproved; // :598
amount += (snap.auditorPool * weight) / totalWeight; // :607
amount += (snap.aggregatorPool * aggWeight) / aggTotalWeight; // :626
Each participant's share is floor-divided independently. sum(shares) <= pool_bucket always holds (no insolvency), but nothing tracks the difference, and there's no counter anywhere recording "distributed so far" vs. the bucket total — so a future fix can't even sweep it without re-deriving the total off-chain from RewardClaimed-style events. DINTaskCoordinator/DINTaskAuditor are both non-upgradeable, so any fix needs a redeploy.
Why this isn't already covered
- BL-14 (resolved) is specifically the top-level 4-way bps split (client/auditor/aggregator/treasury) — its dust goes to treasury, and that fix is correct and unrelated to this.
DINTaskAuditor.md§13 No. 4 ("Unclaimable remainders") documents only the zero-participant edge case for a role (nobody approved, nobody revealed, no aggregator weight) — not the ordinary case where a role has 2+ participants and each one's floor-divided share leaves a few wei behind.- Confirmed via git history this isn't new: diffed against the pre-BL-10-refactor
DINTaskAuditor.sol(the per-participant settlement loops that existed before the claim-pull rework, PR #134) — the same floor-division-with-no-remainder-collection gap existed there too, just inside a loop instead of at claim time. This has survived the original reward-engine design (PR #64), the BL-10 claim-pull refactor (PR #130/#131/#134/#136), and every review round since. - Unlike
DinFeeRouter'saccruedEth/accruedDinbuckets (tracked, even though also currently unswept per #221/BL-29) or the top-leveltreasuryAccrued, this per-bucket leftover isn't accounted for at all — it's not merely un-swept, it's untracked.
Scenario
A GI settles with clientPool = 1000 DIN among 3 approved clients, each scoring 1 (totalApproved = 3). Each client's share: 1000 * 1 / 3 = 333. Three claims later: 999 DIN distributed, 1 DIN-wei permanently stuck in the contract — uncredited to anyone, unswept, no code path to ever recover it. Repeats every GI, across all three pools, scaling with how unevenly scores/weights divide.
Severity
Low in absolute terms (bounded by floor-division error — typically a small fraction of a token per bucket per GI, economically negligible at 18 decimals) but it's a genuine, permanent, previously-unflagged fund-trapping gap with zero recovery path in a non-upgradeable contract.
Possible fixes (for discussion, not prescribing one)
- Track a running "distributed" counter per bucket per GI; once the last expected claimant claims (or after some deadline), sweep the remainder to treasury — mirrors the BL-14 pattern one layer down.
- Accept it as documented, permanent dust and extend
DINTaskAuditor.md§13 No. 4 to cover this case explicitly rather than only the zero-participant edge case, if the per-wei amounts are judged not worth the added complexity of a sweep.
- Lenguaje dominante
- Python
- Estrellas
- 4
- Forks
- 7
- Merge medio
- 3 d 5 h
- PR fusionados (30 d)
- 34
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de InfiniteZeroFoundation/DevNet
-
ROADMAP.md: refresh "What is still open for P3" (several items were fixed in October)Posiblemente ocupada @umermjd11 la tomó hace 4 días. Abiertodocumentation good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
InfiniteZeroFoundation/DevNet#285 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Update the 25 translated organisation READMEs to match the English versionPosiblemente ocupada @mrCabez la tomó hace 1 día. Abiertogood first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
InfiniteZeroFoundation/DevNet#277 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Update the client-service guide to explain training and uploading separatelyPosiblemente ocupada @Santiagocetran la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
InfiniteZeroFoundation/DevNet#266 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Few questions related to GI2 aggregatorPosiblemente ocupada @Abidoyesimze la tomó hace 1 día. Abierto
InfiniteZeroFoundation/DevNet#307 · 1 reacción · 4 asignados ·
Los mantenedores suelen responder en 1 día
-
bug python
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
InfiniteZeroFoundation/DevNet#306 ·
Los mantenedores suelen responder en 1 día
Todos los issues de InfiniteZeroFoundation/DevNet
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Claiming namespace `thejakia1`Abiertonamespace operations
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
EclipseFdn/open-vsx.org#15057 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
FinanceFlash/unvibecode#349 ·
-
Mission statement: why this is free, in the README, Why This Exists and the wiki HomePosiblemente ocupada @ChiefGyk3D la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
ChiefGyk3D/Clouds-Against-Humanity#348 ·
Los mantenedores suelen responder en 1 día
-
[Perf] Default --vllm-watermark 0.05 for rollouts (hybrid models re-preempt under KV pressure)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
vllm-project/vime#508 ·
Los mantenedores suelen responder en 4 días