feat: add debt (underlying) field to StrategyConfigPayload#461
Open
de-snake wants to merge 1 commit into
Open
Conversation
Adds a required `debt: Address` so each strategy explicitly carries the borrowed underlying (the debt side of a (collateral, debt) pair). `debt` equals `underlying()` of every credit manager listed in `creditManagers`, enabling the static strategies list to be modeled as discrete collateral/debt pairs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Author
|
Companion data PR that populates this field and splits multi-debt collaterals into pairs: Gearbox-protocol/static#307 (draft until this releases). |
de-snake
added a commit
to Gearbox-protocol/static
that referenced
this pull request
Jun 10, 2026
Each entry is now a single (collateral, debt) pair: tokenOutAddress is the collateral, the new `debt` field is the borrowed underlying, and creditManagers lists the CMs servicing that pair. Every `id` encodes the pair as <collateral>-<debt> (e.g. ETH+-WETH, sUSDe-USDC, AUSDCT0-USDC). Collaterals whose credit managers spanned two different debts are split into separate pairs. 17 strategies -> 23 pairs (6 splits). Every debt was verified on-chain via creditManager.underlying(). Requires the `debt` field added in Gearbox-protocol/sdk#461. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
de-snake
added a commit
to Gearbox-protocol/static
that referenced
this pull request
Jun 10, 2026
Each entry is now a single (collateral, debt) pair: tokenOutAddress is the collateral, the new `debt` field is the borrowed underlying, and creditManagers lists the CMs servicing that pair. Collaterals whose credit managers spanned two different debts are split into separate pairs, with the `id` suffixed by the debt symbol (e.g. AUSDCT0-USDC / AUSDCT0-AUSD). 17 strategies -> 23 pairs (6 splits). Every debt was verified on-chain via creditManager.underlying(). Requires the `debt` field added in Gearbox-protocol/sdk#461. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
Adds a
debt: Addressfield toStrategyConfigPayload(src/common-utils/static/strategy.ts).debtis the borrowed underlying — the debt side of a (collateral, debt) pair, wheretokenOutAddressis the collateral. It equalsunderlying()of every credit manager listed increditManagers.Why
Preparation for the agentic approach: the static strategies list is being remodeled so each entry is a single (collateral, debt) pair with the set of credit managers that service it, instead of one collateral umbrella-ing credit managers across multiple debts. Carrying
debtexplicitly lets a strategy be keyed/reasoned about as a discrete pair without resolving it from a credit manager at runtime.idis intentionally kept — this is a non-breaking, additive change.StrategyRecordkeying is unchanged.Companion PR
The static data is reshaped in Gearbox-protocol/static (separate PR) to populate
debtand split collaterals that span two debts into separate pairs. That PR depends on this field landing + a release.🤖 Generated with Claude Code