Swap

The Swap page on Tradersdex is designed to give you a fast, secure, and flexible way to exchange any two tokens, whether they’re established blue-chips (e.g., SOL, USDC, USDT) or brand-new tokens you’ve discovered. Everything you need to execute a single transaction (or a series of micro-swaps) is presented in a clean, minimal modal centered on the screen.

Key elements include:

  • Token Selectors (From/To): Choose any base token (e.g., SOL) and the counter-token you want to receive (e.g., USDC).

  • Custom Token Input: Paste a contract address for tokens not in our “Top Holdings” or “Trending” lists.

  • Trending & Top Holdings Lists: Quickly jump to the most in-demand tokens on Tradersdex or Solana.

  • MEV Protection Toggle: Enable or disable MEV‐resistant routing for that single swap.

  • Settings Icon (⚙️): Adjust slippage tolerance, priority fees (gas gas), and bribery fees (miner incentives) to suit your risk profile.

  • Swap Button: A single click (or tap) executes the trade on your connected wallet.

Below, each feature is described in its own section.


1. Token Selection Panel (“From” & “To”)

1.1 “From” Dropdown

  • Token Dropdown: Click the “From” field to open a dropdown list that shows your wallet’s current balance (e.g., SOL) at the top. Beneath that, you can scroll to pick any supported token or paste a custom address. The currently selected “From” token is shown along with your on-chain balance (e.g., “Balance: 0” and a dollar equivalent).

  • Custom Token Search Bar: At the very top of the dropdown, there’s an input labeled “Enter Custom Token.” Paste any valid SPL (Solana) contract address—if the token exists in a recognized pool, its symbol and icon will load automatically.

1.2 “To” Dropdown

  • Token Dropdown: Identical to the “From” side, this dropdown lets you select which token you want to receive. If you prefer USDC or USDT as your target, simply click their icons below the search bar for one-click selection.

  • Live Balance Display: Once a token is selected, the dropdown shows your wallet balance (e.g., “~$0.00”) to help you compute how much you can swap at most.

1.3 Swap Direction Button

  • In between the “From” and “To” panels is a swap arrow (⬇️⬆️) icon. Click this to instantly reverse the direction—what was “From SOL → USDC” becomes “From USDC → SOL,” while carrying over the same numeric input (if any).


Inside each token-selector dropdown, you’ll find pre-populated lists for convenience:

  1. Top Holdings

    • Shows the top tokens you already hold in your connected wallet, sorted by largest balance. If you have no existing balance, this section will display “No holdings found.”

    • Clicking any token here instantly populates that field (“From” or “To”) with your chosen asset.

  2. Trending on Tradersdex

    • A dynamic list of tokens that have the highest trading activity right now on Tradersdex (e.g., X-Token, Y-Token, Z-Token).

    • Each row displays the token’s icon, its symbol trimmed to 6–8 characters (e.g., “Y-Token (2qEHjd…pump)”), and a real-time price (e.g., $0.00 for brand-new mints).

    • Clicking any “Trending” token quickly selects it in the dropdown, so you don’t need to paste addresses manually.

  3. Trending on Solana

    • Similar to the “Trending on Tradersdex” list, but aggregates activity across the entire Solana ecosystem (e.g., X-Token, Y-Token, Z-Token).

    • Helps you discover hot tokens even before they’re listed on Tradersdex.

Scroll behavior: these lists are scrollable—just drag the right edge of the dropdown to see more entries. Once you select a token, the dropdown closes, and the selected token appears in the “From” or “To” panel.


3. MEV Protection Toggle

Below the “From” and “To” fields in the main swap box is a toggle labeled MEV Protection:

  • Purpose: When enabled, this routes your swap transaction through a private MEV‐resistant relay (e.g., Flashbots or a dedicated Tradersdex bundle service). This prevents front-running, sandwich attacks, or other MEV‐related slippage that can arise when broadcasting directly to the public mempool.

  • Behavior:

    • OFF (Default): Your swap goes through the normal public streaming to the blockchain.

    • ON: Tradersdex submits your trade in a private bundle. You may pay a slightly higher “bribery fee” (miner incentive) or “priority fee” (gas) to ensure inclusion by block producers—both are configurable via Settings (see next section).

  • Visual Cue: When switched “ON,” the toggle’s text changes color (e.g., from gray to teal) and a confirmation message appears (“MEV Protection Enabled”).

This toggle only applies to the single swap you’re about to perform. You can flip it back off for your next transaction. If you never toggle it on, your swap uses the default public queue.


4. Swap Settings (⚙️ Icon)

At the top-right corner of the swap box is a gear icon (⚙️). Clicking it opens a modal that lets you tailor three critical parameters for your swap:

  1. Slippage Tolerance (%)

    • A numeric input field and three quick-select buttons: 0.1%, 0.5%, 1%.

    • Slippage tolerance defines how much price movement you allow between the moment your transaction is signed and the moment it’s confirmed on-chain.

    • Example: Setting 0.5% means your swap will revert if the execution price deviates more than 0.5% from the quoted price.

  2. Priority Fee

    • A numeric input (in SOL) plus three presets: 0.001, 0.002, 0.005.

    • The “priority fee” (sometimes called the “tip”) is the amount you’re willing to pay block producers on top of the base network fee. It can help your transaction get included faster—especially useful when network congestion is high.

    • If you anticipate urgent execution (e.g., arbitrage), choose a higher priority fee. Otherwise, a smaller tip may suffice.

  3. Bribery Fee

    • A numeric input (in SOL) plus three presets: 0.01, 0.02, 0.05.

    • When MEV Protection is ON, the “bribery fee” is the amount paid directly to validators or relayers to ensure your private bundle is included in a block. A higher bribery fee typically increases the chance of quick inclusion.

    • You can leave this at the default (e.g., 0.01 SOL) or raise it if you think a particular swap is time-sensitive (e.g., flash-loan arbitrage, liquidation front-run).

Buttons:

  • Reset: Clears all fields back to the default values (Slippage: 0.5%; Priority Fee: 0.001 SOL; Bribery Fee: 0.01 SOL).

  • Apply: Saves your chosen parameters. Once you click Apply, the settings modal closes, and your swap box reflects the updated tolerances (e.g., in a small tooltip: “Slippage: 0.5% • Priority Fee: 0.001 SOL • Bribery Fee: 0.01 SOL”).


5. Swap Execution Button

At the very bottom of the centered swap box is a full-width "SWAP" button:

Behavior:

  1. Disabled State: If no tokens are selected, or if you don’t have enough balance in “From,” the button remains gray and unclickable, with a tooltip like “Insufficient Balance” or “Select Token.”

  2. Active State: Once you’ve chosen both “From” and “To,” entered an amount that’s below your wallet balance, and optionally configured MEV/Settings, the button becomes a colorful gradient( e.g., teal→pink).

  3. On Click:

    • A confirmation window (native to your wallet, e.g., Phantom or Sollet) pops up, summarizing:

      • From Amount & Token (e.g., “Swap 0.5 SOL”)

      • To (Estimated) Amount & Token (e.g., “Receive ~12.34 USDC”)

      • Slippage Tolerance (e.g., “Max 0.5%”)

      • Priority/Bribery Fee (if MEV is ON, shows both)

    • You can review gas cost estimates, then click “Approve” in your wallet to finalize.

    • Once confirmed on-chain, an on-screen toast or status bar shows “Transaction Submitted” with a link to view it on the block explorer.

Last updated