Skip to content

feat(scenarios): add support for Kamino programs - #5

Open
bakasura980 wants to merge 4 commits into
developfrom
feat/kamino-protocol-support
Open

feat(scenarios): add support for Kamino programs#5
bakasura980 wants to merge 4 commits into
developfrom
feat/kamino-protocol-support

Conversation

@bakasura980

@bakasura980 bakasura980 commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Greptile Summary

The PR adds native scenario support for six Kamino programs and extends scenario execution with persistent overrides and typed array-element paths.

  • Registers Kamino IDLs and override templates for lending, Scope, farms, swaps, vaults, and liquidity.
  • Adds persistent override scheduling and updates the generated SDK contract.
  • Adds a Kamino liquidation-arbitrage example, documentation, and integration tests.
  • Corrects terminal array-index type resolution so indexed values use the element type during conversion.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
crates/types/src/scenarios.rs Adds persistent override serialization and correctly resolves terminal array paths to their element types.
crates/core/src/surfnet/svm.rs Integrates typed override conversion and persistent scenario execution into account forging and slot processing.
crates/core/src/scenarios/registry.rs Registers the six Kamino program families and tests indexed path resolution and template metadata.
crates/core/src/tests/kamino/mod.rs Adds feature-gated integration coverage against live Kamino account layouts.
crates/sdk-node/surfpool-sdk/kit/generated/OverrideInstance.ts Updates the generated SDK type with the optional persistent-override field.

Reviews (8): Last reviewed commit: "Introduce 'persist' property to the rpc ..." | Re-trigger Greptile

Comment thread crates/types/src/scenarios.rs Outdated
Comment thread crates/types/src/scenarios.rs Outdated
@failfmi failfmi changed the title Feat/kamino protocol support feat(scenarios): add support for Kamino programs Aug 12, 2026
Comment thread crates/types/src/scenarios.rs Outdated
Comment thread crates/types/src/scenarios.rs
Comment thread crates/core/src/surfnet/svm.rs Outdated
@bakasura980
bakasura980 force-pushed the feat/kamino-protocol-support branch from 557102b to 982f031 Compare August 13, 2026 09:32
…y slot

Addresses two review comments.

A persisted override was re-queued with fetch_before_use intact, so every
following slot pulled the whole account from mainnet again: one RPC per slot
per override, and any field the override does not write was reset to mainnet's
value, discarding what local transactions had written to it.

fetch_before_use is now cleared on the re-queue, but only after the write
succeeds, so a failed apply still retries next slot with the fetch. The
re-queue replaces a copy of itself already queued for that slot instead of
bailing out, which keeps one entry per id.

persist also gains the ts-bindings attribute its sibling fetch_before_use
already had, and the regenerated OverrideInstance.ts exposes it - the field
was previously absent from the TS SDK entirely.
@92Infinitus92

Copy link
Copy Markdown
Collaborator

The persisted re-fetch issue is fixed, but two different fetchBeforeUse overrides for the same account in one slot still fetch independently, so I believe the second drops the first change

Comment thread crates/types/src/scenarios.rs
Comment thread crates/core/src/scenarios/protocols/kamino/README.md Outdated
@failfmi

failfmi commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Let's rebase the changes on top of latest develop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants