Skip to main content
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.
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.

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. Use the 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. If you want users to pay their own transaction fees, but want your application to pay for prediction market initialization, set predictionMarketInitPayer 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 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.