Skip to content

feat(compound-v3-plugin): add quickstart command + H2 SUMMARY titles (v0.2.7)#299

Merged
Noah3595 merged 1 commit intookx:mainfrom
GeoGu360:debug/compound-v3-plugin
Apr 21, 2026
Merged

feat(compound-v3-plugin): add quickstart command + H2 SUMMARY titles (v0.2.7)#299
Noah3595 merged 1 commit intookx:mainfrom
GeoGu360:debug/compound-v3-plugin

Conversation

@GeoGu360
Copy link
Copy Markdown

Summary

Two small changes, bundled:

  1. Add quickstart command (new file src/commands/quickstart.rs)

    • Minimal: reuses existing rpc::get_balance_of and rpc::get_borrow_balance_of — no new RPC helpers, no new external domains, no changes to any existing command
    • 3-state machine per (chain, market) pair, emits a single JSON with ready-to-run next_command
  2. SUMMARY.md — bold section titles → H2 for proper webview rendering; Quick Start rewritten to lead with quickstart

State machine

status Condition next_command
borrowed borrow_balance > 0 get-position --collateral-asset <X>repay
earning supply_balance > 0 && borrow = 0 get-position
new_user both zero get-markets

Explicitly not included in this first pass (to keep scope small):

  • No native-gas balance check
  • No wallet base-asset balance check
  • No is_borrow_collateralized / liquidation-risk check
  • No rewards-claimable check

Scope

  • New file: src/commands/quickstart.rs (~110 lines)
  • src/commands/mod.rs: +1
  • src/main.rs: +10 (new variant + dispatch)
  • SUMMARY.md: ** → ## × 3, rewrite Quick Start
  • SKILL.md: new ### quickstart section; bump 5 inline 0.2.6 → 0.2.7 refs
  • Version bump: 0.2.6 → 0.2.7 (PATCH) across plugin.yaml, Cargo.toml, .claude-plugin/plugin.json, SKILL.md frontmatter

Zero changes to any existing command's code.

Test plan

  • cargo build passes with 0 new warnings (3 pre-existing dead-code warnings unchanged)
  • compound-v3-plugin --version reports compound-v3 0.2.7
  • compound-v3-plugin quickstart --help shows --wallet plus the global --chain / --market flags
  • quickstart appears first in compound-v3-plugin --help output
  • 4-file version consistency verified; no 0.2.6 refs remain
  • common-bugs-KB scan: no new domains (api_calls unchanged), no unwrap_or(0) EVM-012 violations (both unwrap_or(0) in quickstart.rs are intentional RPC-tolerance per hyperliquid/polymarket quickstart pattern)
  • Live run of each status branch (reviewer: pls verify against a test wallet if convenient)

🤖 Generated with Claude Code

…(v0.2.7)

Minimal quickstart that reuses existing `rpc::get_balance_of` and
`rpc::get_borrow_balance_of` (no new RPC helpers, no new external
domains). Emits a single JSON with `status`, `suggestion`, and a
ready-to-run `next_command`.

Three-state machine (per (chain, market) pair):
- borrowed — borrow_balance > 0  → get-position then repay
- earning  — supply_balance > 0, borrow = 0  → get-position
- new_user — neither  → get-markets

No native-gas / base-asset-wallet-balance checks in this first pass to
keep scope small; users still get clear guidance based on their on-chain
Comet position.

Also:
- SUMMARY.md: convert `**X**` bold section titles to `## X` H2 for
  proper webview rendering; rewrite Quick Start to lead with
  `compound-v3-plugin quickstart` and branch by status.
- SKILL.md: add `### quickstart` command section (params / output /
  status table / agent flow); bump 5 inline 0.2.6 references.
- Version bump: 0.2.6 -> 0.2.7 (PATCH, new command).

No changes to existing commands' logic.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 21, 2026

🔨 Phase 2: Build Verification — ✅ PASSED

Plugin: compound-v3-plugin | Language: rust
Source: @

Compiled from developer source code by our CI. Users install our build artifacts.

Build succeeded. Compiled artifact uploaded as workflow artifact.


Source integrity: commit SHA `` is the content fingerprint.

@github-actions
Copy link
Copy Markdown
Contributor

Phase 4: Summary + Pre-flight for compound-v3-plugin

Review below. AI Code Review is in a separate check.


SUMMARY.md

compound-v3-plugin

A DeFi lending plugin for Compound V3 (Comet) that enables supplying collateral, borrowing/repaying base assets, and claiming COMP rewards across multiple chains.

Highlights

  • Multi-chain support (Ethereum, Base, Arbitrum, Polygon) with automatic market discovery
  • Safe preview-first workflow - see exact transactions before execution
  • Integrated wallet management via onchainos CLI - no private key handling required
  • Real-time market data including supply/borrow APRs and utilization rates
  • Automated collateralization checks to prevent failed transactions
  • COMP rewards claiming with zero-balance detection
  • Proactive user onboarding with guided quickstart flow
  • Comprehensive position monitoring and health tracking
SKILL_SUMMARY.md

compound-v3-plugin -- Skill Summary

Overview

This plugin provides complete access to Compound V3 (Comet) lending markets across Ethereum, Base, Arbitrum, and Polygon. Users can supply assets to earn yield, borrow against collateral, repay debt, withdraw funds, and claim COMP token rewards. The plugin emphasizes safety with preview-first execution and automatic collateralization validation before submitting transactions.

Usage

Install via the OKX plugin store, connect your wallet with onchainos wallet login, then run compound-v3 quickstart for guided onboarding. All write operations use a preview-then-confirm workflow for safety.

Commands

Command Purpose
compound-v3 quickstart Check account status and get personalized next steps
compound-v3 get-markets View current market rates and statistics
compound-v3 get-position Check supply/borrow balances and collateral health
compound-v3 supply --asset ADDRESS --amount X Supply collateral or base asset to earn yield
compound-v3 borrow --amount X Borrow base asset against supplied collateral
compound-v3 repay [--amount X] Repay borrowed funds (defaults to full repayment)
compound-v3 withdraw --asset ADDRESS --amount X Withdraw supplied collateral (requires zero debt)
compound-v3 claim-rewards Claim accrued COMP token rewards

Triggers

Activate when users mention Compound lending activities, DeFi yield farming, borrowing against crypto collateral, or need to check lending positions. Also trigger for phrases like "compound supply", "compound borrow", "compound rewards", or "lending rates".

Auto-injected Pre-flight
## Pre-flight Dependencies (auto-injected by Plugin Store CI)

> Run once per session before first use. These checks ensure required tools are installed.

### Version check (auto-injected)

> **AI Agent Instruction**: Run this version check before executing any commands from this skill. If an update is applied, re-read this SKILL.md before proceeding — the instructions may have changed.

```bash
# Check for skill updates (1-hour cache)
UPDATE_CACHE="$HOME/.plugin-store/update-cache/compound-v3-plugin"
CACHE_MAX=3600
LOCAL_VER="0.2.7"
DO_CHECK=true

if [ -f "$UPDATE_CACHE" ]; then
  CACHE_MOD=$(stat -f %m "$UPDATE_CACHE" 2>/dev/null || stat -c %Y "$UPDATE_CACHE" 2>/dev/null || echo 0)
  NOW=$(date +%s)
  AGE=$(( NOW - CACHE_MOD ))
  [ "$AGE" -lt "$CACHE_MAX" ] && DO_CHECK=false
fi

if [ "$DO_CHECK" = true ]; then
  REMOTE_VER=$(curl -sf --max-time 3 "https://raw.githubusercontent.com/okx/plugin-store/main/skills/compound-v3-plugin/plugin.yaml" | grep '^version' | head -1 | tr -d '"' | awk '{print $2}')
  if [ -n "$REMOTE_VER" ]; then
    mkdir -p "$HOME/.plugin-store/update-cache"
    echo "$REMOTE_VER" > "$UPDATE_CACHE"
  fi
fi

REMOTE_VER=$(cat "$UPDATE_CACHE" 2>/dev/null || echo "$LOCAL_VER")
if [ "$REMOTE_VER" != "$LOCAL_VER" ]; then
  echo "Update available: compound-v3-plugin v$LOCAL_VER -> v$REMOTE_VER. Updating..."
  npx skills add okx/plugin-store --skill compound-v3-plugin --yes --global 2>/dev/null || true
  echo "Updated compound-v3-plugin to v$REMOTE_VER. Please re-read this SKILL.md."
fi

Install onchainos CLI + Skills (auto-injected)

# 1. Install onchainos CLI
onchainos --version 2>/dev/null || curl -fsSL https://raw.githubusercontent.com/okx/onchainos-skills/main/install.sh | sh

# 2. Install onchainos skills (enables AI agent to use onchainos commands)
npx skills add okx/onchainos-skills --yes --global

# 3. Install plugin-store skills (enables plugin discovery and management)
npx skills add okx/plugin-store --skill plugin-store --yes --global

Install compound-v3-plugin binary + launcher (auto-injected)

# Install shared infrastructure (launcher + update checker, only once)
LAUNCHER="$HOME/.plugin-store/launcher.sh"
CHECKER="$HOME/.plugin-store/update-checker.py"
if [ ! -f "$LAUNCHER" ]; then
  mkdir -p "$HOME/.plugin-store"
  curl -fsSL "https://raw.githubusercontent.com/okx/plugin-store/main/scripts/launcher.sh" -o "$LAUNCHER" 2>/dev/null || true
  chmod +x "$LAUNCHER"
fi
if [ ! -f "$CHECKER" ]; then
  curl -fsSL "https://raw.githubusercontent.com/okx/plugin-store/main/scripts/update-checker.py" -o "$CHECKER" 2>/dev/null || true
fi

# Clean up old installation
rm -f "$HOME/.local/bin/compound-v3-plugin" "$HOME/.local/bin/.compound-v3-plugin-core" 2>/dev/null

# Download binary
OS=$(uname -s | tr A-Z a-z)
ARCH=$(uname -m)
EXT=""
case "${OS}_${ARCH}" in
  darwin_arm64)  TARGET="aarch64-apple-darwin" ;;
  darwin_x86_64) TARGET="x86_64-apple-darwin" ;;
  linux_x86_64)  TARGET="x86_64-unknown-linux-musl" ;;
  linux_i686)    TARGET="i686-unknown-linux-musl" ;;
  linux_aarch64) TARGET="aarch64-unknown-linux-musl" ;;
  linux_armv7l)  TARGET="armv7-unknown-linux-musleabihf" ;;
  mingw*_x86_64|msys*_x86_64|cygwin*_x86_64)   TARGET="x86_64-pc-windows-msvc"; EXT=".exe" ;;
  mingw*_i686|msys*_i686|cygwin*_i686)           TARGET="i686-pc-windows-msvc"; EXT=".exe" ;;
  mingw*_aarch64|msys*_aarch64|cygwin*_aarch64)  TARGET="aarch64-pc-windows-msvc"; EXT=".exe" ;;
esac
mkdir -p ~/.local/bin
curl -fsSL "https://github.com/okx/plugin-store/releases/download/plugins/compound-v3-plugin@0.2.7/compound-v3-plugin-${TARGET}${EXT}" -o ~/.local/bin/.compound-v3-plugin-core${EXT}
chmod +x ~/.local/bin/.compound-v3-plugin-core${EXT}

# Symlink CLI name to universal launcher
ln -sf "$LAUNCHER" ~/.local/bin/compound-v3-plugin

# Register version
mkdir -p "$HOME/.plugin-store/managed"
echo "0.2.7" > "$HOME/.plugin-store/managed/compound-v3-plugin"

Report install (auto-injected, runs once)

REPORT_FLAG="$HOME/.plugin-store/reported/compound-v3-plugin"
if [ ! -f "$REPORT_FLAG" ]; then
  mkdir -p "$HOME/.plugin-store/reported"
  # Device fingerprint → SHA256 → 32-char device ID
  DEV_RAW="$(hostname):$(uname -s):$(uname -m):$HOME"
  DEV_ID=$(echo -n "$DEV_RAW" | shasum -a 256 | head -c 32)
  # HMAC signature (obfuscated key, same as CLI binary)
  _K=$(echo 'OE9nNWFRUFdfSVJkektrMExOV2RNeTIzV2JibXo3ZWNTbExJUDFIWnVoZw==' | base64 -d 2>/dev/null || echo 'OE9nNWFRUFdfSVJkektrMExOV2RNeTIzV2JibXo3ZWNTbExJUDFIWnVoZw==' | openssl base64 -d)
  HMAC_SIG=$(echo -n "${_K}${DEV_ID}" | shasum -a 256 | head -c 8)
  DIV_ID="${DEV_ID}${HMAC_SIG}"
  unset _K
  # Report to Vercel stats
  curl -s -X POST "https://plugin-store-dun.vercel.app/install" \
    -H "Content-Type: application/json" \
    -d '{"name":"compound-v3-plugin","version":"0.2.7"}' >/dev/null 2>&1 || true
  # Report to OKX API (with HMAC-signed device token)
  curl -s -X POST "https://www.okx.com/priapi/v1/wallet/plugins/download/report" \
    -H "Content-Type: application/json" \
    -d '{"pluginName":"compound-v3-plugin","divId":"'"$DIV_ID"'"}' >/dev/null 2>&1 || true
  touch "$REPORT_FLAG"
fi


</details>

---
*Generated by Plugin Store CI after maintainer approval.*

@github-actions
Copy link
Copy Markdown
Contributor

📋 Phase 3: AI Code Review Report — Score: 88/100

Plugin: compound-v3-plugin | Recommendation: ✅ Ready to merge

🔗 Reviewed against latest onchainos source code (live from main branch) | Model: claude-opus-4-7 via Anthropic API | Cost: ~373819+5449 tokens

This is an advisory report. It does NOT block merging. Final decision is made by human reviewers.


1. Plugin Overview
Field Value
Name compound-v3-plugin
Version 0.2.7
Category defi-protocol
Author skylavis-sky (skylavis-sky)
License MIT
Has Binary Yes (with build config)
Risk Level Medium (handles DeFi write operations: supply/borrow/repay/withdraw/claim)

Summary: A Rust-based plugin for interacting with Compound V3 (Comet) lending protocol across Ethereum, Base, Arbitrum, and Polygon. It supports supplying collateral, borrowing/repaying the base asset, withdrawing collateral, and claiming COMP rewards. Signing/broadcasting is delegated to onchainos wallet contract-call; reads use direct public RPC calls.

Target Users: DeFi users who want to manage Compound V3 positions through an AI agent, with preview-first (--confirm gate) safety defaults.

2. Architecture Analysis

Components:

  • Skill (SKILL.md with pre-flight install block)
  • Rust binary (compound-v3-plugin) invoked via launcher

Skill Structure:
SKILL.md contains auto-injected pre-flight (version check, onchainos install, binary install, install report), proactive onboarding, quickstart walkthrough, architecture notes, data trust boundary disclaimer, supported-chains table, ~8 commands (quickstart, get-markets, get-position, supply, borrow, repay, withdraw, claim-rewards), concept explanations (supply=repay semantics, repay overflow protection, baseBorrowMin, rounding behavior), confirm gate, dry-run mode, and error table.

Data Flow:

  • Read ops: direct eth_call JSON-RPC to ethereum.publicnode.com, base-rpc.publicnode.com, arbitrum-one-rpc.publicnode.com, polygon-bor-rpc.publicnode.com
  • Write ops: construct calldata locally, delegate signing+broadcasting to onchainos wallet contract-call subprocess
  • Wallet resolution via onchainos wallet addresses subprocess

Dependencies:

  • External: onchainos CLI (delegated signing), public RPC endpoints
  • Rust crates: alloy-primitives, alloy-sol-types, reqwest, tokio, clap, serde, hex, anyhow
3. Auto-Detected Permissions

onchainos Commands Used

Command Found Exists in onchainos CLI Risk Level Context
onchainos wallet addresses --chain ✅ Yes Low resolve_wallet in onchainos.rs
onchainos wallet contract-call ✅ Yes High sign & broadcast all writes
onchainos wallet balance --chain ✅ Yes Low wallet_balance helper
onchainos wallet login ✅ Yes N/A documented in SKILL.md only
onchainos wallet status ✅ Yes N/A documented in SKILL.md only

All commands verified against the onchainos CLI source reference.

Wallet Operations

Operation Detected? Where Risk
Read balance Yes get-position, get-markets, quickstart Low
Send transaction Yes supply/borrow/repay/withdraw/claim via wallet contract-call High
Sign message No
Contract call Yes All write commands High

External APIs / URLs

URL / Domain Purpose Risk
ethereum.publicnode.com Ethereum RPC reads Low
base-rpc.publicnode.com Base RPC reads Low
arbitrum-one-rpc.publicnode.com Arbitrum RPC reads Low
polygon-bor-rpc.publicnode.com Polygon RPC reads Low
plugin-store-dun.vercel.app/install Install telemetry (auto-injected, skipped) N/A
www.okx.com/priapi/v1/wallet/plugins/download/report Install telemetry (auto-injected, skipped) N/A
raw.githubusercontent.com/okx/plugin-store/... Update check (auto-injected, skipped) N/A

Chains Operated On

Ethereum (1), Base (8453), Arbitrum One (42161), Polygon (137).

Overall Permission Summary

This plugin can read Compound V3 market/position state and submit on-chain transactions (approve, supply, withdraw/borrow, claim rewards) by constructing ABI-encoded calldata and delegating signing to onchainos. Wallet private keys never touch this binary. All writes are gated by --confirm and include simulation pre-checks. No sensitive-file access, no persistence, no dynamic code loading.

4. onchainos API Compliance

Does this plugin use onchainos CLI for all on-chain write operations?

Yes — all signing and broadcasting is routed through onchainos wallet contract-call.

On-Chain Write Operations (MUST use onchainos)

Operation Uses onchainos? Self-implements? Detail
Wallet signing No Delegated to onchainos TEE
Transaction broadcasting No Via wallet contract-call
DEX swap execution N/A No Not applicable
Token approval No erc20_approve → wallet contract-call
Contract calls No wallet_contract_call wrapper
Token transfers N/A No Not applicable

Data Queries (allowed to use external sources)

Data Source API/Service Used Purpose
Public RPC (publicnode.com) JSON-RPC eth_call Reading Comet contract state

External APIs / Libraries Detected

reqwest HTTP client → JSON-RPC to publicnode endpoints. No web3 library, no private-key handling libraries.

Verdict: ✅ Fully Compliant

All write paths correctly delegate to onchainos; no private key handling, no direct tx broadcasting.

5. Security Assessment

Static Rule Scan (C01-C09, H01-H09, M01-M08, L01-L02)

Rule ID Severity Title Matched? Detail
C01 CRITICAL curl | sh remote exec Only in auto-injected pre-flight (skipped per instructions)
H05 INFO Direct financial operations Plugin executes on-chain financial ops via onchainos — baseline characteristic
M07 MEDIUM Missing untrusted-data boundary SKILL.md includes explicit "Data Trust Boundary" section declaring CLI output is untrusted external content
M08 MEDIUM External data field passthrough get-position/get-markets display instructions explicitly enumerate safe fields ("Display only these fields")

No other static rules matched.

LLM Judge Analysis (L-PINJ, L-MALI, L-MEMA, L-IINJ, L-AEXE, L-FINA, L-FISO)

Judge Severity Detected Confidence Evidence
L-PINJ CRITICAL No 0.95 No hidden instructions, no jailbreak patterns, CLI args validated via clap (u64/string addresses)
L-MALI CRITICAL No 0.95 Declared behavior matches code: reads Comet state, delegates signing to onchainos
L-MEMA HIGH No 0.95 No writes to MEMORY.md, SOUL.md, or persistent agent state
L-IINJ INFO Yes 0.9 External requests to 4 public RPC endpoints + auto-injected stats endpoints; boundary declaration present → INFO
L-AEXE INFO No 0.9 Explicit --confirm gate required for all writes; preview-first default
L-FINA INFO Yes 0.95 Write + confirmation gate + onchainos delegation → INFO (well-controlled)
L-FISO N/A N/A N/A

Toxic Flow Detection (TF001-TF006)

No toxic flows detected. No C01 present in developer code, no TF005. Data boundary declaration present, no TF006.

Prompt Injection Scan

No instruction override patterns, no pseudo-system tags, no hidden base64 payloads, no Unicode smuggling. SKILL.md contains legitimate security directives and confirmation gates.

Result: ✅ Clean

Dangerous Operations Check

Plugin performs token approvals, supplies, borrows, repays, withdraws, and reward claims. All write commands require --confirm (explicit user action). SKILL.md repeatedly warns "Ask user to confirm" before each write. Approve amount is the exact transaction amount (not unlimited).

Result: ✅ Safe

Data Exfiltration Risk

No code paths read ~/.ssh, ~/.aws, ~/.env, or any credentials. No network requests outside the declared public RPC endpoints. Wallet address is the only user data sent externally (as part of eth_call params, which is expected).

Result: ✅ No Risk

Overall Security Rating: 🟢 Low Risk

6. Source Code Security

Language & Build Config

Rust, edition 2021, binary name compound-v3-plugin, entry point src/main.rs.

Dependency Analysis

  • clap (4), reqwest (0.12), serde/serde_json (1), tokio (1), anyhow (1), hex (0.4), alloy-sol-types (0.8), alloy-primitives (0.8)
  • All are well-maintained mainstream Rust crates. No suspicious or unmaintained dependencies.

Code Safety Audit

Check Result Detail
Hardcoded secrets (API keys, private keys, mnemonics) None — only public contract addresses and RPC URLs
Network requests to undeclared endpoints Only 4 publicnode RPC URLs, all declared in plugin.yaml
File system access outside plugin scope No fs reads/writes in Rust code
Dynamic code execution (eval, exec, shell commands) Uses std::process::Command/tokio::process::Command only to invoke onchainos CLI with fixed args — no shell interpolation
Environment variable access beyond declared env No env::var calls found
Build scripts with side effects (build.rs, postinstall) No build.rs
Unsafe code blocks (Rust) No unsafe blocks detected

Minor note: Command::new("onchainos").args(&[...]) uses fixed arguments but passes user-controlled addresses/amounts. Since Command::args does NOT invoke a shell, there is no shell injection risk. Addresses are used as CLI argument values, which is safe.

Does SKILL.md accurately describe what the source code does?

Yes. The SKILL.md command descriptions (preview vs --confirm, approve+supply 2-tx flow, 3s nonce safety delay, borrow=withdraw semantics, repay overflow protection via min(borrow,wallet), withdraw-requires-zero-debt check) all match the Rust implementation exactly.

Verdict: ✅ Source Safe

7. Code Review

Quality Score: 88/100

Dimension Score Notes
Completeness (pre-flight, commands, error handling) 23/25 Preview mode, dry-run, confirm gate, simulation pre-checks, nonce safety delay, detailed error table. Minor: launcher install from plugin-store is auto-injected so scope limited
Clarity (descriptions, no ambiguity) 23/25 Commands well documented; edge cases (dust rounding, baseBorrowMin) explicitly addressed. Slight duplication between Quickstart and Commands sections
Security Awareness (confirmations, slippage, limits) 23/25 --confirm gate required, approve uses exact amount (not unlimited), withdraw blocks if debt>0, balance pre-checks, simulate_borrow catches NotCollateralized pre-gas
Skill Routing (defers correctly, no overreach) 14/15 Correctly defers signing to onchainos; scope limited to Compound V3; explicit "Do NOT use for" section
Formatting (markdown, tables, code blocks) 5/10 Generally good; pre-flight blocks make SKILL.md long but they're auto-injected

Strengths

  • Strong safety defaults: --confirm required, preview-first output, dry-run support, explicit "no --force flag" callout
  • On-chain simulation (simulate_borrow) catches NotCollateralized() before gas is spent — excellent UX
  • Proactive handling of Compound V3 quirks: USDT-like base_asset index rounding explained, baseBorrowMin surfaced in preview, repay overflow prevention via min(borrow, wallet_balance)
  • Clear data-trust-boundary declaration satisfies M07
  • Delegates all signing to onchainos TEE; never touches private keys

Issues Found

  • 🔵 Minor: parse_u128 used for uint256 may silently truncate extremely large values (>u128::MAX ~3.4e38); in practice, Compound V3 token balances rarely exceed u128, and unlimited approvals are intentionally avoided, so real-world impact is minimal
  • 🔵 Minor: wait_for_tx has 40s fixed timeout; slow-finality networks (Ethereum during congestion) may exceed this and return slightly stale post-tx balance — not a safety issue
  • 🔵 Minor: claim_rewards preview output includes explicit reward_owed value but no "untrusted external data" warning specifically tied to displayed amounts (though SKILL.md has a global trust-boundary section)
8. Recommendations
  1. (Optional) Consider using U256 (via alloy-primitives) instead of u128 for balance handling to handle edge-case large values safely — though practically not required for Compound V3.
  2. (Optional) Make wait_for_tx timeout configurable or longer for Ethereum mainnet to avoid stale post-tx balance reads during network congestion.
  3. (Optional) Add a simulate pre-check for supply similar to simulate_borrow for better UX when ERC-20 transfer might fail (though balance pre-check already covers most cases).
  4. No security-critical changes required.
9. Reviewer Summary

One-line verdict: Well-designed Compound V3 plugin with strong safety defaults, correct onchainos delegation for all writes, and no security concerns in developer-submitted code.

Merge recommendation: ✅ Ready to merge


Generated by Claude AI via Anthropic API — review the full report before approving.

@Noah3595 Noah3595 merged commit d75a3f3 into okx:main Apr 21, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants