Fee model
fee_extra on mainnet. The user pays the principal plus the platform fee plus your optional surcharge. Amounts use integer minor units (drops / lamports / wei).
Widget setup (script, iframe, origin allowlist): Setup fee control.
- Platform fee (Riddle, read-only): swap 0.85%, bridge 1.20%, cafe 1%
- Partner share of that platform fee: Starter 20%, Growth 30%, Scale 40%
- Your surcharge: 0–50 bps of notional, 100% to you. Set in Dashboard → Fees
GET /api/v1/fees
POST /api/v1/fees/quote
{ "product": "swap", "amountMinor": "1000000" }
# Dashboard (session)
GET /api/dashboard/fees
POST /api/dashboard/fees
{ "surchargeBps": 10, "products": { "swap": 10, "bridge": 0 } }Package: @riddlewallet/partners riddle.fee({ product, amountMinor, tier, partnerSurchargeBps })