Skip to content

Expose insurance fund claim mechanism #7

@0xdevcollins

Description

@0xdevcollins

Problem

The fee-on-top model collects insurance fees on every pledge (default 30% of fee), but there is no function to claim or use insurance funds. The insurance pool becomes dead money.

Current Behavior

  • Pledge fee split: treasury (70%) + insurance (30%)
  • Insurance funds accumulate in CoreEscrow
  • No claim_insurance() or similar function exists
  • If campaigns fail or disputes arise, backers are refunded from the main pool only

Expected Behavior

  1. claim_insurance(campaign_id, claimant, amount, reason) — Admin-only, allows drawing from insurance pool for:
    • Disputed campaigns where backer is owed compensation
    • Partial recovery for failed campaigns
    • Emergency situations
  2. get_insurance_balance() — Query available insurance funds
  3. Insurance usage should be auditable (events emitted)

Acceptance Criteria

  • Admin can claim insurance funds with documented reason
  • Insurance balance queryable
  • Events emitted for all insurance operations
  • Tests cover claim, insufficient balance, and unauthorized access

Priority

Low — Not blocking core flow, but collected funds should be usable.

Labels

crowdfunding, smart-contract, enhancement

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions