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.
Dynamic fees are not available on spot.
Core `/order` parameters
Full param details and encoding → docs MCP, or read the pages directly: