buff-roundup

Track and calculate round-up investments from agent transactions. Rounds up payment amounts to the nearest dollar increment and records the spare change for optional crypto investing via the Buff protocol on Solana. Read-only by default — investment execution requires explicit user opt-in.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "buff-roundup" with this command: npx skills add nightcode112/buff-roundup

Buff Round-Up Investing for OpenClaw

Buff tracks your agent's transaction costs and calculates how much spare change could be invested. By default, Buff only calculates and records round-ups — actual investment execution is opt-in and requires explicit configuration.

What This Skill Does

  • Calculates round-ups: "$4.73 transaction → $5.00 = $0.27 spare change"
  • Tracks accumulated spare change over time
  • Optionally invests when the user enables auto-invest and the threshold is reached

This skill does NOT:

  • Move funds without explicit opt-in
  • Access any wallet keys unless the user provides BUFF_AGENT_SEED
  • Make payments on your behalf (x402 is disabled by default)

Setup

1. Install

npm install buff-protocol-sdk @solana/web3.js

The SDK is open source on GitHub and published on npm.

2. Configure

Set environment variables. Only BUFF_AGENT_SEED is sensitive — treat it like a private key.

# Required: 32-byte hex seed (generate one below)
BUFF_AGENT_SEED=your-32-byte-hex-seed

# Optional: customize behavior (defaults shown)
BUFF_PLAN=sprout          # seed|sprout|tree|forest
BUFF_INVEST_INTO=BTC      # BTC|ETH|SOL|USDC
BUFF_THRESHOLD=5           # USD threshold before swap

Generate a seed:

node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"

3. Initialize

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

const buff = await Buff.init({
  agentSeed: process.env.BUFF_AGENT_SEED,
  platformId: "openclaw-agent",
  agentId: process.env.OPENCLAW_AGENT_ID || "my-agent",
  source: "agent",
  plan: process.env.BUFF_PLAN || "sprout",
  investInto: process.env.BUFF_INVEST_INTO || "BTC",
  investThreshold: Number(process.env.BUFF_THRESHOLD) || 5,
})

Usage

Record a round-up (calculation only, no funds moved):

const { breakdown } = await buff.wrapAmount({
  txValueUsd: 4.73,
  source: "agent",
  memo: "API call",
})
console.log("Round-up: $" + breakdown.roundUpUsd)
// Sprout plan: $4.73 → $4.80 = $0.07 recorded

Check accumulated total:

const stats = buff.getStats()
console.log("Total round-ups:", stats.totalRoundUps)
console.log("Accumulated: $" + stats.totalInvestedUsd)

View portfolio:

const portfolio = await buff.getPortfolio()
console.log("Pending SOL:", portfolio.pendingSol)
console.log("Invested:", portfolio.totalUsd, "USD")

Opt-in: Execute investment (only when explicitly called):

// Only call this if you want to actually swap SOL → BTC/ETH via Jupiter
const { swaps } = await buff.checkAndInvest()
if (swaps.length > 0) {
  console.log("Invested:", swaps.map(s => s.asset).join(", "))
}

Plan Tiers

PlanRounds toFeeDescription
Seed$0.051%Smallest round-ups
Sprout$0.100.75%Default, balanced
Tree$0.500.5%Moderate round-ups
Forest$1.000.25%Maximum round-ups

Security

  • The BUFF_AGENT_SEED is used to derive a deterministic Solana keypair. Never share it.
  • The derived wallet only holds accumulated round-up SOL — keep it funded with small amounts.
  • No funds are moved without calling checkAndInvest() explicitly.
  • All code is open source — audit it yourself.
  • The SDK connects to public Solana RPC and Jupiter API — no proprietary backends.

Dashboard

Monitor your agent's portfolio at: https://sow-beryl.vercel.app/dashboard

  • Use the "Monitor" tab
  • Enter your agent's public key (not the seed)
  • View portfolio, activity, and allocation (read-only)

Links

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Web3

Openpump Solana Mcp

Solana token launch and trading tools via the OpenPump MCP server. Creates tokens on pump.fun, buys and sells tokens, runs market-making bots, snipes new tok...

Registry SourceRecently Updated
1740Profile unavailable
Web3

Agent Template

Bot-vs-bot parimutuel prediction markets on Solana. Trade real creator attention metrics.

Registry SourceRecently Updated
2670Profile unavailable
Web3

KryptoGO Meme Trader

Analyze and trade meme coins using KryptoGO's on-chain cluster analysis platform. Covers wallet clustering, address labels, accumulation/distribution detecti...

Registry SourceRecently Updated
4242Profile unavailable
Web3

Fortuna Lottery

Participate in the FORTUNA autonomous agent lottery on Solana. Buy lottery tickets by sending SOL to the treasury. Check jackpot size, round countdown, and d...

Registry SourceRecently Updated
3870Profile unavailable