← 返回 Skills 市场
nightcode112

Buff Round-Up Investing

作者 Kay · GitHub ↗ · v2.2.0 · MIT-0
cross-platform ⚠ suspicious
252
总下载
0
收藏
0
当前安装
6
版本数
在 OpenClaw 中安装
/install buff-roundup
功能描述
Auto-invest spare change from every transaction. Rounds up payments to the nearest dollar and invests the difference into BTC, ETH, or SOL via Jupiter on Sol...
使用说明 (SKILL.md)

Buff — Round-Up Investing Protocol

Buff rounds up every Solana transaction and auto-invests the spare change into crypto assets. All fees are enforced server-side — the SDK is a thin API client with no sensitive logic.

Quick Start

npm install buff-protocol-sdk
import { Buff } from "buff-protocol-sdk"

const buff = new Buff({
  apiKey: process.env.BUFF_API_KEY,
  plan: "sprout",
  investInto: "BTC",
})

// Calculate a round-up
const breakdown = await buff.calculateRoundUp(4.73)
// $4.73 → $4.80 = $0.07 round-up

// Get wrap instructions (server builds transfer instructions with fees)
const { instructions, breakdown } = await buff.getWrapInstructions(
  27.63, userPubkey, buffWalletPubkey
)
// Append instructions to your transaction, sign, send

Auto-Invest

// Check if threshold reached
const acc = await buff.getAccumulator(walletPubkey)

// Build swap transactions (server-side via Jupiter)
const result = await buff.buildSwap(walletPubkey)
if (result.ready) {
  for (const swap of result.transactions) {
    // Sign the transaction, then execute
    await buff.executeSwap(signedTx)
  }
}

Multi-Asset Allocation

buff.setAllocations([
  { asset: "BTC", pct: 60 },
  { asset: "ETH", pct: 40 },
])

Plan Tiers

Plan Rounds to Fee
Seed $0.05 1.00%
Sprout $0.10 0.75%
Tree $0.50 0.50%
Forest $1.00 0.25%

REST API

No SDK needed — any language, any agent. Base URL: https://buff.finance

Public Endpoints (no auth required)

# Get auth message to sign
curl https://buff.finance/api/auth

# Get plan tiers and config
curl https://buff.finance/api/plans

# Get live crypto prices
curl https://buff.finance/api/price

# Get portfolio for any wallet
curl https://buff.finance/api/portfolio/WALLET_ADDRESS

# Check accumulator (balance vs threshold)
curl "https://buff.finance/api/accumulator/WALLET_ADDRESS?threshold=5"

# Get transaction history
curl "https://buff.finance/api/activity?address=WALLET_ADDRESS&limit=20"

Generate API Key (no pre-existing key needed)

# 1. Sign "Buff API Authentication" with your Solana keypair
# 2. Send wallet + signature to generate your key

curl -X POST https://buff.finance/api/keys/generate \
  -H "Content-Type: application/json" \
  -d '{"wallet": "YOUR_PUBKEY", "signature": "BASE64_SIGNATURE"}'

# Response: { "ok": true, "data": { "apiKey": "...", "wallet": "..." } }
# Use both x-api-key and x-wallet headers on all authenticated requests

Authenticated Endpoints (require x-api-key + x-wallet, or x-wallet + x-signature)

# Calculate round-up
curl -X POST https://buff.finance/api/roundup \
  -H "x-api-key: YOUR_KEY" \
  -d '{"txValueUsd": 27.63, "plan": "tree"}'

# Get wrap instructions (server builds transfer with fees enforced)
curl -X POST https://buff.finance/api/wrap \
  -H "x-api-key: YOUR_KEY" \
  -d '{"txValueUsd": 27.63, "userPubkey": "...", "buffWalletPubkey": "..."}'

# Get Jupiter swap quote
curl -X POST https://buff.finance/api/swap/quote \
  -H "x-api-key: YOUR_KEY" \
  -d '{"inputLamports": 100000000, "targetAsset": "BTC"}'

# Build swap transaction (server-side via Jupiter)
curl -X POST https://buff.finance/api/swap/build \
  -H "x-api-key: YOUR_KEY" \
  -d '{"buffWalletPubkey": "...", "targetAsset": "BTC", "threshold": 5}'

# Execute signed swap transaction
curl -X POST https://buff.finance/api/swap/execute \
  -H "x-api-key: YOUR_KEY" \
  -d '{"signedTransaction": "base64-signed-tx", "network": "mainnet-beta"}'

# Derive Buff wallet from signature
curl -X POST https://buff.finance/api/wallet/derive \
  -d '{"signature": "base64-or-hex-signature"}'

# Register an agent
curl -X POST https://buff.finance/api/agent/register \
  -H "x-api-key: YOUR_KEY" \
  -d '{"publicKey": "...", "agentId": "my-agent"}'

Interactive API Playground

Try all endpoints live at: https://buff.finance/docs/api/rest

Security

  • All fee calculation and treasury addresses are server-side only
  • The SDK contains zero sensitive logic — it's just HTTP calls
  • No funds are moved without explicit user signing
  • Fees cannot be bypassed — the server builds all transfer instructions

Verifying Server-Built Transactions

Before signing any transaction returned by the Buff API, agents and developers should verify:

  1. Deserialize the instructions returned by /api/wrap (base64 JSON containing programId, keys, data)
  2. Check that transfers only go to your Buff wallet (user investment) and the known Buff treasury (4pWnqVxtSfrMo2XK6AarW3rDNoN7UfAMEyHF8Y9KZGHf)
  3. Verify amounts match the breakdownuserInvestmentLamports + buffFeeLamports should equal roundUpLamports
  4. For swaps, verify the unsigned transaction from /api/swap/build contains only Jupiter swap instructions for the expected token pair and amount
  5. Use a scoped/rotatable API key and test with small amounts first
  6. Compare the breakdown from /api/roundup (informational) with /api/wrap (executable) — they should match for the same inputs

Links

安全使用建议
Do not install blindly. Confirm with the publisher why the registry metadata omitted required environment variables (BUFF_API_KEY, BUFF_WALLET_PUBKEY) even though SKILL.md and package.json require them. Treat BUFF_API_KEY as a sensitive, rotatable scoped key; never supply your Solana private key to the service — only submit signatures produced locally by a secure wallet or hardware signer. Before signing any transaction from the API, follow the SKILL.md verification steps (check program IDs, destination addresses, amounts, and that swaps are only Jupiter instructions). Test with small amounts and a throwaway wallet first. If you need higher assurance, ask for a link to an official homepage or repository with audited code and confirm TLS/certificate ownership of buff.finance and the GitHub repository listed in package.json.
功能分析
Type: OpenClaw Skill Name: buff-roundup Version: 2.2.0 The buff-roundup skill is a standard integration for a Solana-based micro-investing service (buff.finance). It provides instructions and API endpoints for calculating transaction round-ups and generating investment transactions. The documentation in SKILL.md includes proactive security advice, instructing the agent to verify server-generated transaction instructions before signing them, which mitigates risks associated with server-side transaction construction. No evidence of data exfiltration, malicious execution, or deceptive prompt injection was found.
能力评估
Purpose & Capability
The SKILL.md and package.json clearly require a BUFF_API_KEY and a Buff wallet public key and describe workflows to build and execute signed swap transactions via the Buff API and Jupiter — which is consistent with the stated round-up/investing purpose. However, the registry metadata in the provided package listing claims no required environment variables or credentials; that is inconsistent with the runtime instructions and package.json. This mismatch reduces trust and should be clarified by the publisher.
Instruction Scope
Instructions are confined to calling buff.finance endpoints, calculating round-ups, building swap transactions, and verifying server-built instructions before signing. These actions are in-scope for an investing SDK. Important: several flows require signing with your Solana keypair (to generate API keys and to sign transactions). The SKILL.md does not instruct sending secret private keys to the service (only signatures), but the agent or developer will need access to signing capability — ensure signing happens locally or via a secure wallet and not by exposing private keys as environment variables or to the remote API.
Install Mechanism
Instruction-only skill with no install spec and no code files beyond SKILL.md and package.json. No downloads or archive extraction are specified, which minimizes install-time risk.
Credentials
The SKILL.md declares BUFF_API_KEY (sensitive) and BUFF_WALLET_PUBKEY as required; package.json lists BUFF_API_KEY and BUFF_WALLET_PUBKEY as requiredEnvVars. Yet the registry metadata earlier stated 'Required env vars: none'. That discrepancy is significant. Requiring a scoped API key for a remote investment service is reasonable for the stated purpose, but the omission in the published metadata is an incoherence that should be resolved before trusting the skill.
Persistence & Privilege
always is false and the skill is user-invocable; autonomous invocation is allowed (normal default). The skill does not request permanent presence or system-wide configuration changes in the provided materials.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install buff-roundup
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /buff-roundup 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.2.0
Expanded public and authenticated REST API documentation and improved API key instructions. - Added details on public (no-auth) endpoints, including live price, plan config, portfolio, accumulator, and activity history. - Documented programmatic API key generation via POST /api/keys/generate with Solana signature authentication. - Updated required_credentials to reflect API key generation options. - Listed all main authenticated endpoints (roundup, wrap, swap quote/build/execute, wallet derive, agent register) with example curl commands. - Linked to interactive API Playground for live endpoint testing. - No code or logic changes; documentation update only.
v2.1.0
- Added new documentation section: "Verifying Server-Built Transactions" with detailed steps for agents and developers to securely verify Buff API transaction instructions before signing. - All other content remains unchanged.
v2.0.0
- All protocol and fee logic moved server-side; the SDK is now a thin API client with no sensitive logic. - Added required environment variables for API key, wallet public key, and plan tier. - Permissions clarified: network (API only), no local storage used. - SDK usage updated: all fund flows and fee enforcement are server-driven; signing handled by the user. - REST API endpoints updated to reflect server-enforced business logic and security. - Security section added to document server-based control over all critical logic and fees.
v1.2.0
Version 1.1.1 – Major documentation and feature upgrade - Simplified and modernized the skill description for broader, more accessible use. - Added support for both human (browser wallet) and AI agent (headless keypair) usage. - Documented advanced features: x402 API auto-payment, multi-asset allocation, and cross-language REST API. - Included installation and code examples for TypeScript, Python, Rust, and Go SDKs. - Provided clear code samples and quick steps for round-up, auto-invest, and API integration. - Updated all reference links and showcased the public dashboard and API endpoints.
v1.1.0
Security improvements: - Declared required credentials (BUFF_AGENT_SEED) in frontmatter metadata - Declared permissions (network: Solana RPC + Jupiter read-only, storage: local memory) - Made auto-invest opt-in — wrapAmount() only records, checkAndInvest() must be explicitly called - Removed x402 auto-payment from default flow - Added security section explaining what the skill does and doesn't do
v1.0.0
- Initial release of Buff Roundup for OpenClaw agents. - Automatically rounds up every transaction to the nearest dollar and invests the difference into BTC, ETH, or SOL via Jupiter on Solana. - Supports any OpenClaw agent transaction, including DeFi, API calls, and x402 payments. - Configurable investment plans, thresholds, and asset allocation. - Includes portfolio monitoring, statistics tracking, and web dashboard integration.
元数据
Slug buff-roundup
版本 2.2.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 6
常见问题

Buff Round-Up Investing 是什么?

Auto-invest spare change from every transaction. Rounds up payments to the nearest dollar and invests the difference into BTC, ETH, or SOL via Jupiter on Sol... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 252 次。

如何安装 Buff Round-Up Investing?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install buff-roundup」即可一键安装,无需额外配置。

Buff Round-Up Investing 是免费的吗?

是的,Buff Round-Up Investing 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Buff Round-Up Investing 支持哪些平台?

Buff Round-Up Investing 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Buff Round-Up Investing?

由 Kay(@nightcode112)开发并维护,当前版本 v2.2.0。

💬 留言讨论