Skip to main content
As an integrator, you can collect a fee on every trade Flash executes on behalf of your users. You choose the rate, Flash collects it at execution time, and the proceeds accumulate in the Flash Portfolio of your Definitive account.

How it works

When you call Flash, include the flashIntegratorFeeBps parameter on both POST /quote and POST /order. Choose the fee before quoting, then submit the same string value with the signed order. Flash deducts your fee from the trade output and routes it to the vault in your Flash Portfolio, controlled by your fee wallet. Your Definitive account has a single Flash Portfolio, and that is where every integrator fee lands.

Definitive’s fee

The 10 bps rate is a promotional launch rate, in effect through December 2026. Pricing may change after the promotional period. Enterprise plans are structured differently — reach out to the Definitive team to discuss.
Definitive charges a 10 bps (0.10%) base fee on every trade, across all order types. This is separate from your integrator fee: flashIntegratorFeeBps stacks on top, so the total a user pays is Definitive’s fee plus whatever rate you set. Both are already included in the quote’s estimatedFeeNotional, so you always quote the true all-in cost regardless of the current rate.

Which token your fee is paid in

Your fee is paid in one of the trade’s two tokens. Flash pays out in a stablecoin or major (e.g. WETH) if that’s on either side of the trade, and defaults to the input token when neither side is a stablecoin or major. (The feeTicker field on each fill tells you which token a given fee was collected in.) You can always swap into stables/majors using Definitive if preferred.

Set your fee on quote and order

Pass flashIntegratorFeeBps as a string when calling POST /quote. Example: buying WETH with 100 USDC on Base with a 50 bps fee.
cURL
After the user signs the quote payload, submit the order with the same flashIntegratorFeeBps value.
cURL
To use the same fee on every trade, hardcode flashIntegratorFeeBps in your integration logic and send it on both calls. To vary fees per trade, choose the value before POST /quote and reuse it unchanged on POST /order.

Withdraw your fees

1

Log in to Definitive

Go to app.definitive.fi and sign in with your Flash integrator credentials.
2

Open your Flash Portfolio

Your accrued fees are held there. Connect the EVM or Solana wallet associated with the vault you want to withdraw from.
3

Withdraw

Click Withdraw and sign the transaction in your wallet to move funds from the vault to your fee wallet.

Track your fees

Every fill returned by GET /orders/{orderId} includes fee fields so you can reconcile earnings programmatically. Sum integratorFeeNotional across fills for your total earnings. You can also track your fees on the Flash Integrator Dashboard - see details in Become an Integrator.

Quick reference

Base builder-code attribution

Base runs a builder-grant program that rewards the builders behind onchain activity. Attribution uses ERC-8021 builder codes: a short code you register on base.dev that identifies you as the builder behind a transaction. Pass your code to Flash on an order, and Flash stamps it onto the settlement transaction’s calldata so Base’s indexers attribute that activity to you. Attribution is independent of integrator fees — use either feature without the other.

How it works

  1. Register a builder code on base.dev. The code is a lookup key in Base’s onchain Code Registry — a plain string such as myapp, not a key:value pair.
  2. Include erc8021AttributionCode on POST /order. Flash appends it to the settlement transaction calldata as an ERC-8021 suffix, alongside Definitive’s own code.
  3. Base’s indexers decode the suffix and attribute the transaction to your registered code.
An invalid value is rejected at order placement with erc8021AttributionCode must be 1–32 characters of [a-zA-Z0-9_.-] (no commas).
Unlike flashIntegratorFeeBps, the attribution code is an order-only field. The fee must be sent identically on the quote and order because it changes pricing; the attribution code has no pricing effect, so you send it only on POST /order.

Pass your code on the order

Include erc8021AttributionCode when you submit the signed order. Nothing else about the order flow changes.
cURL
An unregistered or misspelled code never fails the order — the trade still settles, but indexers cannot resolve the code to a payout address, so the activity goes unattributed. Confirm your code matches your base.dev registration.

Verify attribution onchain

Flash encodes the codes as an ERC-8021 Schema-0 suffix at the tail of the settlement transaction’s calldata. To confirm your code landed, decode the calldata tail from the end:
  • The last 16 bytes are the ERC-8021 marker beginning 0x8021 — its presence signals a Schema-0 attribution suffix.
  • The byte immediately before the marker is the payload length.
  • Before the length is the payload itself: the attribution codes joined by commas.
The codes are comma-separated, with Definitive’s own registered code first and yours second. Definitive only registers a code on Base, so on non-Base EVM chains the suffix carries your code alone.

Become an Integrator

Set up your integrator account and API key.

Order endpoint

Full parameter reference for POST /order, including flashIntegratorFeeBps.