Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

DinFeeRouter: validatorPool/storage/publicGoods shares accrue with no withdrawal path (BL-29)

Aperta
#221 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
solidity

Direzione di ricerca

Start with foundry/src/DinFeeRouter.sol and the BL-29 entry in Developer/BACK_LOG.md; read the bucket accounting and routeFeeDIN/routeFeeETH alongside the operator note in Documentation/public/roles/dinrep.md. The issue says a design decision is needed about who can withdraw each bucket and where validatorPool funds go. Once that is decided, done means the accrued balances have a withdrawal path for the affected buckets.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

Summary

DinFeeRouter.routeFeeETH/routeFeeDIN split every fee into five buckets (validatorPool, treasury, burn, storage, publicGoods), but only the treasury share is ever actually moved out of the contract — paid immediately via a direct transfer/call. The other three buckets are only counted in accruedEth/accruedDin (keyed by bucket-name hash); there is no function anywhere in the contract that reads or spends those balances.

Where

foundry/src/DinFeeRouter.sol (verified against develop @ 740a613):

  • accruedDin/accruedEth mappings, L65-66 — the code itself comments them as "Buckets with no live consumer yet"
  • routeFeeDIN() L172-190, routeFeeETH() L194-211 — only treasuryAmt is ever transferred out
  • Full function list (initialize, addFeeSource, removeFeeSource, setTreasury, setTreasuryBpsCeiling, setDinSplit, setEthSplit, routeFeeDIN, routeFeeETH) — confirmed no withdraw/sweep function exists anywhere in the contract

Impact

With the default split (validatorPool=95%, treasury=5%), 95% of every fee swept through this router is permanently stuck the moment it's routed — not hypothetical, this is the live default on every network including the current devnet. Documentation/public/roles/dinrep.md:259 already warns operators about this ("nothing can withdraw them yet... treat swept non-Treasury ETH as locked"), so the team is aware of the behavior, but there's no dedicated engineering ticket for the fix itself — the only references are the ROADMAP's P3-5.3 row and Developer/BACK_LOG.md's BL-29 entry.

Relationship to #43

#43 ("P3 fees & treasury") is the broad mechanism-design umbrella this falls under, but its scope is MECHANISM_DESIGN-level (fee lines, denomination, burn policy) rather than this specific, already-shipped-in-principle engineering gap — the split itself and its bps values already work; only the withdrawal path for 3 of the 5 buckets is missing. This issue is the concrete, scoped sub-task; #43 should link here rather than absorb it.

Suggested approach

Needs a design decision first (who can pull each bucket, and where the validatorPool share specifically goes — straight to DinValidatorStake reward pools? DinEmission? a claim-pull contract?), per BL-29's own open question in the backlog. Candidate shapes, not prescribing one:

  1. A role-gated withdraw(bytes32 bucket, address to, uint256 amount) per asset type, with the consuming contract(s) added as a known recipient once P3-5.2 (emission/reward pool) ships.
  2. A sweepBucket(bytes32 bucket) that forwards the full accrued balance to a configured per-bucket destination address (mirrors the sweepFeesToRouter pattern already used elsewhere in the codebase).

References

  • Developer/BACK_LOG.md BL-29
  • Documentation/public/roles/dinrep.md:259
  • Developer/ROADMAP.md P3-5.3 row
  • #43 (parent/umbrella)
Lingua principale
Python
Stelle
4
Fork
7
Merge medio
3g 58m
PR unite (30g)
39

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di InfiniteZeroFoundation/DevNet

Tutte le issue di InfiniteZeroFoundation/DevNet

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.