escrow::contribute and milestones::contribute accept new funds after deadline + GRACE_PERIOD, when anyone can already refund or cancel

Aperta
#568 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@urielit1313-creator ci sta già lavorando.

Dal 13/10/2026.

  • #571 di @urielit1313-creator — aperta
  • #635 di @yggdrasilworld — chiusa senza merge
  • #763 di @huangji6693-max — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
rust
Ambito
blockchain

Direzione di ricerca

Read the contribute functions in the escrow and milestones contracts, then locate their existing tests. Check how the deadline and GRACE_PERIOD are represented and how InvalidDeadline is used. Done means both contracts reject contributions at or after the deadline and tests cover that behavior.

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

Descrizione

bug

Problem

Neither contribute checks the deadline. Once now >= deadline + GRACE_PERIOD, escrow's refund and milestones' cancel_milestone_after_deadline are permissionless, yet both contracts still take new contributions. A late sponsor's tokens go into an escrow or milestone that's already in its wind-down window: they can be refunded (or pro-rata redistributed, for milestones) by any third party in the next transaction, and the sponsor pays fees for a contribution that can never fund work.

Suggested fix

Reject contribute with InvalidDeadline (or a new DeadlinePassed) once now >= deadline, and test both contracts.

Related: #49, #56

Lingua principale
Rust
Stelle
1
Fork
102
Merge medio
4h 12m
PR unite (30g)
30

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

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 MergeFi/contracts

Tutte le issue di MergeFi/contracts

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.