SOLANA DEVNET
PROTOCOL WALKTHROUGH

From match data
to on-chain payout.

See exactly how TxODDS TxLINE data, the oracle bot, your wallet, and the PurpleX Solana program work together—without giving an off-chain service control of pool funds.

TXLINEDATA FEED
ORACLEAUTOMATION
SOLANAPROGRAM
USERSIGNED TX
TxLINE supplies data
Oracle authorizes results
Solana controls funds
Indexer mirrors state
01 / END-TO-END FLOW

One market.
Five verified stages.

External data informs the market. Signed transactions change the market. The on-chain program alone enforces custody and settlement.

01
DATA IN

TxODDS TxLINE sends the match feed

PurpleX receives covered fixtures, start times, teams, and reference odds through its server-side TxLINE connection. Credentials stay on the server and the browser only receives normalized market data.

FixturesReference oddsMatch status
02
MARKET PUBLISHER

The oracle bot publishes executable terms

The oracle worker maps the TxLINE fixture ID to a deterministic Solana market address, then publishes the betting deadline and executable odds. The on-chain Market account—not the website feed—is the source of truth for a bet.

Market PDAClosing timeOn-chain odds
03
USER TRANSACTION

The user reviews, signs, and places a bet

PurpleX reads the current Market account, locks the selected odds, calculates the possible return, and simulates the transaction. After wallet approval, mock USDC moves into the pool vault and the program creates a Bet account for the position.

Wallet signatureBet PDAReserved payout
04
RESULT AUTOMATION

The result bot verifies the final score

After the match is final, the automation worker reconciles the TxLINE result and submits a resolution transaction. The program accepts the outcome only from the configured oracle authority, then closes the market to new bets.

Final resultOracle signatureResolved market
05
ON-CHAIN SETTLEMENT

The program settles every position

A settlement keeper triggers each open Bet account. The Solana program verifies the stored result and transfers the correct amount from the pool vault. The indexer then mirrors the finalized state in Portfolio and Leaderboard.

Program checksToken transferPortfolio sync
02 / SEPARATION OF DUTIES

Data proposes.
The program disposes.

DATA RAIL

TxLINE + oracle worker

  • Delivers fixtures, odds, and match results
  • Maps the external fixture to its Market PDA
  • Signs market and result updates as the oracle

Cannot transfer user tokens or bypass program rules.

MONEY RAIL

Wallet + Solana program

  • Requires the user’s signature to place a bet
  • Locks odds, stake, selection, and payout on-chain
  • Releases vault funds only under settlement rules

Pool collateral stays in program-controlled token accounts.

03 / SETTLEMENT

What happens
after the whistle?

The stored selection and locked odds determine the result. The bot triggers settlement, but it cannot choose a different payout.

WINNING BET

User receives the total return

The vault transfers stake × locked decimal odds to the bettor’s token account. The Bet account is marked settled.

Example: 10 USDC × 2.40 = 24 USDC returned
LOSING BET

The stake remains in the pool

No payout is sent to the bettor. The position’s reserved liability is released and the losing stake contributes to pool equity.

Liquidity providers share pool gains and losses pro rata
VOID MARKET

The original stake is returned

If the oracle voids a cancelled or invalid market, settlement refunds the stake instead of applying win or loss logic.

No odds-based profit is paid on a void position
04 / TRUST BOUNDARIES

Automation can trigger.
It cannot rewrite the rules.

Each role has limited authority. That separation keeps market data, transaction approval, custody, and reporting from collapsing into one trusted server.

Authorized oracleOnly the oracle address configured in the pool can publish the final result.
Locked bet termsStake, outcome, and odds are stored in the program-owned Bet account.
Program-enforced payoutThe contract derives the transfer from resolved state—not from bot input.
Read-model indexingPostgreSQL powers fast portfolio views, but never controls settlement funds.
READY TO FOLLOW A MARKET?

Pick a result.
Let the protocol handle the rest.

View markets Explore the pool

World Cup prediction markets powered by TxLINE free-tier data and an AMM on Solana.