Conversation
Signed-off-by: Tomás Migone <tomas@edgeandnode.com>
Coverage Report for CI Build 35639218640Coverage decreased (-2.1%) to 44.083%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
Signed-off-by: Tomás Migone <tomas@edgeandnode.com>
Signed-off-by: Tomás Migone <tomas@edgeandnode.com>
tmigone
commented
Sep 21, 2026
Signed-off-by: Tomás Migone <tomas@thegraph.foundation>
tmigone
commented
Sep 21, 2026
tmigone
commented
Sep 21, 2026
Signed-off-by: Tomás Migone <tomas@thegraph.foundation>
Signed-off-by: Tomás Migone <tomas@thegraph.foundation>
tmigone
force-pushed
the
tmigone/escrow-withdraw
branch
from
September 21, 2026 18:34
aac87b1 to
71c72d1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
The manager only deposited, so balances were a high-water mark of past debt. It can now reclaim idle escrow to the payer wallet, behind
withdraw_enabled(defaultfalse).One action per receiver per cycle, first match wins:
Approach
adjustThawandcancelThawstay unused. These are new interfaces in the contract but for simplicity thaws only start from zero, so plainthawsuffices.Configuration
withdraw_enabled— new, defaults tofalse. No action needed; settrueto reclaim escrow.withdraw_margin— new, defaults to0.25. No action needed.min_withdraw_grt— new, defaults to500. No action needed.Motivation
#18 measured the escrow at ~2.87M GRT against ~1M GRT of debt and noted the algorithm targets ~1.67x but has no way to withdraw. This closes that gap.
Cross-component
The escrow accounts query now selects
totalAmountThawingandthawEndTimestamp— an upstream dependency on the network subgraph exposing both. The query fails if a deployed version lacks them. Not verified; confirm against the deployed subgraph before merging.Risk assessment
blast_radius: protocol— thaws and withdrawals are on-chain state receivers observe on their own escrow accounts; the default keeps it off until deliberately enabled.reviewer_effort: deep— the decision logic is small and tested, but its correctness rests onPaymentsEscrowsemantics this repo only vendors an ABI for.primary_concern— with no cancel path, a thaw's full amount leaves at maturity, so the compensating deposit must fit the payer allowance and the 10,000 GRTMAX_ADJUSTMENTcap.irreversible— not the merge, which is deposit-only at the defaults, but the enablement: a thaw is a 28-day on-chain commitment that reverting the code does not cancel.