feat(scenarios): SolFi support - #14
Open
bakasura980 wants to merge 2 commits into
Open
Conversation
Comment on lines
+19
to
+38
| label: SolFi market | ||
| description: Choose one of the two SolFi markets that currently has meaningful swap liquidity. | ||
| options: | ||
| - id: wsol-usdc | ||
| label: WSOL / USDC | ||
| description: The funded SolFi market for wrapped SOL and USDC. | ||
| value: 65ZHSArs5XxPseKQbB1B4r16vDxMWnCxHMzogDAqiDUc | ||
| metadata: | ||
| oracle: 2ny7eGyZCoeEVTkNLf5HcnJFBKkyA4p4gcrtb3b8y8ou | ||
| pair: WSOL/USDC | ||
| - id: usdt-usdc | ||
| label: USDT / USDC | ||
| description: The funded SolFi stablecoin market for USDT and USDC. | ||
| value: FkEB6uvyzuoaGpgs4yRtFtxC4WJxhejNFbUkj5R6wR32 | ||
| metadata: | ||
| oracle: CyCUgmaCYUZxbux3J2svDzxSryVFMtZNPrnMKS41nc4G | ||
| pair: USDT/USDC | ||
|
|
||
| templates: | ||
| - id: solfi-spread |
There was a problem hiding this comment.
Studio cannot select SolFi accounts
When a Studio user chooses a non-default SolFi market or vault, these standalone constants.market catalogs are not rendered because the scenario editor only creates selectors for constant_ref properties and initializes direct-account handling from the fixed template address. This leaves Studio targeting the default WSOL/USDC account, so users cannot author the advertised USDT/USDC or alternate-vault scenarios.
Knowledge Base Used:
Prompt To Fix With AI
This is a comment left during a code review.
Path: crates/core/src/scenarios/protocols/solfi/v2/market-overrides.yaml
Line: 19-38
Comment:
**Studio cannot select SolFi accounts**
When a Studio user chooses a non-default SolFi market or vault, these standalone `constants.market` catalogs are not rendered because the [scenario editor](https://github.com/limechain/surfpool-web-ui/blob/HEAD/apps/studio/src/components/svm/scenario-editor.tsx) only creates selectors for `constant_ref` properties and initializes direct-account handling from the fixed template address. This leaves Studio targeting the default WSOL/USDC account, so users cannot author the advertised USDT/USDC or alternate-vault scenarios.
**Knowledge Base Used:**
- [Scenario execution](https://app.greptile.com/limechain/-/custom-context/knowledge-base/limechain/surfpool/-/docs/scenario-execution.md)
- [MCP server integration](https://app.greptile.com/limechain/-/custom-context/knowledge-base/limechain/surfpool/-/docs/mcp-server.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
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.
Greptile Summary
Adds native SolFi v2 scenario support through raw oracle, market, and vault layouts, along with XOR/strided encodings, protocol guidance, MCP instructions, and deployed-program integration tests.
Confidence Score: 4/5
The PR should not merge until Studio can select the non-default SolFi markets and vaults advertised by the new templates.
The raw encodings and runtime account targeting are well covered, but the standalone market catalogs are invisible to Studio's property-driven selector flow, leaving most newly advertised SolFi targets inaccessible through that supported authoring surface.
Files Needing Attention: crates/core/src/scenarios/protocols/solfi/v2/market-overrides.yaml, crates/core/src/scenarios/protocols/solfi/v2/oracle-overrides.yaml, crates/core/src/scenarios/protocols/solfi/v2/vault-overrides.yaml
Important Files Changed
account.pubkey.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart LR Catalog[SolFi constants.market catalog] --> MCP[MCP account.pubkey selection] MCP --> Runtime[OverrideInstance account resolution] Runtime --> Target[Selected SolFi account] Catalog -. not rendered .-> Studio[Studio scenario editor] Studio --> Default[Fixed default template address]Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "feat(scenarios): add validated SolFi PMM..." | Re-trigger Greptile
Context used (3)