Skip to content

feat: add Solana fixed-yield brief plugin#122

Draft
sheawinkler wants to merge 4 commits into
zeroclaw-labs:mainfrom
sheawinkler:feat/solana-fixed-yield-brief
Draft

feat: add Solana fixed-yield brief plugin#122
sheawinkler wants to merge 4 commits into
zeroclaw-labs:mainfrom
sheawinkler:feat/solana-fixed-yield-brief

Conversation

@sheawinkler

@sheawinkler sheawinkler commented Jul 21, 2026

Copy link
Copy Markdown

What

Adds solana-fixed-yield-brief, a T0/read-only wasm32-wasip2 tool plugin
that:

  • fetches fixed official Exponent vault, SY-token, and quote endpoints;
  • filters to coherent SOL-normalized Principal Token markets;
  • compares bounded live BASE_TO_PT quotes with a non-weakenable 5.50%
    staking hurdle and explicit cost allowance;
  • ranks a bounded 3/6/8 quote fan-out by term excess and defaults to one compact
    result;
  • returns exact base/PT identities, coverage, unit assumptions, the unquoted
    base-token leg, and non-approval risk labels.

The plugin accepts no wallet, key, transaction, config, filesystem access, or
caller-controlled URL. Its only manifest permission is http_client.

Why

An APY headline is not an executable wallet return. Exponent's BASE_TO_PT
amount is normalized-SOL accounting notional; an LST-backed market can require
its underlying base token rather than native SOL. The plugin therefore exposes
that acquisition/redemption gap and never presents a quote as a funded trade or
execution approval.

Safety and integrity

  • fixed HTTPS origins; 10-second connect timeout; bounded bodies, catalogs,
    venue lists, routes, quote fan-out, and output;
  • strict typed parsing, 32-byte Base58 Solana pubkeys, exact UTC maturity
    parsing, duplicate-identity rejection, and pre/post-I/O clock checks;
  • catalog price/APY and live quote/APY reconciliation;
  • route input/output/fee/percentage/type/address reconciliation;
  • explicit normalized-SOL/base/PT unit types and a narrowly admitted
    one-for-one atomic-scale assumption;
  • missing quote-critical fields, malformed data, zero coherent quotes, and
    partial coverage fail closed or remain explicitly UNPROVEN;
  • remote names/tickers are never rendered;
  • hostile action/recipient/amount/privateKey tool fields are
    rejected before clock or network access;
  • structured success diagnostics use log-record; no stdout from the
    component.

Authoritative local verification

Committed snapshot:
af5c036c32d650509832e7c76a7a5f7a9c9c4ed4

cargo fmt -- --check                                      PASS
cargo test --locked                                       PASS (28 passed)
cargo clippy --locked --all-targets -- -D warnings        PASS
cargo build --locked --target wasm32-wasip2 --release     PASS
cargo clippy --locked --target wasm32-wasip2 -- -D warnings
                                                            PASS
cargo audit --file Cargo.lock --deny warnings              PASS (76 dependencies)
python3 -m unittest discover -s tools/tests -p 'test_*.py'
                                                            PASS (17 passed)
python3 -m unittest discover -s tools/ci/tests -p 'test_*.py'
                                                            PASS (36 passed)

The repository's strict clean-snapshot validator independently passed tests,
native Clippy, WASI Clippy, release build, source-mutation detection, and
component staging:

source_head: af5c036c32d650509832e7c76a7a5f7a9c9c4ed4
tests: 28 passed / 0 failed / 0 ignored
host clippy: 0
wasm clippy: 0
release build: 0
artifact: 423310 bytes
artifact sha256: 3e89d09e2028b8f7f9b49ab95fd390db264f4874d28a8770cfd0dd59685fee41
source mutation: none

Real ZeroClaw host execution

A fresh release harness built against ZeroClaw commit
f0b92f1516ec86aeb89ab2d8f25b837e14885aae loaded the final component through
the actual PluginHost/Wasmtime bridge. The four relevant WIT files were
byte-identical.

  • harness SHA-256:
    bf051d8265ca4011815cedba98c699bf523e362e5957ec4b0d838e31dce1e803
  • discovered exactly solana-fixed-yield-brief v0.1.0 with
    permissions=[HttpClient];
  • completed a live 0.9 normalized-SOL call with success=true, 3/3 attempted
    coherent quotes across 4 eligible markets, one best candidate, and explicit
    partial-coverage warning;
  • live result: 562 bytes, 221 o200k_base tokens, 222 cl100k_base
    tokens;
  • returned success=false for the hostile fund-move/private-key argument
    set.

The component transport exposes a connect timeout but not a total/read
deadline; the verified host supplies a 30-second outer cancellation boundary.

Full reproducible evidence and the exact observed output are in
DEMO.md.

Human-only bounty artifact

The real Telegram/Discord, no-slide video and Superteam submission remain
human-produced artifacts. The README and demo record provide the exact
invocation and hostile-message sequence; this PR does not misrepresent the local
host execution as channel proof.

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.

1 participant