dflow-platform-fees

dflow-platform-fees is a skill for Claude Code, Codex from x402agent/solana-clawd. It costs 162 tokens per session (2,288 once invoked), scanned A, original, MIT.

A DFlow Trade API setup that lets an app collect a fee when it routes a user's trade. DFlow is a trading service, and the fee is sent to an account controlled by the app builder.

In plain words
What is it for?
Use it to add fixed fees to spot or prediction-market trades, or dynamic fees to prediction-market outcome-token trades, through the API's order parameters.
Why use it?
It gives a trading app a defined way to earn money from trades it sends through DFlow. It also distinguishes fixed percentage fees from probability-weighted fees for prediction-market tokens.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it to add fixed fees to spot or prediction-market trades, or dynamic fees to prediction-market outcome-token trades, through the API's order parameters.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/x402agent/solana-clawd/dflow-platform-fees
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add x402agent/solana-clawd --skill dflow-platform-fees
Clone the repo
git clone --depth 1 https://github.com/x402agent/solana-clawd

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dflow-platform-fees

README.md
[![agentmods](https://agentmods.dev/badge/skills/x402agent/solana-clawd/dflow-platform-fees/github.svg)](https://agentmods.dev/skills/x402agent/solana-clawd/dflow-platform-fees)
Your own site
<a href="https://agentmods.dev/skills/x402agent/solana-clawd/dflow-platform-fees"><img src="https://agentmods.dev/badge/skills/x402agent/solana-clawd/dflow-platform-fees/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for dflow-platform-fees

Your own site · 80×15
<a href="https://agentmods.dev/skills/x402agent/solana-clawd/dflow-platform-fees"><img src="https://agentmods.dev/badge/skills/x402agent/solana-clawd/dflow-platform-fees.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 162 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,288 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00162 $0.02288
Opus 5 $0.00081 $0.01144
Sonnet 5 $0.00032 $0.00458
Haiku 4.5 $0.00016 $0.00229

Measured 9d ago against content hash 01c75a3028e4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

dflow-platform-fees scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/skills/dflow-platform-fees/SKILL.md · 114 lines

How it starts

The opening of the file, as written. The whole thing — 114 lines — stays where its author put it; the contents beside it link to each section on GitHub.

DFlow Platform Fees

Collect a fee on trades your app routes through the DFlow Trade API, paid to a builder-controlled token account on successful execution. This is the builder→user fee — builders monetizing their distribution.

Prerequisites

  • DFlow docs MCP (https://pond.dflow.net/mcp) — install per the repo README. This skill is the recipe; the MCP is the reference. Exact parameter encoding, response shapes, and the full mode matrix live there — don't guess.

Surface

API only. Platform fees are /order parameters on the Trade API. The dflow CLI is for direct self-trading, not for monetizing a distribution product, so it doesn't expose platform-fee flags — don't hunt for a --platform-fee-bps option.

Which host depends on API-key status, same as the other trading skills: prod https://quote-api.dflow.net with x-api-key, dev https://dev-quote-api.dflow.net.

Two fee models

Pick based on what trades you're fee-ing.

Fixed — platformFeeBps

Flat percentage of the trade in basis points (1 bps = 0.01%). platformFeeBps: 50 → 0.5% fee. Works on spot and PM trades. The only option for spot.

Dynamic — platformFeeScale (PM outcome tokens only)

Probability-weighted fee that scales with market uncertainty:

fee = k * p * (1 - p) * c
  • k = platformFeeScale, 3-decimal precision (platformFeeScale: 50 → k = 0.050).
  • p = the all-in price (includes all fees + filled price), 0–1.
  • c = contract size.
  • Paid in the settlement mint (USDC or CASH).

p * (1 - p) peaks at p = 0.5 and is zero at p = 0 / p = 1 — so you charge the most on coin-flip markets, scale down as markets approach certainty, and charge nothing at redemption (p = 1). If your revenue model assumes a take on redemption, rework it.

Example. platformFeeScale = 50, user buys 100 YES contracts at p = 0.40: fee = 0.050 * 0.40 * 0.60 * 100 = 1.20 → $1.20 on a $40 buy.

Read the full file on GitHub · 114 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 114 lines · 162 tokens per session scan A 01c75a3028e4

Subscribe to this mod's changes

dflow-platform-fees is a skill published in the GitHub repository x402agent/solana-clawd (24 stars, last pushed 3mo ago), licensed MIT. It adds 162 tokens to every session and 2,288 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.