Skip to content

Late Payment Penalty Fee #523

Description

@Kingsman-99

Description

Contributions received within the grace period but after the nominal deadline should incur an additional penalty fee on top of the standard platform fee. The penalty discourages gaming the grace window as a routine payment extension.

Technical Context

Add late_penalty_bps: u32 to the Invoice struct in types.rs. In contribute inside contracts/split/src/lib.rs, after checking the grace window, compute effective_fee = platform_fee_bps + late_penalty_bps when the contribution is late. Transfer the extra penalty to the treasury address. Emit LatePaymentPenaltyCharged(invoice_id, payer, penalty_amount) from events.rs.

Acceptance Criteria

  • On-time contributions pay only the standard platform fee
  • Grace-window contributions pay platform_fee + late_penalty
  • late_penalty_bps = 0 makes grace-window contributions identical to on-time
  • Penalty amount is transferred to the treasury, not the fee recipients
  • LatePaymentPenaltyCharged event is emitted for every penalised contribution
  • All CI checks (cargo build --target wasm32-unknown-unknown, cargo test, cargo clippy) pass and the branch has no merge conflicts

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave programcomplexity: highComplex feature requiring deep knowledge - 200 ptsperformance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions