Skip to main content

Overview

Freeze is a standalone condition that blocks capture on frozen payments. It manages freeze and unfreeze state with configurable authorization and an optional duration-based auto expiry. Type: Per-deployment via FreezeFactory

Architecture

  • Implements ICondition
  • Freeze/unfreeze authorization via ICondition contracts (passed to constructor)
  • Optionally linked to EscrowPeriod to restrict freezing to during the escrow window

Logic

Deployment

Deploy via FreezeFactory:

Composition Patterns

Use AndCondition to require both escrow period elapsed and not frozen before capture.

Freeze Duration

  • Payment frozen at time T
  • Freeze expires at T + freezeDuration
  • After expiry, payment is automatically unfrozen
  • Can be manually unfrozen earlier by the authorized party
  • Duration of 0 means permanent freeze (until manually unfrozen)
Freeze duration should balance payer protection with receiver UX. Too long and receivers may avoid the platform. Too short and payers can’t adequately investigate.

Use Cases

  • Buyer protection: Payer freezes suspicious payments during escrow
  • Dispute holds: Arbiter freezes payments pending investigation
  • Compliance: Compliance officer freezes flagged transactions

Gas

Cost: ~20k gas per freeze/unfreeze (one SSTORE). The check() call is a view with one SLOAD.

Next Steps

EscrowPeriod

Add time-based capture restrictions.

Factories

Deploy Freeze via FreezeFactory.