> ## Documentation Index
> Fetch the complete documentation index at: https://pond.dflow.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Transaction Fee Sponsorship

> How to sponsor user transaction fees and prediction market initialization costs

Apps often sponsor **transaction fees** and **ATA creation** for users by acting as the transaction’s fee payer. When trading prediction markets, there is an additional cost category to be aware of: **prediction market initialization**, which creates outcome mints and related onchain accounts.

<Info>
  On Solana, wallets do not hold tokens directly. Each wallet must have an
  Associated Token Account (ATA) for a specific SPL token. If the ATA does not
  exist yet, it must be created onchain (with rent paid by a designated payer)
  before the wallet can receive or trade that token.
</Info>

## What you can sponsor

There are three distinct costs involved in prediction market trades:

* **Transaction fees** (paid by the fee payer)
* **Associated token account (ATA) creation**
* **Prediction market initialization** (market tokenization)

DFlow exposes separate controls depending on which costs you want your application to cover.

## Sponsor transaction fees and market initialization

Use the [`sponsor`](/resources/trading-api/order/order#parameter-sponsor)
parameter when you want your application to act as the fee payer and also cover
prediction market initialization costs.

This is the simplest option when fully sponsoring user transactions.

## Sponsor market initialization only

If you want users to pay their own transaction fees, but want your application
to pay for **prediction market initialization**, set
[`predictionMarketInitPayer`](/resources/trading-api/order/order#parameter-prediction-market-init-payer)
to the address that should fund market initialization.

This is useful when users are already signing and paying for transactions, but you don’t want them to incur the one-time cost of initializing an uninitialized market.

## Initialize markets ahead of time

To avoid initializing a market during a user trade, you can initialize it ahead
of time using the utility endpoint below.

### Initialize Prediction Market

[`GET /prediction-market-init`](/resources/trading-api/prediction-market/prediction-market-init)

**Query parameters**

* `payer` (required): Base58-encoded address that pays for initialization.
* `outcomeMint` (required): Base58-encoded mint address of either outcome token.

**Response**

* `transaction` (required): Base64-encoded transaction that initializes the market.\
  The `payer` must sign this transaction before submitting it.

Pre-initializing markets is useful for backend workflows or when you want the first user trade to execute without additional setup.

## Notes

* Prediction market initialization is a one-time onchain cost per market.
* If a market is uninitialized, initialization can occur automatically during a trade unless handled separately.
* Sponsorship configuration determines who pays for transaction fees versus market initialization.
