fix(kamino-lend-plugin): sync to okx v0.1.4 + biz-type/strategy attribution (v0.1.5)#84
Conversation
…bution (v0.1.5)
Brings mig-pre/main from v0.1.3 to v0.1.5 — sync of v0.1.3 → v0.1.4
already on okx/main, plus biz-type/strategy attribution.
== New in v0.1.5 ==
Add `--biz-type dapp --strategy kamino-lend-plugin` to the onchainos
`wallet contract-call --unsigned-tx` invocation in the Solana wrapper
`wallet_contract_call_solana`. Solana plugins use the same
`wallet contract-call` subcommand as EVM, just with `--unsigned-tx`
instead of `--input-data`.
`env!("CARGO_PKG_NAME")` keeps the strategy name in sync with Cargo.toml.
EVM-012 sweep deferred to a follow-up PR.
Version bump: mig-pre v0.1.3 → v0.1.5 (PATCH).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
🔨 Phase 2: Build Verification — ✅ PASSED
Build succeeded. Compiled artifact uploaded as workflow artifact. Source integrity: commit SHA `` is the content fingerprint. |
📋 Phase 3: AI Code Review Report — Score: 88/100
1. Plugin Overview
Summary: A Rust-based plugin for interacting with Kamino Lend, the leading lending protocol on Solana. Supports supply, borrow, repay, withdraw, and position queries via Kamino's REST API, with all transactions signed and broadcast through the onchainos CLI's TEE wallet. Target Users: Solana DeFi users who want to lend, borrow, or manage positions on Kamino through an AI agent interface. 2. Architecture AnalysisComponents: skill (SKILL.md) + binary (Rust, kamino-lend-plugin) Skill Structure: SKILL.md includes pre-flight dependency block (auto-injected), 8 commands (quickstart, reserves, markets, positions, supply, withdraw, borrow, repay), error handling table, routing rules, and security notices. Well-structured with clear command index. Data Flow:
Dependencies: reqwest (rustls-tls), tokio, clap, serde, base64, bs58. External services: api.kamino.finance, yields.llama.fi, api.jup.ag. Requires onchainos CLI on PATH. 3. Auto-Detected Permissionsonchainos Commands Used
All commands verified against the onchainos source code reference. Wallet Operations
External APIs / URLs
Chains Operated OnSolana mainnet (chainIndex 501) only. Overall Permission SummaryThe plugin reads balances, builds Kamino transactions via REST API, and submits them via onchainos TEE wallet on Solana. All write operations use 4. onchainos API ComplianceDoes this plugin use onchainos CLI for all on-chain write operations?Yes — fully compliant. All signing and broadcasting goes through On-Chain Write Operations (MUST use onchainos)
Data Queries (allowed to use external sources)
External APIs / Libraries Detected
Verdict: ✅ Fully Compliant5. Security AssessmentStatic Rule Scan (C01-C09, H01-H09, M01-M08, L01-L02)
No other static rules matched. No curl|sh in plugin code (the curl in SKILL.md pre-flight is auto-injected and excluded per review rules). No hardcoded secrets, no obfuscation, no sensitive path access, no persistence mechanisms. LLM Judge Analysis (L-PINJ, L-MALI, L-MEMA, L-IINJ, L-AEXE, L-FINA, L-FISO)
Toxic Flow Detection (TF001-TF006)No toxic flows detected. TF006 does not trigger because untrusted-data boundary declaration is present in SKILL.md. Prompt Injection ScanNo instruction override, identity manipulation, hidden behavior, or unauthorized operations. No base64 or invisible characters in source. CLI args passed through clap to URL/JSON, no shell interpolation. Result: ✅ Clean Dangerous Operations CheckPlugin involves contract calls (supply/borrow/repay/withdraw). Confirmation handled via Notable: The binary auto-passes Result: Data Exfiltration RiskNo environment variable access, no sensitive path access, no exfiltration to undeclared endpoints. All HTTPS endpoints declared. Result: ✅ No Risk Overall Security Rating: 🟢 Low Risk6. Source Code SecurityLanguage & Build ConfigRust, entry point Dependency Analysis
All dependencies are mainstream, version-pinned. No suspicious or unmaintained crates. Code Safety Audit
The Does SKILL.md accurately describe what the source code does?Yes — SKILL.md commands map 1:1 with binary subcommands. The auto-swap behavior during repay (Jupiter 0.001 SOL fallback) is documented in SKILL.md error handling table. Write-operation gating via Verdict: ✅ Source Safe7. Code ReviewQuality Score: 88/100
Strengths
Issues Found
8. Language Check
9. SUMMARY.md Review
11. Recommendations
12. Reviewer SummaryOne-line verdict: A well-structured Solana DeFi plugin for Kamino Lend with good error classification, proper onchainos integration for all writes, and explicit user-consent gating via Merge recommendation: ✅ Ready to merge Blockers: No blockers found. The minor improvements listed above (documenting the Generated by Claude AI via Anthropic API — review the full report before approving. |
✅ Phase 4: Publish CompletePlugins:
Published by Plugin Store CI |
Brings mig-pre v0.1.3 → v0.1.5. Sync of v0.1.3 → v0.1.4 already on okx/main + biz-type/strategy attribution on Solana wallet_contract_call_solana wrapper. EVM-012 sweep deferred.