Summary
buildDepositTx, buildWithdrawTx, and resolvePositions in packages/stellar-sdk-helpers/src/orchestration.ts all accept an _addresses: ProtocolAddresses parameter that is never read. Every call site constructs a ProtocolAddresses object via buildTxAddresses() solely to satisfy this signature.
Motivation
The parameter was used by the old per-protocol routing logic (passing USDC/EURC contract addresses to Blend and DeFindex helpers directly). The coordinator architecture removed that need: the coordinator vault resolves all asset addresses on-chain. The dead parameter now adds noise to every call site in both API layers and implies a contract that no longer exists.
Proposed Solution
- Remove the
_addresses parameter from all three functions in orchestration.ts.
- Remove the corresponding
ProtocolAddresses argument from every call site in api/ and apps/api/.
- Remove the
buildTxAddresses() calls that exist solely to produce the argument.
- If
ProtocolAddresses is no longer referenced anywhere, remove the interface and its export.
Scope
| Field |
Value |
| Area |
SDK, API |
| Protocol affected |
None |
| Network |
N/A |
| Breaking change? |
Yes (public SDK API change) |
Alternatives Considered
Keeping the parameter for forward compatibility in case future protocols need explicit asset addresses: unlikely given the coordinator pattern, and the parameter can be re-added if ever needed.
Acceptance Criteria
Summary
buildDepositTx,buildWithdrawTx, andresolvePositionsinpackages/stellar-sdk-helpers/src/orchestration.tsall accept an_addresses: ProtocolAddressesparameter that is never read. Every call site constructs aProtocolAddressesobject viabuildTxAddresses()solely to satisfy this signature.Motivation
The parameter was used by the old per-protocol routing logic (passing USDC/EURC contract addresses to Blend and DeFindex helpers directly). The coordinator architecture removed that need: the coordinator vault resolves all asset addresses on-chain. The dead parameter now adds noise to every call site in both API layers and implies a contract that no longer exists.
Proposed Solution
_addressesparameter from all three functions inorchestration.ts.ProtocolAddressesargument from every call site inapi/andapps/api/.buildTxAddresses()calls that exist solely to produce the argument.ProtocolAddressesis no longer referenced anywhere, remove the interface and its export.Scope
Alternatives Considered
Keeping the parameter for forward compatibility in case future protocols need explicit asset addresses: unlikely given the coordinator pattern, and the parameter can be re-added if ever needed.
Acceptance Criteria
_addressesparameter removed from all three orchestration functionsapi/andapps/api/updatedbuildTxAddresses()calls removed where they only exist to produce the dead argumentpnpm lint && pnpm typecheck && pnpm testpass with no regressions