Skip to content

DIPs: Monitor escrow thaw events to protect against payer withdrawalΒ #1170

@MoonBoi9001

Description

@MoonBoi9001

Context

When a payer wants to withdraw funds from escrow, they must first call thaw() which starts a waiting period. After the thawing period ends, they can call withdraw() to retrieve their funds.

If the indexer has outstanding fees to collect from an indexing agreement, and the payer starts thawing, the indexer must collect before the thaw completes or risk losing payment.

Proposed Solution

The indexer agent should monitor Thaw events from the PaymentsEscrow contract. When a thaw is detected for a payer with active agreements:

  1. Calculate outstanding fees owed
  2. Prioritize collection before thawEndTimestamp
  3. Alert if collection fails and thaw is imminent

Event to Monitor

From IPaymentsEscrow.sol:

event Thaw(
    address indexed payer,
    address indexed collector,
    address indexed receiver,
    uint256 tokens,
    uint256 thawEndTimestamp
);

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    πŸ—ƒοΈ Inbox

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions