graphprotocol / graphprotocol/indexer
DIPs: Monitor escrow thaw events to protect against payer withdrawal
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 262
- Forks
- 148
- PR merge metrics
- No merged PRs in 30d
Description
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
- Escrow contract:
packages/horizon/contracts/payments/PaymentsEscrow.sol - DIPS indexer-rs validation: graphprotocol/indexer-rs#942
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read packages/horizon/contracts/payments/PaymentsEscrow.sol and the related DIPS indexer-rs validation issue (#942) first. Find the indexer agent entry point for PaymentsEscrow Thaw events, then verify it calculates outstanding fees, prioritizes collection before thawEndTimestamp, and alerts when collection fails.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- solidity, typescript
- Domain
- backend, blockchain
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100