Skip to content

Add payroll refund authorization boundaries #372

Description

@edehvictor

Summary

Add explicit refund rules for cancelled, expired, disputed, and settled payroll runs so reserved funds can be returned safely without enabling hidden clawbacks.

Why This Matters

Refund logic sits close to employee trust. The contract must distinguish safe treasury release from dangerous post-settlement reversal behavior.

Suggested Files

  • contracts/src/refunds.rs
  • contracts/src/treasury.rs
  • contracts/src/payroll.rs
  • contracts/tests/refund_boundaries.rs

Tasks

  • Define refund eligibility by payroll lifecycle state.
  • Allow refunds only for cancelled or expired unexecuted reservations.
  • Block refunds after settlement finalization.
  • Require dispute resolution before refunding disputed reservations.
  • Add tests for every lifecycle state.

Acceptance Criteria

  • Unexecuted cancelled or expired reservations can be refunded safely.
  • Settled payroll funds cannot be clawed back through refund APIs.
  • Disputed runs require resolution before refund release.
  • Tests cover cancelled, expired, disputed, executing, and settled states.

Coordination

Join the Telegram channel for proper coordination: https://t.me/zkpayroll

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third Campaign

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions