Skip to content

Add Asset Freezing & Compliance Functions to Inheritance Contract #501

@ONEONUORA

Description

@ONEONUORA

Component: Contracts (Inheritance) | Effort: 4-5 days | Priority: HIGH

Current State

No asset freezing mechanism for compliance or legal holds.

Missing Functions

Asset freezing and compliance functions:

  • freeze_plan() - Freeze plan assets (admin/compliance)
  • unfreeze_plan() - Unfreeze plan assets
  • is_plan_frozen() - Check if plan frozen
  • add_legal_hold() - Add legal hold on plan
  • remove_legal_hold() - Remove legal hold
  • get_freeze_reason() - Get reason for freeze
  • freeze_beneficiary() - Freeze specific beneficiary

Why This Matters

  • Compliance: Required for AML/sanctions compliance
  • Legal: Court orders may require asset freezing
  • Security: Freeze suspicious accounts
  • Regulatory: Meet regulatory requirements

Tasks

  • Add FreezeRecord struct (plan_id, frozen_at, reason, frozen_by)
  • Implement freeze_plan() function (admin/compliance only)
  • Add unfreeze_plan() function
  • Implement freeze checks in withdraw/claim functions
  • Add is_plan_frozen() view function
  • Implement legal hold mechanism
  • Add freeze reason storage and retrieval
  • Implement beneficiary-specific freezing
  • Add PlanFrozen, PlanUnfrozen events
  • Add tests for freeze scenarios
  • Document freeze procedures

Acceptance Criteria

  • Plans can be frozen by authorized parties
  • Frozen plans block withdrawals and claims
  • Freeze reasons tracked
  • Legal holds supported
  • Tests cover freeze scenarios
  • Documentation explains freeze process

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions