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:
- Calculate outstanding fees owed
- Prioritize collection before
thawEndTimestamp
- 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
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 callwithdraw()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
Thawevents from thePaymentsEscrowcontract. When a thaw is detected for a payer with active agreements:thawEndTimestampEvent to Monitor
From
IPaymentsEscrow.sol:Related
packages/horizon/contracts/payments/PaymentsEscrow.sol