fix(etherfi-plugin): sync to okx v0.2.10 + biz-type/strategy attribution (v0.2.11)#78
Conversation
…ion (v0.2.11)
Brings mig-pre/main from v0.2.9 to v0.2.11 — sync of v0.2.9 → v0.2.10
(already on okx/main) plus biz-type/strategy attribution.
== New in v0.2.11 ==
Add `--biz-type dapp --strategy etherfi-plugin` to every onchainos
`wallet contract-call` invocation. Strategy reads from Cargo.toml via
`env!("CARGO_PKG_NAME")` — no name drift across the 4 metadata files.
Affected wallet_contract_call call sites: 4 (deposit / approve / wrap /
request_withdrawal).
EVM-012 sweep deferred to a follow-up PR; this PR's scope is attribution.
Version bump: mig-pre v0.2.9 → v0.2.11 (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: 90/100
1. Plugin Overview
Summary: A Rust-based plugin enabling liquid restaking on Ethereum via ether.fi. Users can deposit ETH for eETH, wrap to weETH (ERC-4626), unstake via withdrawal queue, and view positions with APY. Uses onchainos CLI for TEE-signed transactions. Target Users: Ethereum users wanting liquid restaking exposure (staking + EigenLayer rewards) through an AI agent interface. 2. Architecture AnalysisComponents: skill (SKILL.md) + Rust binary Skill Structure: Well-structured SKILL.md with clear sections — pre-flight dependencies, command index (positions, stake, wrap, unwrap, unstake, quickstart), confirm-gate write operations, contract addresses, ABI selectors, error handling tables, M07/M08 security notices, changelog. ~6 commands documented. Data Flow:
Dependencies: clap, tokio, reqwest, serde, serde_json, anyhow, hex — all mainstream, well-maintained. 3. Auto-Detected Permissionsonchainos Commands Used
Wallet Operations
External APIs / URLs
Chains Operated OnEthereum mainnet only (chain_id=1). Overall Permission SummaryThe plugin reads Ethereum on-chain state (balances, allowances, weETH rate), fetches APY/TVL/price data from public APIs, and performs ETH staking-related write operations through onchainos's TEE-signed wallet. Write operations are gated by an explicit 4. onchainos API ComplianceDoes this plugin use onchainos CLI for all on-chain write operations?Yes — fully compliant. 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
LLM Judge Analysis
Toxic Flow DetectionNo toxic flows detected. Prompt Injection ScanNo instruction overrides, no hidden content, no base64 payloads, no invisible chars in developer code/SKILL.md. Result: ✅ Clean Dangerous Operations CheckStake/wrap/unwrap/unstake all require explicit Result: ✅ Safe Data Exfiltration RiskOutbound HTTP only to declared APIs (publicnode RPC, DeFiLlama). No environment variables read for sensitive paths. No SSH/AWS credential access. Result: ✅ No Risk Overall Security Rating: 🟢 Low Risk6. Source Code SecurityLanguage & Build ConfigRust, edition 2021, binary Dependency AnalysisAll standard, well-maintained: clap 4, tokio 1, reqwest 0.12, serde 1, serde_json 1, anyhow 1, hex 0.4. No suspicious or unmaintained crates. Code Safety Audit
Does SKILL.md accurately describe what the source code does?Yes — selectors, contract addresses, flow descriptions, and confirm-gate behavior all match the source code. Verdict: ✅ Source Safe7. Code ReviewQuality Score: 90/100
Strengths
Issues Found
8. Language Check
9. SUMMARY.md Review
11. Recommendations
12. Reviewer SummaryOne-line verdict: Well-engineered ether.fi liquid restaking plugin with proper confirm-gate, clear data trust boundaries, and full onchainos compliance for write operations. Merge recommendation: ✅ Ready to merge Blockers (if any — list every issue that MUST be fixed before merge, each prefixed with ❌): No blockers found. Non-blocking improvements:
Generated by Claude AI via Anthropic API — review the full report before approving. |
🔨 Phase 2: Build Verification — ✅ PASSED
Build succeeded. Compiled artifact uploaded as workflow artifact. Source integrity: commit SHA `` is the content fingerprint. |
…Start' mig-pre CI Phase 1 [E151] enforces '## Quick Start' as a required section. okx/main has been renaming this section to '## How it Works' in newer plugins, but mig-pre's lint hasn't been updated to accept that. Until the lint diverges or okx reverts, keep mig-pre's standard. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
✅ Phase 4: Publish CompletePlugins:
Published by Plugin Store CI |
Brings mig-pre v0.2.9 → v0.2.11. Sync portion: v0.2.9 → v0.2.10 already on okx/main. New: biz-type/strategy attribution (4 wallet_contract_call sites). EVM-012 sweep deferred.