Transaction Flow
This section explains how a user can buy or sell Pokémon cards on the Solana-based trading terminal, including how the bid/ask order book works and how SOL payments and ownership tracking are handled.
1. Buying a Card
Select a Card
The user searches for a Pokémon card using filters such as name, set, rarity, condition, or price.
The card page displays current asks (sell orders) and price history charts.
Place a Bid or Buy at Ask
The user can either place a bid (offer to buy at a specific price) or buy at the lowest ask.
The system checks if the bid matches any existing ask.
SOL Payment
Payment is made directly via the user's connected wallet (Phantom, Solflare).
SOL is either:
Transferred immediately to the seller (on-chain transaction), or
Locked in an escrow smart contract until ownership/delivery is confirmed.
Ownership Confirmation
After payment, the user is recorded as the current owner in the database.
Optional: an NFT representing the card can be issued as proof of ownership.
2. Selling a Card
List a Card for Sale
The seller chooses the card and sets a sell price in SOL.
The order is added to the asks section of the card’s order book.
Matching Orders
When a buyer places a bid that matches the ask price, the order book engine automatically executes the trade.
Partial fills are possible if the buyer wants fewer cards than the listed amount.
Sol Transfer
The seller receives SOL either immediately or after escrow confirmation.
Transaction details are stored in the transactions table for audit and history
3. Bid/Ask Order Book Mechanics
Bids: Users’ offers to buy a card at a specific SOL price.
Asks: Users’ offers to sell a card at a specific SOL price.
Matching Rules: Orders are executed according to price-time priority:
Highest bid meets lowest ask first
If prices match, trade is executed for the agreed amount.
Order Book Updates:
Updated in real-time on the frontend via WebSocket or polling.
Users see the live bid/ask table and can react to market changes.
4. Escrow and Ownership
Escrow for Physical Cards (optional)
SOL payment is held until the seller confirms shipment or a custodian confirms delivery.
Ensures safe trading of real-world Pokémon cards.
NFT-Based Proof of Ownership (optional)
Each card can be represented by an NFT on Solana.
NFT transfer automatically updates ownership once the trade executes.
5. Summary
The transaction flow ensures:
Secure and transparent SOL payments
Real-time matching of buyers and sellers
Accurate ownership tracking for digital or physical Pokémon cards
A collector-friendly trading experience with charts, historical data, and live bid/ask updates
Last updated
