-
Notifications
You must be signed in to change notification settings - Fork 1
Expose insurance fund claim mechanism #7
Copy link
Copy link
Open
Milestone
Description
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
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
get_insurance_balance()— Query available insurance funds- 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels