# BotRadix Documentation — English > BotRadix is a trading platform with an on-chain perpetual futures exchange (BotRadix DEX) on Base (chain ID 8453), automated trading bots (Quant and Grid) that run on connected exchanges or on the BotRadix DEX, the BAQ token, and a developer API. These docs explain how every part works, its fees, limits and risks. # BotRadix documentation > What BotRadix is, what you can do with it and where to find each answer. Source: https://docs.botradix.com/ BotRadix is a trading platform built around three products: - **BotRadix DEX** — a perpetual futures exchange on the Base network. You trade from your own wallet, with USDC and BAQ as collateral, on 150 markets: crypto, stocks, indices, commodities, currencies and synthetic cross pairs. - **Trading bots** — **Quant** (trend-following with DCA) and **Grid** (range trading), which run in your own account on the BotRadix DEX, Hyperliquid or Uniswap. - **BAQ** — the platform's token on Base, used for access tiers and as supplementary DEX collateral. These docs explain how each part works, what it costs, its limits and its risks. They describe the system as it operates today and are updated when it changes. BotRadix is live on Base mainnet and is in a deliberate consolidation phase: its contracts stay open so that features can be added and issues fixed quickly, and the plan is to seal components in stages once the system has proven stable. Version 2.2 was deployed on 11 October 2026; check source verification for each address on BaseScan. Every user can [exit directly from BaseScan](https://docs.botradix.com/exit/) and changes to the DEX router go through an on-chain advance-notice gate (current notice: 0 hours). During this phase, the administrator can change the logic of any contract at any time, without mandatory advance notice; absolute custody protection is not guaranteed. A distributed oracle network that grows with the ecosystem is planned ([Prices and oracle](https://docs.botradix.com/oracle/#roadmap)). ## Key facts | | | |---|---| | Network | Base mainnet (chain ID 8453) | | Settlement and margin asset | USDC | | DEX collateral | USDC (100%) and BAQ (limited credit in cross margin) | | Markets | 150 perpetual markets | | Maximum leverage | 100x, in tiers that decrease with position size | | Opening fee | 0.06% taker / 0.03% maker, plus the BotRadix service fee of 0.03%. Closing has no fee | | Funding | Continuous, capped at 0.03% per 8 hours (current operational policy; the contract allows at most ±1%) | | Price source | PairForge oracle: currently 3 reporters, 2-of-3 signature quorum (configurable), aggregating several exchanges | | Bot venues | BotRadix DEX, Hyperliquid, Uniswap (Base) | | Developer API | REST API v1 with scoped keys and signed webhooks | | Independent exit | Close and withdraw from BaseScan with your wallet. See [Exit without BotRadix](https://docs.botradix.com/exit/) | ## Start here ```cards Quickstart | Your first DEX trade or your first bot, step by step. | page:quickstart Key concepts | Collateral, margin, leverage, funding and liquidation in plain language. | page:concepts How the DEX works | Who you trade against, how prices are set and where your collateral is held. | page:dex-overview Fees | Every cost of trading, in one table, with examples. | page:fees Quant bot | Trend-following automation with DCA, take profit and stop. | page:quant Developers | Authentication, endpoints, trading and webhooks. | page:api ``` ## Transparency first The [Official v2.2 contract addresses](https://docs.botradix.com/security-contracts/#official-addresses) explains the fixed addresses holding the money and each component's replaceable logic, with upgrade functions and signers. **Consolidation phase with sealing planned by component; today, notice 0 h and sealed no: the administrator can change the logic at any time, without advance notice.** Protections depend on the current code. BotRadix states its design choices and their trade-offs openly: - The DEX contracts are **upgradeable** by the BotRadix administrator. Router changes go through an advance-notice gate whose notice is 0 hours today, and the cross-margin contract that holds collateral and the other logic can be upgraded immediately, without mandatory advance notice. Sealing is planned by component and inactive. See [Security and contracts](https://docs.botradix.com/security-contracts/). - Prices come from PairForge, a market-data and oracle provider, and reach Base signed by reporters operated by BotRadix. Closing a position normally requires a current signed price; if prices stop, the exit contract has time-based fallbacks. See [Prices and oracle](https://docs.botradix.com/oracle/) and [Exit without BotRadix](https://docs.botradix.com/exit/). - The DEX counterparty is a liquidity vault owned by the protocol. Every position has a maximum profit, and when the vault is at risk winning positions can be reduced or closed early (auto-deleveraging); anything liquidity cannot cover becomes a deferred payment, with no guaranteed payment or deadline. See [How the DEX works](https://docs.botradix.com/dex-overview/) and [Leverage and margin](https://docs.botradix.com/margin/). - Leveraged trading can lose your entire collateral quickly. Read [Risks](https://docs.botradix.com/risks/) before trading. ## The three sites | Site | Purpose | |---|---| | [botradix.com](https://botradix.com) | Account, bots, BAQ, forum, support and legal terms | | [app.botradix.com](https://app.botradix.com) | The DEX trading terminal and the developer API | | [docs.botradix.com](https://docs.botradix.com) | This documentation, in English and Spanish | > [!NOTE] > For AI assistants and tools: a machine-readable index of these docs is at [/llms.txt](https://docs.botradix.com/llms.txt), the complete text is at [/llms-full.txt](https://docs.botradix.com/llms-full.txt), and every page is available as Markdown by adding `.md` to its path. --- # Quickstart > From zero to your first DEX trade or your first bot, step by step. Source: https://docs.botradix.com/quickstart/ There are three ways to use BotRadix. The DEX needs only a wallet; the bots need a BotRadix account. ## Trade on the DEX **What you need:** an EVM wallet (for example MetaMask, Rabby, Coinbase Wallet, OKX Wallet, Rainbow, Trust Wallet, Phantom or Brave Wallet) on the **Base** network, with USDC on Base. Keep a small amount of ETH on Base for the few actions that require a wallet transaction, such as classic withdrawals or exit actions from BaseScan. 1. **Open the terminal** at [app.botradix.com](https://app.botradix.com) and connect your wallet. 2. **Read the risk guide and accept the Terms.** You sign the complete Terms of Use and the Privacy Policy (version 2026-10-12.2) with a free signature, not a transaction, and your PDF agreement is downloaded. 3. **Enable trading.** The first time you trade, your wallet signs a one-time authorization for a trading key kept in your browser. From then on, orders do not ask your wallet to sign each time. Under the current code, this key can trade and adjust isolated margin, but cannot authorize withdrawals. Bringing USDC from your wallet requires your wallet to sign or co-sign that specific operation, plus a permit for the exact amount. See [Signatures and trading sessions](https://docs.botradix.com/sessions/). 4. **Deposit collateral.** A USDC deposit is a single signature (EIP-2612 permit) with no gas. BAQ can also be deposited (a wallet transaction). See [Collateral, deposits and withdrawals](https://docs.botradix.com/collateral/). 5. **Open a position.** Choose a market, LONG or SHORT, the position size (minimum 18 USDC), the leverage and cross or isolated margin. Before confirming, review the fee, the liquidation price and the maximum profit. Optionally set take profit and stop loss. See [Orders and positions](https://docs.botradix.com/orders/). 6. **Manage and close.** Close all or part of a position at market or with a limit price, edit TP/SL, or add margin to an isolated position. 7. **Withdraw** free collateral to your wallet with a free signature relayed by the protocol, or a wallet transaction. Margin, prices, debt and pause conditions apply. To exit without the website, from BaseScan with the verified exit contract, see [Exit without the website](https://docs.botradix.com/exit/). > [!WARNING] > With leverage, a small price move against you can liquidate your position and lose its margin. Start small and read [Liquidation](https://docs.botradix.com/liquidation/). ## Run a bot 1. **Sign in** at [botradix.com](https://botradix.com). 2. **Connect a venue** in **Settings**: a BotRadix DEX API key, a Hyperliquid agent wallet or a Uniswap-linked wallet. See [Connecting exchanges](https://docs.botradix.com/exchanges/). 3. **Check your access tier.** On the BotRadix DEX, two Quant bots, six pairs and one Grid are free. Higher limits, and bots on Hyperliquid or Uniswap, depend on your BAQ holding. See [BAQ](https://docs.botradix.com/baq/#access-tiers). 4. **Create a bot.** Configure [Quant](https://docs.botradix.com/quant/) (at botradix.com/Quant) or [Grid](https://docs.botradix.com/grid/) (at botradix.com/Grid), start it, and optionally connect Telegram alerts. 5. **Follow it** in the Positions panel, with realized and unrealized results; its trash button can close an open position at market and remove it from BotRadix. See [History, PnL and exports](https://docs.botradix.com/history/). > [!IMPORTANT] > New account registrations are temporarily closed. Existing accounts can sign in normally, and the DEX remains open to any wallet. Stopping or pausing a bot does **not** close its positions. Manage or close them yourself when you stop automation. ## Build with the API 1. Create an API key from the **API** view of the DEX, or through the developer endpoints. 2. Read market data and your account with `/api/dex/v1`. 3. Prepare actions and sign or execute them. Start with [API overview and authentication](https://docs.botradix.com/api/). --- # Mobile app (Android) > Install the official Android app, verify it and use the DEX and bots from your phone. Source: https://docs.botradix.com/mobile/ The BotRadix app has been **read only since version 0.1.1**, and **0.1.2** remains read only. It lets you view markets, positions and bots on Android. It does not connect wallets, sign transactions, open or close positions, or manage bots. Version 0.1.2 brings the texts up to date with the v2.2 contracts and A13: the close reason of each position, orders waiting for market capacity, version 2026-10-12.2 of the Terms with its SHA-256 fingerprint, and shortcuts to **My agreement (PDF)**, to the **/Quant** and **/Grid** sections and to the exit guide, which open on the website. Always check the version and hash shown in the website's download dialog. ## Downloads and updates The app is distributed through botradix.com for Android 7.0 or later, under the package `com.botradix.app`. Check the downloadable version, file size and SHA-256 hash in the website's download dialog; the installed version appears in **Account → Updates**. 1. Open [botradix.com](https://botradix.com) and choose **Download app**. 2. Check the version and SHA-256 hash shown for that file. Do not use a hash from an older version. 3. Open the downloaded file. If Android prompts you, allow installation from your browser. Download the app only from botradix.com. To check for an update, use **Check for updates** on the Account screen or visit the website. ## What you can view - DEX markets, prices, candlestick charts and favorites; the chart supports full screen. - Equity, positions, orders and history for the DEX address linked to your account. You can also view a public address without connecting it as a wallet. - Available status and results of your Quant and Grid bots. - History and monthly summaries with costs reported by the server. - Access tiers and bot and pair capacity. Included access does not remove trading fees. Data updates through periodic reads. A saved read or a price awaiting an update does not confirm the current state or payment of a result. ## Using the app with DEX v2.2 The reference cap for new exposure is **20 times the position size in gross profit**, separate from leverage. Each position retains its applicable cap based on opening and subsequent changes; do not apply 20x to every existing position. ADL may reduce or close winning positions without valid backed TP. Deferred payments are not balance available to withdraw, and the unbacked part depends on liquidity replenishment, with no guaranteed payment or deadline. Read [Leverage and margin](https://docs.botradix.com/margin/), [Risks](https://docs.botradix.com/risks/) and [Fees](https://docs.botradix.com/fees/). Trading, authorizations and account management take place on the website. App sign-in lasts up to 8 hours and is independent of website trading sessions. Signing out (on all devices) also ends your account session on the website; it does not stop bots or revoke those authorizations. Read [Signatures and trading sessions](https://docs.botradix.com/sessions/). ## Device protection - Biometric lock on supported devices. - Screen protection enabled by default and an option to hide balances. - The app does not request wallet recovery phrases or private keys. These measures protect access on your device; they do not remove DEX risk. The v2.2 documentation describes open contracts that the administrator can change without mandatory advance notice. Read [Security](https://docs.botradix.com/security/). The app is available in English and Spanish. Registration is not enabled in the app; use an existing account or explore markets. --- # Key concepts > Wallets, collateral, margin, leverage, PnL, funding and liquidation in plain language. Source: https://docs.botradix.com/concepts/ The ideas below appear throughout BotRadix. Each one is explained in plain language, with a short example. ## Wallet and network A **wallet** (such as MetaMask or Rabby) holds your crypto assets and signs on your behalf. BotRadix DEX runs on **Base**, a low-cost Ethereum network (chain ID 8453). On Base, **USDC** is a digital dollar and **ETH** pays network fees ("gas"). A **signature** proves you approved something and costs nothing; a **transaction** changes the chain and pays a small gas fee. ## Perpetual futures A perpetual future ("perp") lets you gain or lose from a price move without owning the asset and without an expiry date. - **Long:** you profit if the price rises. - **Short:** you profit if the price falls. ## Position size and leverage The **position size** (notional) is the value your profit or loss is calculated on. **Leverage** is the size divided by the margin you commit. > **Example.** A 1,000 USDC long at 10x commits 100 USDC of margin. If the price rises 2%, the position gains about 20 USDC: 20% of the margin. If it falls 2%, it loses about 20 USDC. Leverage multiplies gains and losses in the same proportion. ## Margin - **Initial margin** is what a position commits when opened: size ÷ leverage. - **Maintenance margin** is the minimum your account must keep: on the BotRadix DEX, reference value 0.5% of the position size (adjustable between 0.1% and 5% for new exposure). ## Cross and isolated margin - **Cross:** all your free collateral backs all your cross positions together. Gains in one position support another, but one large loss affects the whole account. - **Isolated:** each position has its own margin. At most, you lose that margin; the rest of your collateral is not affected. ## Profit and loss (PnL) - **Unrealized PnL:** the result of an open position at the current price. - **Realized PnL:** the result fixed when a position (or part of it) is closed. - **Net PnL:** realized PnL after fees and funding. ## Mark price and oracle The **mark price** is the price used to value positions, execute orders and decide liquidations. On the BotRadix DEX it comes from the **PairForge oracle**, which aggregates prices from several exchanges and signs them before they are published on chain. ## Funding **Funding** is a small, continuous payment that keeps long and short exposure balanced. When more open interest is long than short, longs pay and shorts receive (and vice versa). On the BotRadix DEX the current operational policy caps it at 0.03% per 8 hours. ## Health factor and liquidation The **health factor** compares your account equity with its maintenance margin. Above 1 the account is safe; at 1 or below, positions can be **liquidated**: closed automatically to stop further losses. > **Example.** Equity of 50 USDC against a maintenance margin of 5 USDC gives a health factor of 10. If losses reduce equity to 5 USDC, the health factor is 1 and liquidation begins. ## Orders - **Market order:** executes now at the current price, within the maximum slippage you accept. - **Limit order:** executes only at your price or better. - **Stop order:** becomes a market order when a trigger price is reached. - **Take profit (TP) / stop loss (SL):** prices at which a position closes automatically to secure a gain or limit a loss. - **Slippage:** the difference between the expected price and the executed price. - **Maker / taker:** on the BotRadix DEX a limit order checked against a valid price, unable to execute and left resting is maker; everything else (market, stop and limit orders placed while the market is closed, on their first execution) is taker. Makers pay a lower fee. ## Profit cap On the BotRadix DEX every position has a **maximum profit**: at the v2.2 launch, 20 times its size for new exposure (for a long, a price 21 times higher). When the vault is at risk, winning positions can be reduced or closed early (auto-deleveraging), unless they have a valid backed take profit; anything liquidity cannot cover becomes a deferred payment. See [Leverage and margin](https://docs.botradix.com/margin/#profit-cap). ## BAQ **BAQ** is the BotRadix token on Base. Holding it unlocks higher bot limits, and it can be deposited as supplementary DEX collateral. It is a utility token, not a share in the company. See [BAQ](https://docs.botradix.com/baq/). --- # How the DEX works > Perpetual futures on Base: who you trade against, how prices are set and where your collateral is held. Source: https://docs.botradix.com/dex-overview/ BotRadix DEX is a perpetual futures exchange implemented as smart contracts on Base. You trade from your wallet, your collateral is held by the DEX contracts, and every trade settles on chain. ## Who you trade against There is no order book where traders match against each other. Positions are taken against a **liquidity vault owned by the protocol**: - Opposite positions of different traders offset each other first. - The vault backs the **net** exposure that remains, and pays or receives the result. - The vault has no external liquidity providers. With the v2.2 reference parameters, the protocol opening fee is split between the vault (90%) and the BAQ reserve (10%); the service fee is paid separately to its recipient. ## How prices are set Every market uses one price, published by the **PairForge oracle**: it is the price at which orders execute, positions are valued and liquidations are decided. There is no separate index price and no spread from a book. - A market order executes at the oracle price, within the maximum slippage you set; if the price moved beyond it, the order is rejected rather than filled at a worse price. - Synthetic cross pairs (for example ETH/BTC) are priced as the ratio of their two legs, which must be observed within 5 seconds of each other. See [Prices and oracle](https://docs.botradix.com/oracle/). ## How a trade is executed 1. You choose the market, side, size, leverage and margin mode in the terminal. 2. BotRadix validates the order against the market, your account and the contracts, and simulates it. 3. Your trading key (or your wallet) signs the order. No ETH is needed for this. 4. A protocol executor publishes the current signed price and submits your order in the same flow, paying the network gas. 5. The contracts check the price, your margin and the market limits, and open or update the position. Resting limit and stop orders, take profit and stop loss are executed later by the protocol **keeper** when their conditions are met. ## Capacity and protection limits To keep the vault solvent, the contracts reserve capacity for what traders could earn in a stress scenario (a price move of 15% to 50%, depending on each market's configuration): - New positions are accepted only while the capacity required by all markets is at most 80% of the vault, and no single market requires more than 50%. - Each market has open-interest caps and leverage tiers by position size. - If a capacity limit is reached, risk-increasing entries are rejected until there is room again. The capacity block does not itself prevent closing, but closes still require valid prices and applicable contract conditions. Every position also has a [maximum profit](https://docs.botradix.com/margin/#profit-cap). ## Paying out profits Profits are paid from the vault, then from an insurance reserve, then from an emergency reserve. - **Auto-deleveraging (ADL).** If one more sharp price move would leave the vault unable to pay, the keeper reduces or closes winning positions (within each batch, those with the largest profit relative to their size on the same side and market first), at the oracle price and without a closing fee, and stops when it falls to the target. The cap and funding apply; anything liquidity cannot cover is deferred. Positions with a valid backed take profit are not closed this way. See [Backed take profit and auto-deleveraging](https://docs.botradix.com/margin/#backed-take-profit-and-auto-deleveraging). - **Deferred payments.** If, after an extreme price gap, the vault and reserves were still insufficient, the unpaid amount would be recorded as a deferred payment, not withdrawable balance, and could only be claimed if contributions or vault income replenish its backing, with no deadline or guarantee; meanwhile the DEX blocks new risk (protected insolvency mode). ## Where your collateral is Your collateral is held by the DEX contracts on Base, credited to your wallet address: - Withdrawals are authorized by your wallet, with a transaction or a free signature, and always go to that wallet. Neither BotRadix nor your trading key can withdraw to another address under the current code. - You can close your positions and withdraw directly from BaseScan, without the website. See [Exit without BotRadix](https://docs.botradix.com/exit/). - The administrator **can** pause the DEX, put it in reduce-only mode, pause withdrawals (at most 72 hours at a time), and withdraw the vault's **free** liquidity (not traders' collateral). - The contracts are **upgradeable**: router changes go through an advance-notice gate (0 hours today) and the cross-margin contract can be upgraded immediately. The guarantees above therefore depend on BotRadix operating its administrative keys correctly. This is a temporary consolidation phase; sealing is planned by component once the system has proven stable. See [Security and contracts](https://docs.botradix.com/security-contracts/), [Smart contracts](https://docs.botradix.com/contracts/) for addresses and administrative controls, and [Risks](https://docs.botradix.com/risks/). ## Version The current contracts are **version 2.2**, live since 11 October 2026: an independent exit from BaseScan, an advance-notice gate for router changes, auto-deleveraging with backed take profit, a maximum profit of 20 times the size, parameters adjustable within limits written in the contracts, and 150 markets. See the [Changelog](https://docs.botradix.com/changelog/). --- # Collateral, deposits and withdrawals > USDC and BAQ as collateral, cross and isolated margin, and the checks behind every withdrawal. Source: https://docs.botradix.com/collateral/ Collateral is what backs your positions. The DEX accepts two assets, with very different roles. ## USDC and BAQ | | USDC | BAQ | |---|---|---| | Counts toward margin | 100% of its value | A limited credit, in cross margin only | | Absorbs losses | Yes | No; under the code in force, BAQ is not sold to cover losses | | Sold to settle trading losses under the current code | Yes | No; price and code-change risks remain | | Deposit | One signature (permit), no gas | Wallet transaction (approval + deposit) | | Withdrawal | Free signature or wallet transaction | Free signature or wallet transaction | **USDC** is the settlement asset: fees, funding, losses and profits are all in USDC. **BAQ credit.** In cross margin, deposited BAQ adds a credit to your equity equal to the **smallest** of: - 5% of the value of your BAQ at the valid oracle price discounted by its confidence; - 20% of your eligible USDC (your USDC minus what is locked in isolated positions); - what remains of the 70% usable share of the protocol's BAQ reserve after other accounts' commitments. Under the code in force, your BAQ is not sold or consumed to cover trading losses: after USDC, committed reserve backing in USDC is used. This does not remove BAQ price risk, contract failure risk or logic changes during the open phase. More details and an example in [BAQ](https://docs.botradix.com/baq/#baq-as-dex-collateral). The 5%, 20% and 70% are the v2.2 reference values. The administrator can adjust them within the limits of the code in force, and a change applies **immediately** to existing accounts: lowering the credit can bring an account that uses BAQ as margin closer to liquidation. Live credit is zero without a valid BAQ price (older than 10 seconds, session not open or confidence out of bounds); a price failure alone does not release backing already committed to a pending loss. Because BAQ does not absorb losses, losses are paid from your USDC first; if that is not enough, from the committed BAQ reserve, then the vault and the insurance reserves. ## Depositing - **USDC (recommended):** one free signature (EIP-2612 permit). A protocol executor submits the deposit and pays the gas; no separate approval is needed. - **USDC (alternative):** an exact-amount approval plus a deposit transaction from your wallet, with gas in ETH. - **BAQ:** an exact-amount approval plus a deposit transaction from your wallet. Deposits are credited to the wallet that made them. ## Withdrawing Under the code in force, a withdrawal is authorized by your wallet and sends the funds to that same wallet; trading keys and sessions have no withdrawal permission. During the open phase the administrator can change this logic without mandatory advance notice (0 hours); the addresses holding the money are fixed, but their behaviour is replaceable. You can authorize it in two ways: - **Free signature (recommended).** You sign a message; a protocol executor submits the withdrawal with fresh prices in the same transaction and pays the gas. No ETH needed. - **Wallet transaction (classic).** You send the withdrawal yourself; it needs a little ETH on Base for gas. A withdrawal is accepted only if, **after** it: 1. your account equity still covers the initial margin of your cross positions plus the margin reserved by resting orders; 2. there is enough USDC for pending fees, funding and any debt; 3. prices meet the valuation rules for the cross positions. Ordinary valuation requires fresh prices (at most 10 seconds old); frozen or emergency markets use their fixed price and funding index. A closed market can restrict ordinary withdrawals. The terminal checks all of this before asking for your signature, and prices for your open markets travel in the same transaction as the withdrawal. If the withdrawal would leave too little free margin, it shows **"Not enough free margin to withdraw this amount. Withdraw less or close positions."** Margin locked in an isolated position, and refundable order bonds, return to your free collateral when the position or order is closed. > [!NOTE] > The administrator can pause withdrawals for safety (for example during an incident). A pause lasts at most **72 hours** and another one can only start after **24 hours** without a pause; the contracts enforce it. While paused, the terminal shows when withdrawals resume. If the website is unavailable, see [Exit without BotRadix](https://docs.botradix.com/exit/). ## Cross and isolated margin | | Cross (default) | Isolated | |---|---|---| | Margin | Shared by all cross positions | Separate for each position | | BAQ credit | Counts | Does not count | | Liquidation | Decided at account level | Decided per position | | Maximum loss | Your cross collateral | That position's margin | An account can hold cross positions on up to 32 markets at the same time. The opening fee of an isolated position is charged from your free USDC. ## How much can I withdraw? Free collateral is estimated from equity, committed margin, order reserves, fees, funding and debt. BAQ credit is not withdrawable USDC. The terminal estimate can change before execution; the contract checks the actual state when the withdrawal is executed. --- # Orders and positions > Market and limit orders, take profit and stop loss, partial closes, inversion and size limits. Source: https://docs.botradix.com/orders/ ## Order types | Type | How it executes | |---|---| | Market | Immediately, at the oracle price, if it is within your maximum slippage. Otherwise it is rejected. Always immediate-or-cancel | | Limit | Only at your price or better. If it can execute when created, it executes immediately; otherwise it rests until the price is reached | | Stop | Becomes a market execution when the trigger price is reached | Time-in-force options are GTC (good till cancelled), IOC (immediate or cancel) and FOK (fill or kill). **Post-only** is available for limit orders. Stop-limit and trailing orders are not available. ## Slippage Market orders require a maximum slippage. The terminal uses the saved slippage preference for opens and inversions: 8% by default, adjustable up to 10%. The inversion API permits up to 20% and uses 1% when omitted. Slippage limits the accepted price: a lower value protects your price but makes rejection more likely in fast markets; it does not ensure execution. ## Size limits - Minimum position size: **18 USDC** on the markets of the v2.2 catalogue (per-market configuration; the code's technical minimum is 1 USDC). - Maximum size: limited by the market's leverage tiers and open-interest caps (see [Leverage and margin](https://docs.botradix.com/margin/)). - Each market defines its own price tick and quantity step, read from the contracts. ## Account limits To bound valuation and closing work, each wallet can have at most the following. These limits do not guarantee quick execution: | Limit | Value | |---|---| | Markets with cross positions | 32 | | Open positions | 128 | | Open entry orders (resting limit and stop orders) | 256 (v2.2 reference value, adjustable between 32 and 1,000) | If you reach the limit of open orders, new orders are rejected until some execute or are cancelled; existing orders are not affected. ## Resting orders A resting limit or stop order reserves its margin, its opening fee and a refundable bond of **0.025 USDC** (v2.2 reference value; the code caps it at 1 USDC) until the order terminates, including cancellation or invalidation. Large resting orders execute in fills of up to 100,000 USDC each (v2.2 reference value; fill-or-kill orders are not clipped). Resting orders are executed by the protocol keeper; this requires a one-time **execution permission**, granted with a free signature, with a small per-execution fee (see [Fees](https://docs.botradix.com/fees/#execution-permission)). ## Positions A position is identified by its market, side, margin mode and leverage. You can hold a long and a short on the same market at the same time (for example, with different leverage or margin modes); orders with the same characteristics add to the same net position. Reduce-only is not accepted when opening. ## Take profit and stop loss - For a long, take profit must be above the current price and stop loss below it; the opposite for a short. - When triggered, they close the **whole** position at market. - When you set a take profit, the vault tries to reserve capacity for its profit within the cap. While a **backed** take profit remains valid, its position is excluded from auto-deleveraging; backing is not a payment guarantee in every scenario. The confirmation window tells you whether your take profit is backed. See [Backed take profit and auto-deleveraging](https://docs.botradix.com/margin/#backed-take-profit-and-auto-deleveraging). - Editing TP/SL with your trading key does not ask for a wallet signature, and up to 200 edits per day are free of gas (v2.2 reference value, adjustable between 1 and 2,000). ## Closing - Close at **market** or with a **limit** price, for any part of the position (from 0.01% to 100%). The terminal offers 5, 10, 20, 50, 75 and 100% shortcuts. - A limit close is a reduce-only order that rests until executed; one per position. - If a partial close would leave less than the market's minimum position size (18 USDC in the v2.2 catalogue; its market's current minimum applies), the whole position is closed. The confirmation window warns you before you sign. - Closing has no protocol fee today. The current code allows a closing fee of up to 0.10%; confirmation shows an estimate and a pending order pays the fee in force when it executes; auto-deleveraging, exits, emergencies and liquidations never pay it. Your realized result, minus funding, is settled into your collateral. ## Inverting **Invert** closes a position (or part of it) and opens the opposite side in one atomic step, paying the opening fee (and the service fee) on the opened part. If you already hold an opposite-side position with the same key (market, margin mode and leverage), the inverted part joins that net position instead of opening another, and the leverage tier is checked on the resulting size; if it does not fit, the whole inversion is rejected. In that case the inversion returns the id of the existing net position: on chain there is no new `DexPositionOpened`, but a `DexPositionChanged` of that net position. On markets with V2 risk rules the opened part is executed committed to a price observed after your order, so the inversion goes through your trading key (or the API's delegated route with a protocol executor); without it, the terminal asks you to enable it (`INVERT_NEEDS_AGENT`). ## Isolated margin For an isolated position you can: - **Add margin** (the "Margin +" button), moving its liquidation price further away. Only free USDC can be used: if your cross positions need that USDC, the action is rejected with a clear message. - **Withdraw margin**, as long as the margin left still covers size ÷ leverage plus the position's unrealized loss and the funding it owes (profits do not count). It needs a price no older than 10 seconds, and the DEX and that market must be open to new risk. - **Change leverage.** Lowering it adds the margin needed. Raising it is allowed up to the maximum of the tier for the position's current size, and returns only the margin left over under the same rule as a withdrawal. Your trading key can do all of this without a wallet pop-up; the protocol pays the gas. Margin only moves between your account and your own isolated positions, never outside the DEX. **With a cross market in a closed session.** If a market of your cross account has its session closed (for example, an index at the weekend), your DEX balance cannot be valued and cannot be used as isolated margin. The margin of an isolated open or of "Margin +" then comes from your wallet: the contract pulls the margin (for a market open, plus 0.30% of the size for the largest fees; for a limit or stop order, plus 0.31% of the size and the order bond, 0.025 USDC as the v2.2 reference value; whatever is not spent stays as DEX balance) and uses it in the same transaction. Your wallet signs that specific operation: it co-signs it together with your trading key, or signs it itself if you do not use a trading key; a trading session cannot do it. When BotRadix relays it, you also sign a USDC permit for that exact amount (free, no gas); the contract pulls only that amount and the permit is left at zero. The confirmation window explains the signatures before they open. If your wallet lacks enough USDC it is rejected (`WALLET_MARGIN_BALANCE_REQUIRED`); "Margin +" without a trading key, `WALLET_MARGIN_NEEDS_AGENT`. The money of your cross positions is never used while it cannot be valued, and when the session reopens your DEX balance is used again. ## Cancel and replace Resting orders can be cancelled or replaced with your trading key, without a wallet signature. --- # Leverage and margin > Leverage tiers, initial and maintenance margin, health factor and the per-position profit cap. Source: https://docs.botradix.com/margin/ ## Leverage tiers Leverage goes from 1x to 100x. The maximum depends on the market group and on the **size of the resulting position**: the larger the position, the lower the maximum leverage. Maintenance also limits it: 2 × maintenance (in basis points) × leverage ≤ 10,000; for example, 5% maintenance permits at most 10x. Markets, tiers, open-interest caps and stress scenarios are readable market configuration: the table describes the catalogue deployed with v2.2 and the administrator can change it. | Market group | Markets | Up to 100x | Up to 50x | Third tier | Above | Open-interest cap per market | |---|---|---|---|---|---|---| | BTC and ETH | 2 | 10,000 USDC | 50,000 USDC | 25x up to 250,000 USDC | 10x | None | | Major crypto (multi-source prices) | 70 | 2,000 USDC | 10,000 USDC | 20x up to 50,000 USDC | 10x | 250,000 USDC | | Other crypto and traditional assets | 64 | 1,000 USDC | 5,000 USDC | 20x up to 20,000 USDC | 10x | 50,000 USDC | | BAQ markets | 14 | 200 USDC | 1,000 USDC | 20x up to 5,000 USDC | 10x | 10,000 USDC | **Example.** On BTC, a 30,000 USDC position can use up to 50x; above 50,000 USDC the maximum is 25x. If an order would exceed a tier, an open-interest cap or the available liquidity capacity, the terminal tells you before you sign (`LEVERAGE_TIER_EXCEEDED`, `OPEN_INTEREST_CAP` or `LIQUIDITY_CAPACITY`). The leverage of an existing isolated position can be raised up to the maximum of the tier for its current size. These tiers apply to every way of trading: the terminal, trading sessions, signed orders and the API. ## Initial and maintenance margin | | Formula | Example: 1,000 USDC at 10x | |---|---|---| | Initial margin | size ÷ leverage | 100 USDC | | Maintenance margin | 0.5% of size (each market can have its own value, between 0.1% and 5%) | 5 USDC | The maintenance margin of a position is fixed when it is opened: if the value of a market changes later, it applies only to new positions and to what you add to existing ones. ## Equity and health factor Your cross-margin **equity** is: ```text equity = eligible USDC (USDC balance − USDC locked in isolated positions) + unrealized PnL (losses in full; each position's profit counted up to the smaller of its cap and its size × its credit percentage) − pending fees − funding owed − debt + BAQ credit ``` A position can earn more than 100% of its size when it is closed (see [Profit cap](https://docs.botradix.com/margin/#profit-cap)), but while it is open its profit only counts as cross margin up to its credit percentage (at launch, 100% of size), so your margin does not rely on profits the vault might not be able to pay. The percentage is taken at opening, blended by size on increases and never below the live value: lowering it does not cut old exposure you do not increase; raising it also helps existing positions. **Example:** opening 1,000 USDC with credit at 100% and adding another 1,000 with the parameter at 50% gives a blended 75%. Margin available to open also deducts committed margins and order reserves. The **health factor** is equity divided by the total maintenance margin of your cross positions: - Above **1.25**: healthy. - Between **1** and **1.25**: warning; the account is close to liquidation. - **1 or below**: positions can be liquidated. An isolated position is evaluated on its own: it can be liquidated when its margin plus its PnL, minus funding, falls to its stored maintenance (reference value: 0.5% of its size) or less. See [Liquidation](https://docs.botradix.com/liquidation/) for the liquidation price and process. ## Profit cap Every position has a gross **maximum profit**: at the v2.2 launch, **20 times its size** for new exposure. A long reaches it only if the price rises to 21 times its entry while the position is open; a short can never earn more than its size anyway (its price cannot fall below zero). The cap is fixed when the position is opened and applies to both unrealized and realized profit. The administrator can change it for new exposure within the limits of the code in force (between 1 and 20 times the size); a cap above 1 time the size is only allowed while auto-deleveraging and backed take profit are active, and the code enforces this. An increase adds the new tranche's cap under the live parameters; a reduction shrinks the cap proportionally; a parameter change alone does not reprice open exposure. These rules depend on the code in force and any rollback conditions. The cap of each position is shown in the API as `protocol_profit_cap_usdc`. Positions opened before 11 October 2026 keep the cap they were opened with until they are closed; what you add to them afterwards uses the new cap. | Position | Initial margin | Maximum profit | |---|---|---| | 1,000 USDC at 100x | 10 USDC | 20,000 USDC (+2,000% of size) | | 1,000 USDC at 10x | 100 USDC | 20,000 USDC (+2,000% of size) | | 1,000 USDC at 2x | 500 USDC | 20,000 USDC (+2,000% of size) | > [!IMPORTANT] > The cap says how much a position can earn; it is not a promise that the vault can always pay it. Large profits are protected by auto-deleveraging, which can reduce or close a position early (see below), and as a last resort by deferred payments, which can only be claimed if their backing is replenished, with no guaranteed deadline. ## Backed take profit and auto-deleveraging The vault is the counterparty of every position, and it is small compared with the maximum profits it could owe. Two mechanisms keep large profits payable. **Backed take profit.** When you set a take profit, the vault reserves capacity for its profit within the cap, if that room is available: - Reserving is free while the take profit is within the market's stress scenario (market configuration; a 15% move on most markets of the v2.2 catalogue); farther targets reserve extra capacity. - With the v2.2 reference values, **extra** capacity for one position does not exceed 20%, and total extra capacity 40%, of vault liquidity excluding the deferred-payment reserve. These are not percentages of the entire reserve or a payment guarantee, and capacity may change between preview and execution. - If the room is not available, the position still opens (or the take profit is still set) and the confirmation window tells you, before you sign, the farthest take profit that could be backed. - While backing remains valid, **its position is excluded from auto-deleveraging**; TP, size or state changes may re-evaluate it. Closing settles funding and costs and, after extreme gaps, may leave part as a deferred payment. - An order that joins a position with a backed take profit re-evaluates that backing. If it cannot be backed again (for example, the price gapped past the take profit) and the market would end above its share of the vault or the vault above its admission ceiling, **the whole order is refused** for vault capacity (`LIQUIDITY_CAPACITY`) and nothing changes. The preview does not always anticipate it. - Removing or changing a take profit without opening more is **not blocked by this capacity check**, even if it leaves the market above its share. The vault is then protected by the new-risk block on over-utilisation and, if needed, by auto-deleveraging. **Auto-deleveraging (ADL).** With the v2.2 reference values, ADL arms when reserved capacity (including each market's stress scenario) reaches 100% of vault liquidity excluding the deferred-payment reserve, and stops when it falls to 90% of that liquidity. Trigger and target are adjustable parameters; the effective trigger cannot be below the admission ceiling plus 5 percentage points. While armed, the keeper reduces or closes positions: - It selects winning positions without a valid backed take profit, at the valid oracle price; within each batch, among positions on the same side and market, those with the **largest profit as a percentage of their size** come first. Batch validation does not guarantee a global ranking of all winners. - No closing fee and no penalty. The profit cap applies and funding is settled; a cross gain first offsets outstanding cross debt; the net is paid from available liquidity and any uncovered part is deferred. Immediate payment of the entire gross gain is not guaranteed. - It only closes positions that are in profit and earn at least the average of their side in that market. Positions with a backed take profit are not closed. - The contract checks every ADL close on chain: ADL is armed, eligibility, ordering within the batch and that the close reduces reserved capacity. > **Purely hypothetical example.** A 34 USDC long at 100x commits 0.34 USDC margin; a linear 14% rise produces 4.76 USDC gross profit before funding and caps. This does not calculate an ADL threshold or certify the vault balance: ADL depends on aggregate exposure, stress, backing and effective liquidity. With a larger vault, the same position runs further before ADL acts. ADL can close your position when you did not ask for it, so you lose any further gain. If you want a profit target to be honoured, set a take profit and check in the confirmation window that it is backed. --- # Liquidation > When a position is liquidated, how the liquidation price is calculated and how to avoid it. Source: https://docs.botradix.com/liquidation/ Liquidation closes a position when its equity reaches maintenance or falls below it. It limits further exposure under the contract rules; it does not guarantee protecting the remaining collateral or vault from losses. ## When it happens - **Cross positions:** when the account's health factor reaches 1 or less, that is, when equity falls to the total maintenance margin (0.5% of the size of your cross positions, or the market's own value if it has one). - **Isolated positions:** when the position's margin plus its PnL, minus funding, falls to its maintenance margin (0.5% of its size, or the market's own value) or less. The maintenance margin of a position is fixed when it is opened. See [Leverage and margin](https://docs.botradix.com/margin/#initial-and-maintenance-margin). The terminal warns you when the health factor drops below 1.25. ## Liquidation price **Isolated positions.** The price can move against you by roughly: ```text distance ≈ 1 / leverage − 0.5% (maintenance) ``` | Leverage | Approximate adverse move to liquidation | |---|---| | 5x | 19.5% | | 10x | 9.5% | | 25x | 3.5% | | 50x | 1.5% | | 100x | 0.5% | This is a linear approximation with no funding or margin changes and 0.5% maintenance. Opening and service fees are paid separately from isolated margin and do not reduce it. The actual price depends on funding (funding paid while the position is open moves the liquidation price closer), margin additions or withdrawals, the maintenance stored in the position, market orientation and rounding. **Cross positions.** The liquidation price depends on your whole account. For a single cross position, approximately: ```text long: liquidation price ≈ entry × (1 − (cross collateral − maintenance) / size) short: liquidation price ≈ entry × (1 + (cross collateral − maintenance) / size) ``` > **Example.** A 1,000 USDC short entered at 100, with 200 USDC of cross collateral and a 5 USDC maintenance margin: liquidation ≈ 100 × (1 + 195 / 1,000) = 119.5. Adding collateral moves it further away; withdrawing collateral moves it closer. The terminal estimates liquidation prices from available account data. Prices, funding, margin and other positions can change before execution; the estimate is not a guaranteed execution price. ## What happens at liquidation Since version 2.1, a liquidation is a **single execution that closes the whole position** at the current oracle price. | | Isolated position | Cross position | |---|---|---| | Loss covered by | That position's margin | Your free USDC collateral | | Penalty | With the v2.2 reference values, the remaining margin of the position (split 90% to the vault and 10% to the BAQ reserve); penalty and split are adjustable in the current code. In practice the full isolated margin is lost | No additional penalty; losses are collected under the collateral rules | | Settlement scope under the current code | Position margin; fees are charged separately | Shared collateral; other positions can also reach liquidation | If a cross loss exceeded your USDC, the excess would be covered by the committed BAQ reserve and then by the vault. Under the code in force, your deposited BAQ is not sold to cover losses; this does not remove BAQ price risk or the risk of logic changes during the open phase. ## Who liquidates The protocol **keeper** monitors positions and executes liquidations with current signed prices. The liquidation function is public (anyone may call it for a liquidatable position) and pays no reward. Liquidations never charge an execution fee. Liquidation requires a current oracle price for the market. While a market is closed (`SESSION_CLOSED`), ordinary opens, closes and liquidations that need an open-session price are suspended. Challenge, freezing and emergency procedures have their own rules and allow closes at fixed prices when their conditions are met. A fixed market (frozen or in an emergency) counts in your account's health, in every calculation, at its fixed price and funding index, never at the live oracle price. Closing a session alone does not stop valid funding. ## Auto-deleveraging is not a liquidation Auto-deleveraging (ADL) also closes positions without your request, but for the opposite reason: it reduces or closes **winning** positions when the vault is at risk, without a closing fee or penalty. The profit cap applies and funding is settled; the net is paid from available liquidity and any uncovered part becomes a deferred payment, so immediate payment of the entire gross gain is not guaranteed. See [Backed take profit and auto-deleveraging](https://docs.botradix.com/margin/#backed-take-profit-and-auto-deleveraging). ## How to avoid it - Use lower leverage: the table above shows how quickly high leverage reaches liquidation. - A **stop loss** can reduce exposure before liquidation, but its execution and price depend on the oracle, the keeper and market conditions. - Add collateral (cross) or margin (isolated) when the health factor approaches 1.25. - Remember that withdrawing collateral moves cross liquidation prices closer. - Watch funding on long-held positions. > [!CAUTION] > In fast markets the price can jump past your stop loss or liquidation price. A liquidation is final. --- # Funding > The continuous payment that balances long and short exposure: formula, cap, direction and examples. Source: https://docs.botradix.com/funding/ Funding is a small, continuous charge or credit on open positions that rewards the side that balances the market. It is calculated per second and quoted as a rate per 8 hours. ## How the rate is calculated The rate depends on the imbalance between long (L) and short (S) open interest of the market: ```text funding rate (per 8 h) = (L − S) / (L + S) × 0.03% ``` - The rate is capped at **0.03% per 8 hours** (3 basis points), reached only when all open interest is on one side. This 0.03% is the current operational policy, configured in the oracle reporters and the website; the contract does not impose it and it can be adjusted. The contract separately enforces its absolute limit of ±1% per 8 hours. - A positive rate means **longs pay and shorts receive**; a negative rate, the reverse. - Payments go to and come from the protocol's liquidity vault, which is the counterparty of the net exposure. - There is no separate borrowing fee. ## Examples | Situation | Rate per 8 h | 1,000 USDC long | 1,000 USDC short | |---|---|---|---| | L = 600,000, S = 400,000 | +0.006% | pays 0.06 USDC | receives 0.06 USDC | | L = 400,000, S = 600,000 | −0.006% | receives 0.06 USDC | pays 0.06 USDC | | Only longs | +0.03% (cap) | pays 0.30 USDC | — | At the cap, a long held for 30 days pays about 0.03% × 3 × 30 = 2.7% of its size. ## When it is paid Funding accrues continuously and is settled when the position is reduced or closed. It counts in your equity while the position is open, so it gradually moves the liquidation price. ## Freshness of the rate The funding rate of each market is published by the oracle and is currently valid for 2 hours; the protocol republishes it regularly. To open or increase risk, the DEX requires a valid rate at most 2 hours old; if a market's rate expires, new positions there are blocked until a fresh rate is published. Accrued funding follows the source index when available; the contract's fallback only accrues the last rate over a 2-hour window. The contracts also enforce an absolute limit of ±1% per 8 hours. The validity period (between 15 minutes and 8 hours) and the absolute limit (between 0.01% and 1% per 8 hours) can be adjusted by the administrator within those bounds written in the code in force; each observation keeps the validity it was published with, and lowering limits does not rewrite funding already accrued. If a market is settled because it received no prices (see [Exit without BotRadix](https://docs.botradix.com/exit/)), or during an emergency, freezing the market also fixes its funding index, and closes use that index. ## Where to see it The terminal shows each market's current rate per 8 hours and the time to the next update. Your positions show the funding accumulated, and closed positions record the funding paid or received. Through the API, use `GET /markets/{pair_id}/funding` and the `funding.charged` / `funding.credited` webhooks. --- # Fees > Every cost of trading on the DEX, in one table, with examples. Source: https://docs.botradix.com/fees/ ## DEX fees at a glance | Cost | Amount | Notes | |---|---|---| | Opening fee, taker | **0.06%** of position size | Market, stop and limit orders without maker status | | Opening fee, maker | **0.03%** of position size | Limit orders checked against a valid price, unable to execute and left resting. A limit order placed while the market is closed or without a valid price pays taker on its first execution; after a partial fill, its remainder may pay maker | | Closing fee | **None** | No protocol fee to close, fully or partly. The current code allows up to 0.10%, shown as an estimate before you sign; auto-deleveraging, exits, emergencies and liquidations never pay it | | Funding | Up to **0.03% per 8 h** (current operational policy; the contract allows at most ±1%) | Paid or received; see [Funding](https://docs.botradix.com/funding/) | | BotRadix service fee | **0.03%** of position size, on opens and increases | Charged by the contracts only with your valid signed consent (recipient, maximum and expiry), which the terminal requests once. If the fee exceeds your permission, the open is rejected. Never on closes, TP/SL or liquidations. The current code caps it at 0.20% | | Resting order bond | **0.025 USDC** per resting entry order | Refunded when the order terminates, including cancellation or invalidation. Adjustable v2.2 reference value; the code caps it at 1 USDC | | Keeper execution of resting orders and TP/SL | **0.10 USDC** per execution, at most 10 USDC per day | Only if you granted the execution permission (see below). Backend defaults, configurable within your signed permission | | Liquidation (isolated) | The position's remaining margin (v2.2 reference value; penalty adjustable between 0% and 100%) | Split 90% to the vault and 10% to the BAQ reserve. Cross liquidations carry no additional penalty; see [Liquidation](https://docs.botradix.com/liquidation/) | | Network gas | Mostly paid by the protocol | See the gas table below | The protocol opening fee rounds up to the smallest USDC unit and, with the v2.2 reference parameters, is split 90% to the liquidity vault and 10% to the BAQ reserve (BAQ share adjustable between 0% and 50%). This split excludes the service fee, calculated separately and paid to its configured recipient. These are the reference values for v2.2 deployed on 11 October 2026. The administrator can adjust them within the limits of the code in force (opening fees: maker ≤ taker ≤ 0.10%; closing fee: at most 0.10%; service: at most 0.20%) and every change is public on Base. Confirmation shows an estimate using the parameters available when it is prepared; a resting order pays the fees in force at each execution, which may change after signing. Accepting the terms does not freeze these figures; while the contracts are open, the administrator can also change the code itself. See [Security and contracts](https://docs.botradix.com/security-contracts/#funds-permissions-and-risks). **Examples** - Open a 1,000 USDC position with a market order: 0.60 USDC opening fee + 0.30 USDC service fee = 0.90 USDC. - Open the same position with a limit order that was maker (checked against a valid price and left resting): 0.30 USDC + 0.30 USDC = 0.60 USDC. - Close it: 0 USDC in protocol fees. Your result is settled with the funding accrued. ## Network gas Base gas cost varies with the network and the ETH price; it is usually small, but there is no guaranteed fixed USD amount. | Paid by the protocol (no ETH needed) | Paid by your wallet in ETH | |---|---| | Opening, closing and inverting positions with your trading key | Classic withdrawals sent from your wallet | | TP/SL edits (up to 200 per day) and cancel/replace | BAQ deposits | | USDC deposits with a permit signature | USDC deposits with approval + deposit | | Keeper executions, auto-deleveraging and liquidations | Revoking authorizations from your wallet | | Isolated-margin changes with your trading key (add, withdraw, change leverage) | TP/SL edits beyond 200 per day | | Withdrawals by signature | Exit actions from BaseScan | | Granting or revoking the execution permission by signature | | The protocol funds its gas from a USDC budget fed by part of the vault's fee income. ## Execution permission Resting limit and stop orders are executed later by the protocol keeper. To allow it, you grant an **execution permission** once (a free signature that the protocol submits for you; the website prepares it for 365 days by default and it can also be revoked with a free signature; it is not the same as accepting the terms). With it, each keeper execution of your resting orders, take profit or stop loss costs **0.10 USDC**, taken from your collateral, with a maximum of **10 USDC per day** (defaults; the cost can never exceed what your signature allows). Without the permission, resting orders are not executed by the keeper, and take-profit or stop-loss executions are covered by the protocol at no charge to you. ## API and session executions When you open or close positions through a signed intent (API v1 integrations or a trading session), the executor's network cost is charged in USDC from your collateral and shown beforehand in `execution.costs`. ## Bots | Venue | BotRadix fee | Other costs | |---|---|---| | BotRadix DEX | None for the bot itself. Gas is included | DEX opening fees (including the 0.03% service fee) and funding. Minimum: the market's minimum plus a 0.5% buffer (with an 18 USDC market minimum, 18.09 USDC; the screen may round it to 18.10) | | Hyperliquid | None | Hyperliquid's own trading fees and funding | | Uniswap (Base) | **0.10%** of each swap's amount (the service fee of the BotRadix adapter contract) | **0.02 USDC** of execution gas per swap (at most 20 USDC a day), the pool fee of each swap, and price impact. Details below | ### Uniswap (Base) Each bot swap on Uniswap pays two amounts to BotRadix, on top of the pool fee and price impact: - **Service fee: 0.10%** of the amount going into the swap. The BotRadix adapter contract deducts it from the token you give before the swap. The administrator can change it (the adapter code caps it at 1%), but a swap never pays more than the maximum fee you signed when you authorized the bots: if the fee rises above it, swaps stop until you sign again. - **Execution gas: 0.02 USDC** per swap, charged from your USDC to pay the gas of the executor that sends the transaction. It is a fixed amount: it does not change with the real gas cost of each swap. At most 20 USDC per day (UTC). With the single signature in Settings, the administrator sets the amount on chain and your signature sets the caps (at most 0.10 USDC per swap and 20 USDC a day): if the amount exceeded your caps, the swap would not execute. If you authorized the bots without the single signature, exactly the amount you signed (0.02 USDC) is charged, with 20 USDC a day for 365 days. **Example.** A 100 USDC swap pays 0.10 USDC of service fee and 0.02 USDC of execution gas, plus the pool fee (0.05 USDC on a 0.05% pool). On a 10 USDC swap, the 0.02 USDC of gas is 0.2%. The current values are shown in **Settings → Uniswap** before you sign. ## Platform pricing BotRadix has **no subscription and no performance fee**. Access to more bots and pairs is unlocked by holding BAQ (you keep your tokens; nothing is spent). See [BAQ](https://docs.botradix.com/baq/#access-tiers). --- # Prices and oracle > PairForge reporters, quorum, price freshness and synthetic cross pairs. Source: https://docs.botradix.com/oracle/ Every price used by the BotRadix DEX comes from **PairForge**, a market-data and oracle provider. The same price is used to execute orders, value positions and decide liquidations. ## How a price is produced 1. **Collection.** Reporters read prices from several sources: Hyperliquid, Binance, Bybit, OKX, Gate and KuCoin, with USD references from Coinbase, Kraken, Bitstamp, Gemini and Binance.US. 2. **Signing.** Today there are three reporters. A price is valid on chain only when at least **two of the three** reporters signed it (a 2-of-3 quorum). This is configuration: PairForge accepts three to sixteen reporters with a strict majority. 3. **Publication.** Signed prices are published to the PairForge hub contract on Base, together with each market's funding rate. 4. **Use.** The DEX contracts read the price from the hub at the moment of each action and check its age and confidence. The reporters are operated by BotRadix. ## Freshness and confidence | Rule | Limit | |---|---| | Maximum age of a price to be used on chain | 10 seconds | | Valuing, closing and liquidating (exits) | At least two matching readings, at most 10 seconds old | | Opening or increasing risk | A price observed at or after the committed action, at most 10 seconds old, with confidence within the market group's limit | | Synthetic pairs | Both legs observed at most 5 seconds apart | | Pre-trade check in the terminal | Market data at most 8 seconds old and within 1.5% of the reference price (terminal defaults). Self-exit after 24 hours and frozen markets have their exceptions; see [Exit without BotRadix](https://docs.botradix.com/exit/) | Prices are published when they are needed: every action of the terminal, the keeper and the bots publishes current prices first, in the same flow. ## Synthetic cross pairs Markets such as ETH/BTC, GOLD/BTC or AVAX/DOT are priced as the ratio of their two legs, each measured in USD: ```text price(A/B) = price(A in USD) / price(B in USD) ``` They trade as a single position, settled in USDC. ## Market sessions A market can be closed administratively (`SESSION_CLOSED`), for example if its data sources become unreliable. While closed, ordinary opens, closes and liquidations that need an open-session price are suspended; it is not a fixed trading-hours schedule. Pending limit orders may remain, and their first execution pays taker. Challenge, freezing and emergency procedures have their own rules, and closing a session alone does not stop valid funding. If a market with positions stops receiving prices, anyone can open a challenge on chain; if no new observation arrives within 3 days, the market freezes at its last observed price and its positions can be closed at that price. A public emergency requires opening another challenge while positions exist and waiting 72 hours: an observation of USDC or of a market with positions since the challenge opened (even with a closed session) prevents confirmation. The administrator may declare the emergency without this wait. See [Exit without BotRadix](https://docs.botradix.com/exit/). ## Security and scalability ### Today - **Independent validation on every signature.** Before signing, each reporter checks the proposal against its own market observations. If the price does not match within its confidence margin, it does not sign, and it never signs two different versions of the same round. - **On-chain checks.** The PairForge hub verifies the signatures, the quorum and the age of every price before accepting it. - **Rotation and revocation.** BotRadix can replace the whole reporter set in a single operation, checked on chain, and instantly revoke a compromised reporter. While the contracts are open these changes take effect immediately; with a future sealing with notice, adding reporters would wait for the notice and only revoking would stay instant. See [Security and contracts](https://docs.botradix.com/security-contracts/#funds-permissions-and-risks). ### Room to grow The oracle hub contract on Base supports up to **16 reporters**, with a quorum that must always be a **strict majority** (more than half). Growing the network from today's 3 reporters to 5, 7 or 9 is an administrator configuration step: it requires no change to the contract code. | Reporters | Signatures required per price | Reporters that can fail without interrupting prices | |---|---|---| | 3 (today) | 2 | 1 | | 5 | 3 | 2 | | 7 | 4 | 3 | | 9 | 5 | 4 | | 16 (maximum) | 9 | 7 | ### Roadmap Planned as ecosystem usage grows; not yet in place: 1. **Separate infrastructure.** Spread the reporters across different servers, providers and regions, each with its own network connection and its own mix of market sources. 2. **More reporters.** Grow the network to 5 reporters with a quorum of 3, then to 7 or more. 3. **Independent references.** Cross-check the prices of the main assets against public third-party oracles (for example Chainlink or Pyth) before signing them. 4. **Extreme volatility.** Filters against price jumps not confirmed by several sources, and regular stress tests with historical market episodes. 5. **Independent operators.** In the long term, open the reporter network to operators outside BotRadix. Each phase will be announced in the [Changelog](https://docs.botradix.com/changelog/) when it is applied. ## What this means for you - Orders fill at the oracle price, not at a book price; your maximum slippage protects you from adverse moves between preparation and execution. - If current prices cannot be published (for example during a data or network incident), actions that need them, including closes and withdrawals with open cross positions, wait until prices are available again. - See [Risks](https://docs.botradix.com/risks/#oracle-and-data-risk). --- # Markets > The 150 markets by category, their parameters and how new markets are listed. Source: https://docs.botradix.com/markets/ The BotRadix DEX lists **150 perpetual markets**, all margined and settled in USDC. ## Categories | Category | Markets | Content | |---|---|---| | Crypto | 50 | Major and mid-cap crypto assets quoted in USDC | | Multi-asset | 18 | Ten stocks, S&P 500, Nasdaq 100, gold, silver, platinum, natural gas, euro and pound | | Synthetic | 82 | Cross pairs priced as the ratio of two assets, including EUR and GBP crosses and BAQ pairs (for example GOLD/BTC or AVAX/DOT) | The Nasdaq 100 market is listed on chain as **XYZ100** and appears in the terminal as **NASDAQ · Nasdaq 100**. ## Market parameters Each market defines on chain: - its leverage tiers and open-interest cap, by market group (see [Leverage and margin](https://docs.botradix.com/margin/#leverage-tiers)); - its price tick and quantity step; - the minimum position size (18 USDC on every market). Read these values from the terminal or from `GET /api/dex/v1/markets` rather than assuming them; they can be adjusted. ## Listing new markets New markets are added by the BotRadix administrator with an on-chain configuration plan, once the asset has reliable price sources in PairForge and a current price on the oracle hub. Markets that are visible but not yet enabled for trading are shown as **view only**. ## Market data - Charts in the terminal, from 1-minute to weekly candles. On 1D and 1W the history continues before BotRadix's own price feed with data from established sources (Coinbase, Bitstamp, Binance and Bitfinex for crypto; Nasdaq, CBOE, the ECB and tokenized gold for stocks, indices, currencies and gold), up to 50,000 candles. The chart names the source of that older history. - Current price, 24-hour high, low and DEX trading volume (opens, increases and closes, liquidations included), open interest, funding rate and time to the next funding update. - Through the API: `/markets`, `/summaries`, `/candles`, `/markets/{pair_id}/funding` and `/markets/{pair_id}/open-interest` (see [API reference](https://docs.botradix.com/api-reference/)). --- # Signatures and trading sessions > What your wallet signs, your trading key, trading sessions and how to revoke them. Source: https://docs.botradix.com/sessions/ BotRadix asks your wallet for two kinds of approval, and it is worth knowing which is which. | Free signatures (no gas, no transaction) | Wallet transactions (gas in ETH) | |---|---| | Accepting the Terms of Use and the Privacy Policy | Withdrawing collateral (classic withdrawal) | | Downloading your PDF agreement again | | | Authorizing your trading key | Depositing BAQ | | Depositing USDC with a permit | Depositing USDC with approval + deposit | | Starting a trading session (fallback) | Revoking authorizations from your wallet | | Developer session for API keys | Exit actions from BaseScan (see [Exit without BotRadix](https://docs.botradix.com/exit/)) | | Granting or revoking the execution permission | | | Withdrawing collateral by signature (the protocol submits it; the funds go to your wallet) | | ## Your trading key To trade without a wallet pop-up for every order, the terminal creates a **trading key** in your browser and your wallet authorizes it once with an EIP-712 signature (a "DexAgent" grant). | | | |---|---| | Can | Open, close and invert positions; set and edit TP/SL; cancel and replace orders; add or withdraw isolated margin and change its leverage | | Cannot | Withdraw or move funds outside the DEX. It can only move margin between your account and your own isolated positions. With a cross market in a closed session it can bring USDC from your wallet into the margin of an isolated position of yours only if your wallet co-signs that specific action (a free signature binding the amount, the position, the trading key and a 2-minute window), plus the USDC permit for that exact amount; never more (see [Orders and positions](https://docs.botradix.com/orders/)) | | Who submits its actions | Only the protocol's executors, which also pay the gas | | Validity | 180 days by default in the terminal (the contract allows grants up to 2,000 days; bot keys use up to 1,999 days) | | Per action | Each signed action must execute before its deadline and no more than 120 seconds after it is signed; the contract rejects deadlines beyond 10 minutes. The terminal prepares a 90-second lifetime by default | | Rate limits | 30 actions per minute and 300 per hour per wallet (configurable backend controls, not contract limits) | If your wallet is a contract (smart wallet), every action re-checks the grant against your wallet's current signer: if you change it, the old grant stops working and the terminal asks you to sign it again. The key is stored only in that browser. On a shared or untrusted computer, revoke it when you finish. **Revoking.** You can revoke one trading key or all of them at any time from the terminal (a wallet transaction). Revoking an API key also retires its trading key. After revoking, the next trade asks for a new authorization. ## Trading sessions (fallback) If a trading key is not available, the terminal can use a **trading session** of 8, 24 or 72 hours: a signature that lets the protocol relay your orders during that time (the 24- and 72-hour options carry a 15-minute allowance). A session cannot withdraw funds, expires after at most 3 days (a limit the administrator can set between 1 hour and 30 days), uses the same leverage tiers as the trading key (up to 100x), and its executions carry a small network-cost charge in USDC, shown before you confirm. A session **cannot bring USDC from your wallet**. If an operation needs margin from your wallet (a cross market in a closed session), the terminal does not use the session: your wallet signs that specific operation, even with an active session. > [!NOTE] > A session signs the fingerprint of the contract code it authorizes. When an upgrade changes that code (such as the version 2.2 upgrade or the October 2026 wallet-authorization improvement), sessions created before it stop working and the terminal tells you and asks you once to sign a new one. Trading keys and bots are not affected. ## Terms and risk guide - Before your first action, the terminal shows a **risk guide** (also every fifth visit, and on demand from **DEX settings**). - You accept the **complete BotRadix Terms of Use** (sections 1 to 26, including the DEX sections) and the **Privacy Policy** (current version 2026-10-12.2) with three confirmations and a free signature, valid for your wallet. The message you sign includes the SHA-256 fingerprint of the exact text of both documents, the same one the legal pages show. When the texts change, the terminal asks you to accept the new version once; earlier acceptances remain valid for their version. Choosing "Not now" disconnects the wallet. - Right after signing, your **BotRadix User Agreement in PDF** is downloaded: three pages: English and Spanish with the key clauses quoted, the exact message you signed, the signature and how to verify it without relying on BotRadix, and a third, bilingual **User Safeguards** page that summarizes, with their sections, the protections described in the Terms (exit without the website, your wallet authorizes your money, public record on Base, planned sealing and contact). Copies issued before this page keep their two pages. Its only personal data are your wallet and your signature. You can download it again with **Download again** or from **DEX settings → My agreement (PDF)**: your wallet signs a free one-use message and you only ever receive your own agreement. ## Good practice - Always check that you are on **app.botradix.com** before connecting or signing. - Read what your wallet asks you to sign. BotRadix never asks for your seed phrase or for the private key of your main wallet (the only private key it accepts is that of a dedicated Hyperliquid agent wallet, if you connect Hyperliquid). - A trading key or session can lose money through trades and, under the code in force, cannot withdraw your collateral or bring USDC from your wallet without your wallet's signature for that operation. During the open phase the administrator can change this logic without mandatory advance notice (0 hours). - If you suspect your browser or computer is compromised, revoke all trading keys and API keys immediately. --- # Quant bot > How the Quant bot enters, adds with DCA, takes profit and records results. Source: https://docs.botradix.com/quant/ Quant is a rules-based, trend-following bot. It watches one or several markets, enters when price crosses its moving average in the direction you chose, adds to the position on confirmed pullbacks (DCA), and closes the whole position when the trend turns against it with at least your minimum profit, or when your stop is reached. You will find it under **Quant Engine**, at [botradix.com/Quant](https://botradix.com/Quant) (the old `/Futures` address redirects there). ## Where it runs | Venue | Market type | Notes | |---|---|---| | BotRadix DEX (default) | Perpetual futures on Base | Connected with a DEX API key. Cross margin, network gas included, minimum 18.10 USDC per order. Cross pairs such as BTC/ETH trade natively as one position | | Hyperliquid | Perpetual futures | Connected with a dedicated Agent Wallet. Hyperliquid rejects orders below 10 USD | | Uniswap (Base) | Spot | Long only, 1x, no funding and no liquidation. Linked wallet with revocable on-chain limits | See [Connecting exchanges](https://docs.botradix.com/exchanges/) for how each venue is connected. ## How it decides Signals are calculated on **closed candles** of the chosen timeframe, using PairForge market data (with the venue's own data as fallback). Orders are always executed on your venue, in your account. - **Entry.** A LONG bot enters when a closed candle crosses above the EMA; a SHORT bot enters when it crosses below. It only enters a market where the bot has no open position and your account has no other exposure on that market. - **Adding (DCA).** The bot adds to the position only when all of these hold: price has moved against the position by at least the configured trigger (from the average entry for the first DCA, from the previous DCA for the next ones); a closed candle crosses the EMA in the position's direction again; the position is not already at the profit target; and the configured number of DCA steps has not been used. - **Take profit.** There is no resting take-profit order. The whole position closes when a closed candle crosses the EMA **against** the position **and** the profit at that close is at least your minimum profit. - **Stop ("Close %").** The whole position closes at market when the live price moves against the entry by at least the configured percentage. The engine closes whole positions. If a close fills only partly, the remainder stays open until the next valid trigger. ## Parameters | Parameter | Default | Range and notes | |---|---|---| | Pairs | — | One or several markets; one side (LONG or SHORT) per bot | | Amount per pair | — | In USDC, as position size (notional). Leverage changes the margin, not the size | | Leverage | — | Integer from 1, capped by each market's maximum | | EMA period | — | Required | | Timeframe | 15m | 5m, 15m, 1h, 4h, 1d. 1m and 3m require a BAQ holding of at least 10,000 USD | | Minimum profit | 1% | Minimum 0.02% (2.30% on Uniswap) | | Close (stop) | 3% | 0.01% to 2000% | | DCA steps | 1 | 0 disables DCA | | DCA amount per step | Entry amount | — | | First DCA trigger | 1% | Adverse move from the average entry | | DCA spacing | 1% | Between consecutive DCA steps; can be set per step | The bot checks its markets every 10 seconds on the 1m timeframe, every 30 seconds on 3m and every 60 seconds otherwise. ## Synthetic pairs Quant can trade the ratio between two assets, such as GOLD/BTC or ETH/BTC: - On the **BotRadix DEX** these cross markets trade natively as a single position. - On **Hyperliquid**, which has no A/B markets, the bot runs the pair with orders on its two coins: 2 to enter and 2 to exit, with the signal calculated on the PairForge ratio. Before starting it, open a LONG position on Hyperliquid in the source coin (B for a LONG A/B bot, A for a SHORT one), at least for the bot's amount. The bot uses that position as its base and rotates it into the other coin; the terminal shows which coin each pair needs. ## Managing a running bot | Action | Effect | |---|---| | Pause | Keeps the configuration and positions. **While paused, the bot takes no automatic action at all, including take profit and stop.** | | Resume | Restarts automatic management | | Add (DCA) / Reduce | Manual add, or reduction by a USDC amount | | Close all / Emergency close | Closes the position at market | | Stop | Removes the bot. **Open positions are not closed automatically**; they remain in your venue account | Two bots of the same account cannot trade the same market, and Quant and Grid cannot automate the same asset on the same venue at the same time. You can also close an open position at market and remove it from BotRadix from the trash button of the Positions panel; the bot keeps running. See [History, PnL and exports](https://docs.botradix.com/history/#trash-close-and-remove-an-open-position). ## Results and alerts Results are recorded per position with gross and net profit. Funding is not part of the strategy logic; it is booked as a cost in net PnL. Trading fees and slippage reduce the result. See [History, PnL and exports](https://docs.botradix.com/history/). Alerts for entries, DCA steps, take profit, stop and closes can be sent to Telegram (a chat ID or a channel). ## Access The number of Quant bots and pairs you can run depends on your access tier (see [BAQ](https://docs.botradix.com/baq/#access-tiers)). On the BotRadix DEX the first tiers are free and do not require BAQ. ## Risks to understand - Trend-following strategies lose money in sideways, choppy markets (repeated entries and exits). - DCA increases the position size as price moves against you; together with leverage, it increases the risk of liquidation. - The stop is executed at market and can fill worse than the configured level in fast markets. - A paused bot does not protect its positions. If you pause a bot with open positions, manage them yourself. - See [Risks](https://docs.botradix.com/risks/) for the complete list. --- # Grid bot > Range trading on the BotRadix DEX, Hyperliquid and Uniswap: levels, profits and risks. Source: https://docs.botradix.com/grid/ Grid is a range-trading bot. It places a ladder of price levels around a reference price and trades each crossing: it sells into rises and buys into falls, so it earns from price oscillating inside the range. You will find it under **Grid**, at [botradix.com/Grid](https://botradix.com/Grid) (the old `/GlobalPendingOrders` address redirects there). ## How the levels are built The bot takes an anchor price (normally the market price when the grid starts) and builds geometric levels above and below it: ```text level n = anchor × (1 + spacing)^n n = …, −2, −1, +1, +2, … ``` Levels above the anchor are funded with the base asset and levels below with USDC (the quote asset). A small hysteresis prevents a tiny bounce from immediately reversing a level that was just traded. **Short grids.** A short grid mirrors a long one on the same levels: it also sells the base asset on each rise and buys it back on each fall, but short. It starts short the base asset for the amount of the quote levels (the USDC ones, below the anchor); each fall buys one level back, so it is flat at the lowest level, and each rise sells one more level until it is short the whole amount at the highest. The base-asset levels (above) are the room it has left to sell. **Example.** With an anchor of 100, a spacing of 1% and 3 levels per side, the levels are approximately 101, 102.01 and 103.03 above, and 99.01, 98.03 and 97.06 below. ## Where it runs | Venue | Market type | Notes | |---|---|---| | BotRadix DEX (default) | Perpetual futures on Base | Runs through your DEX API key. Each level needs at least 19 USDC: the DEX order minimum is 18 USDC, and the 1 USDC cushion covers the 0.05% margin the bot sizes each order with and normal price movement between quoting and signing, so no level falls below the minimum. Cross pairs are built from two USDC legs | | Hyperliquid | Perpetual futures | Leverage, long or short direction. At least 16 USDC per level | | Uniswap (Base) | Spot | 1x, spot only. Spacing of at least 2.30% | On asset/USDC markets the bot keeps a mesh of resting orders on the venue. On two-asset synthetic pairs it places no resting orders: each level crossing confirmed by PairForge rotates both legs. ## Parameters | Parameter | Default | Range and notes | |---|---|---| | Total amount | 1,000 USDC | Split across the levels | | Leverage | 5 | 1 to 50; fixed at 1x on Uniswap | | Spacing | 0.5% | 0.05% to 25%; at least 2.30% on Uniswap | | Levels per side | 4 + 4 | 1 to 100 per side; up to 59 in total on Uniswap | | Direction | Long | Long or short; Uniswap is spot | If the amount per level would fall below the venue minimum, the bot automatically uses fewer levels. ## How profit is calculated The bot keeps an average-cost inventory per asset: - **Realized profit** on each reduction = (price − average cost) × quantity (reversed for short grids), minus fees. - **Unrealized profit** = (current price − average cost) × open quantity. ## Managing a running grid | Action | Effect | |---|---| | Activate / Update | Starts the grid or applies new parameters | | Stop | Stops trading. **Existing positions and inventory are not closed** | | Close inventory | Closes only the inventory that belongs to this grid | | Delete | Removes the grid configuration | Only one live automation can run per asset and venue; Quant and Grid cannot automate the same asset on the same venue at the same time. The trash button of the Positions panel does the same as **Close inventory** and, once the venue confirms the position at 0, removes the grid. See [History, PnL and exports](https://docs.botradix.com/history/#trash-close-and-remove-an-open-position). ## Access Grid availability depends on your access tier (see [BAQ](https://docs.botradix.com/baq/#access-tiers)). On the BotRadix DEX, one grid is included in the free tiers. ## Risks to understand - In a strong trend the grid keeps buying into a falling market (or selling into a rising one) and accumulates inventory on the losing side. - With leverage, accumulated inventory can be liquidated. - Every trade pays fees; very tight spacing can produce many trades whose fees exceed the captured moves. - Stopping a grid does not reduce your exposure; close the inventory if you want to exit. - See [Risks](https://docs.botradix.com/risks/) for the complete list. --- # Connecting exchanges > Supported venues, the API permissions to grant and how your keys are protected. Source: https://docs.botradix.com/exchanges/ Bots trade in **your own account** on the venue you connect. BotRadix stores the connection details encrypted and uses them only to place, manage and close the bot's orders. Connections are managed in **Settings** on botradix.com. ## Supported venues | Venue | What you provide | What the connection can do | |---|---|---| | BotRadix DEX | A DEX API key with automated execution enabled for bots | Open, manage and close bot positions on your DEX account. It **cannot withdraw** funds | | Hyperliquid | Your main account address and the private key of a **dedicated Agent Wallet** | Trade on your Hyperliquid account. Hyperliquid agent wallets cannot withdraw | | Uniswap (Base) | A wallet linked with a free signature, plus on-chain authorizations you set when starting a bot | Spot swaps within the limits you authorized | ## BotRadix DEX 1. Open the DEX at [app.botradix.com](https://app.botradix.com) with your wallet and go to the **API** view. 2. Create a key. One wallet signature creates it and authorizes it for bots ("Automated execution" and "Enable for bots"). 3. Copy the key, which is shown only once, and paste it in **Settings → BotRadix DEX** on botradix.com. Bots on the DEX have network gas included and a per-order minimum equal to the market minimum plus a 0.5% buffer (with an 18 USDC minimum, 18.09 USDC; the screen may round it to 18.10). Disconnecting the key stops the bots; open positions stay on your DEX account. See [Signatures and trading sessions](https://docs.botradix.com/sessions/) and [API overview and authentication](https://docs.botradix.com/api/). ## Hyperliquid 1. In Hyperliquid, create a dedicated **Agent Wallet** (also called an API wallet) for BotRadix. 2. In **Settings → Hyperliquid**, enter your main account address and the agent's private key. Use an agent wallet created only for BotRadix, never your main wallet's private key. If you enter the agent's own address, BotRadix resolves the owner account automatically. BotRadix charges no fee on Hyperliquid; only Hyperliquid's own fees apply. ## Uniswap (Base) 1. Link your EVM wallet in **Settings** with a free signature (no transaction). 2. When you start a bot, approve the on-chain authorizations it asks for: a token allowance and per-market limits per trade and per day, maximum slippage and an expiry. These authorizations are on-chain and revocable at any time from your wallet. Uniswap trading is spot only (1x): no leverage, no funding and no liquidation. Each bot swap pays the BotRadix service fee (0.10% of the swap amount) and 0.02 USDC of execution gas from your USDC (at most 20 USDC a day), plus the pool fee. Neither can exceed the limits you sign. See [Fees](https://docs.botradix.com/fees/#uniswap-base). Extra protections on every bot swap, enforced by the contracts: - **Second signature.** Each swap also needs the signature of a BotRadix co-signing service, kept separately from the key that sends it, so a single stolen executor key cannot trade (co-signing and its co-signers are configuration verifiable on chain). Without an available co-signer, Uniswap bots (including their stop-losses) wait until one returns. - **Price safety band.** With the v2.2 reference configuration, a swap is rejected if the pool price is more than 10% away from the pool's 30-minute average price (3% when the backup co-signer signs); the code caps the band at 25%. Your maximum slippage is applied separately as a minimum amount received, so stop-losses can still sell in falling markets; no band guarantees stop-loss execution. - **Rate limits.** With the v2.2 reference configuration, at most 240 swaps per hour per wallet and market (the code allows up to 3,600), and at least 20 seconds between a buy and a sell on the same market. - **Best pool.** Each swap uses the pool that gives you the most after its fee, not the one with the most liquidity. ## How your credentials are protected - Secrets (API keys and agent private keys) are **encrypted at rest** and decrypted only in memory at the moment they are used. - They are never shown again in full: the interface displays a masked version (first and last characters). - A connection cannot be changed or removed while bots or positions depend on it, to avoid leaving positions unmanaged. - Account passwords are stored as one-way hashes, and two-factor secrets are encrypted. ## Permissions to grant Grant only what trading requires: - Trading and read access: **yes**. - Withdrawals: **no**, whenever the venue allows you to disable them. - Do not trade manually on the same markets the bots manage; manual changes can make the bot's records diverge from your real positions. > [!TIP] > Use a dedicated agent wallet or key for BotRadix. If you stop using BotRadix, revoke it on the venue as well as in Settings. --- # History, PnL and exports > How results are recorded and reported, and how to export them. Source: https://docs.botradix.com/history/ ## Positions panel (botradix.com) The **Positions** panel gathers the activity of your Quant and Grid bots and your Uniswap positions, refreshed every few seconds: - Open positions with unrealized PnL. - Realized PnL for today, this month and in total, with a monthly archive. - Grouping by strategy, venue or market. - **Net** and **gross** results: a result is shown as gross while its fees or funding are still being confirmed, and as net once all costs are known. - Positions closed outside BotRadix are labelled **external close**. - You can hide entries from your view; the audit record is kept. - Optional sound alerts. ### Trash: close and remove an open position In the **All open positions** list, the trash button of a Quant or Grid bot position closes it at market and removes it from BotRadix. It is not a new trading path: it does the same as **Close full position at market** in the Quant section or **Close inventory** in the Grid section. - **Before you confirm**, BotRadix queries the venue and shows you what will happen: the side, quantity, estimated PnL and estimated fee. Nothing is sent until you confirm. - **Quant:** the full market close is sent; once the venue confirms the position at 0, it is removed from the BotRadix record. The bot **keeps running** and that pair starts again from zero. - **Grid:** the Grid **stops** and its inventory is closed at market; its configuration **is only removed** once the venue confirms the position at 0. The trade history is kept. - **If the position no longer exists on the venue** (it was closed outside BotRadix), no order is sent: BotRadix checks again before removing it and, if the position reappears, nothing is removed. That PnL is not added to the history. - **Cases the panel does not handle**: if a position can only be managed from its own section (for example, some closed outside BotRadix), the window tells you so and does nothing; close it from **/Quant** or **/Grid**. - A market order may fill at a different price because of slippage and pays the venue's fees; on Uniswap, the sale stays within your configured maximum slippage and pays the BotRadix fee and gas. - Keep the panel open while it is processing. If a step needs your action or fails, the panel explains it and does not treat the position as closed. ## Charts Each bot and market has a chart that marks entries, DCA steps, reductions and closes, with the average price, the profit target, net PnL, the fee of each fill and, for synthetic pairs, the ratio. A measuring tool helps read distances and percentages. ## DEX history and export In the DEX terminal, the history lists your closed positions and liquidations with full detail, and can be exported to **CSV** or **XLSX** (up to 10,000 rows). The export includes, for each position: open and close dates (UTC), market, side, margin mode, leverage, size, entry and exit prices, PnL, funding, fees, net result, status, position ID and transaction hash. All DEX activity is also recorded on chain and can be verified on [BaseScan](https://basescan.org). ## How results are calculated - **Quant:** the result of each closed position, from execution prices, minus trading fees; funding is booked as a cost in net PnL. - **Grid:** an average-cost inventory per asset. Each reduction realizes (price − average cost) × quantity, minus fees. - **DEX:** realized PnL is calculated by the contracts at the oracle price, capped by the position's maximum profit, with fees and funding shown separately. --- # BAQ > The BAQ token on Base: contract, decimals, uses in BotRadix and public data. Source: https://docs.botradix.com/baq/ BAQ is the BotRadix token on Base. Holding BAQ unlocks higher bot limits on the platform, and BAQ can be deposited on the DEX as supplementary collateral. ## Token facts | | | |---|---| | Network | Base (chain ID 8453) | | Contract | `0x1B9f61483Dd6710E1Ad3b9d0bb92b710F1BA56B5` | | Name and symbol | BAQ | | Decimals | 18 | | Total supply | 5,000,000,000 BAQ (fixed maximum) | | Explorer | [BaseScan](https://basescan.org/token/0x1B9f61483Dd6710E1Ad3b9d0bb92b710F1BA56B5) | > [!CAUTION] > Always verify the contract address above before buying or receiving BAQ. Tokens with the same name at other addresses are not BAQ. ## Access tiers Bot limits depend on the **USD value of the BAQ you hold** in your linked wallet. Nothing is spent or locked: you are not buying a plan, and if you sell your BAQ your limits adjust. | BAQ value (USD) | Quant bots | Total pairs | Grid bots | |---|---|---|---| | 20 | 1 | 1 | 0 | | 50 | 1 | 3 | 0 | | 100 | 2 | 6 | 1 | | 150 | 2 | 10 | 1 | | 250 | 3 | 15 | 1 | | 400 | 4 | 20 | 2 | | 600 | 5 | 30 | 2 | | 800 | 6 | 40 | 3 | | 1,000 | 8 | 50 | 4 | | 1,500 | 10 | 75 | 5 | | 2,000 | 15 | 100 | 8 | | 10,000 | 30 | 300 | 20 | - **Free on the BotRadix DEX:** the 20, 50 and 100 USD tiers (up to 2 Quant bots, 6 pairs and 1 Grid) are available without BAQ for bots that trade on the BotRadix DEX. - Bots on **Hyperliquid** or **Uniswap** require a verified BAQ value of at least 20 USD; Grid requires the 100 USD tier. - The 10,000 USD tier also unlocks the 1-minute and 3-minute timeframes for Quant. - Limits count every active bot of the account. ## How the value is checked 1. Link your wallet in **Settings** with a free signature (the request expires after 5 minutes). One wallet per account. 2. The value is your BAQ balance multiplied by a conservative price: the lower of the current PairForge price and 1.05 times the median of up to thirteen available valid 5-minute closes (with no closes, the current price is used). 3. The balance is re-read every 30 minutes by default (a configurable interval), and immediately when you start or resume a bot or refresh manually. A failed query may temporarily keep the last verified tier. If a successful check shows your tier going down, extra Quant bots are paused and extra Grids are stopped; **no position is closed automatically**. After the value rises again, resume them manually. ## BAQ as DEX collateral Depositing BAQ on the BotRadix DEX adds **extra margin in cross margin**; under the code in force your BAQ is not sold to cover losses: - **Extra margin.** Your BAQ adds a credit to your equity of up to **5% of its value**, with two limits: 20% of your eligible USDC and what remains of the 70% usable BAQ reserve after other accounts' commitments. The value uses the valid oracle price discounted by confidence. - **Your BAQ is not sold to cover losses.** The code in force does not sell or consume your deposited BAQ: if a loss exceeds your USDC, the part covered by the credit is paid in USDC from committed reserve backing. This does not remove BAQ price risk, contract failure risk or administrator logic changes during the open phase. - **Lower liquidation risk.** The credit adds to your equity, so your cross positions have more room before reaching the liquidation level. - **Public values with limits in the contract.** The 5%, the 20% and the 70% maximum use of the reserve are the v2.2 reference values, readable on chain. The administrator can adjust them within the limits of the code in force of the CrossMargin contract (at most 20%, 50% and 90%), every change is public on Base, and it applies immediately to existing accounts. Sealing is planned by component and inactive: the profile without administration freezes these values, but with a gate and a committed minimum of at least 72 hours the code permits reductions with notice, including for existing accounts. - **Reserve capacity.** With the v2.2 reference configuration, 10% of opening fees and isolated liquidation penalties goes to the BAQ reserve. The split is adjustable. Payments of backed losses can reduce it, so activity does not guarantee more available credit; check its balance and commitments. | Example (with enough reserve) | Amount | |---|---| | USDC deposited | 1,000 USDC | | BAQ deposited | Conservative value of 5,000 USDC (valid price discounted by confidence), with sufficient reserve backing | | 5% of the BAQ value | 250 USDC | | 20% of the USDC | 200 USDC | | BAQ credit (the smaller) | **200 USDC** | | Equity for cross margin | 1,200 USDC | The credit needs a valid BAQ price from the oracle (10 seconds old or less, open session and accepted confidence) and applies only to cross margin: isolated positions use only their own margin. See [Collateral](https://docs.botradix.com/collateral/#usdc-and-baq). ## Public data | Endpoint | Content | Limit | |---|---|---| | `GET https://botradix.com/api/public/baq-market?interval=1h&limit=200` | BAQ/USDC candles from PairForge. Intervals 1m, 5m, 15m, 1h, 4h, 1d, 1w; limit 3 to 3,000 | 180 requests per minute per IP | | `GET https://botradix.com/api/public/baq-metrics` | Liquidity and 24-hour volume (DexScreener, with GeckoTerminal as fallback; cached 30 seconds) | 90 requests per minute per IP | The BAQ page on botradix.com also shows holders (from public explorers) and the on-chain supply. ## Nature of BAQ BAQ is the utility token of the BotRadix ecosystem: its value lies in what it lets you do on the platform, from unlocking more automation to adding margin on the DEX. It is not a share in BotRadix and gives no right to dividends or yield. Like any crypto asset, its price can move sharply. See the [Terms](https://botradix.com/terms) (section on BAQ) and [Risks](https://docs.botradix.com/risks/). --- # API overview and authentication > Base URL, API keys, scopes, wallet-signed developer sessions and key management. Source: https://docs.botradix.com/api/ The BotRadix DEX API (version 1) lets a server, bot or integration read market data and one wallet's account, and prepare or execute trading actions for that wallet. It is a JSON API over HTTPS. ## At a glance | Item | Value | |---|---| | Base URL | `https://app.botradix.com/api/dex/v1` (the same API also answers on `https://botradix.com/api/dex/v1`) | | Network | Base mainnet, chain ID `8453` | | Format | JSON, UTF-8. Request bodies up to 48 KiB | | Authentication | An API key bound to one wallet, with scopes | | Version headers | `X-BotRadix-API-Version: v1` and `X-BotRadix-API-Schema: botradix-dex-api-v1.1` | | Request tracing | Every response carries `X-Request-ID`; you can send your own (8–80 characters of `A-Z a-z 0-9 . _ : -`) | | Browser access | Same-origin only. Call the API from your server, never from a public web page | > [!IMPORTANT] > An API key is a secret that can act on your wallet's DEX account within its scopes. Keep it on a server or in a secrets manager. Never embed it in a website, a mobile app or a public repository. ## Two kinds of credentials BotRadix separates **managing** credentials from **using** them: 1. **Developer session.** Proves that you control a wallet. You get it by signing a text message with that wallet; this is free and sends no transaction. A session lasts **4 hours** and is used only to create, rotate and revoke API keys and to manage webhooks. 2. **API key.** Used by your server or bot for every `/api/dex/v1` call. Each key belongs to exactly one wallet and has its own scopes, expiry, rate limits and an optional IP allowlist. A trading API key cannot manage other keys, and a developer session cannot call the trading API. ## Sending the API key Send the key in the `X-BotRadix-API-Key` header: ```bash curl https://app.botradix.com/api/dex/v1/account \ -H "X-BotRadix-API-Key: $BOTRADIX_API_KEY" ``` `Authorization: Bearer ` is also accepted. If both are present, `X-BotRadix-API-Key` wins. Keys start with `BRX`. Without a key the API answers `401 API_KEY_REQUIRED`. See [Errors, limits and versioning](https://docs.botradix.com/api-errors/) for every authentication error. ## Getting a developer session 1. Ask for a challenge for your wallet. It expires after 5 minutes. 2. Sign the returned `message` exactly as received, with `personal_sign` (a plain message signature, not a transaction). 3. Exchange the nonce and signature for a developer session. ```bash # 1. Challenge curl -X POST https://app.botradix.com/api/dex/developer/challenge \ -H "Content-Type: application/json" \ -d '{"wallet":"0xYourWallet"}' # → {"success":true,"wallet":"0x…","message":"…","nonce":"…", # "expires_at":"…","network":"Base","chain_id":8453} # 2. Sign "message" with the wallet (personal_sign). # 3. Session curl -X POST https://app.botradix.com/api/dex/developer/session \ -H "Content-Type: application/json" \ -d '{"wallet":"0xYourWallet","nonce":"…","signature":"0x…"}' # → {"success":true,"wallet":"0x…","developer_session":"brxds1.…", # "expires_at_ms":…,"developer":{…}} ``` The challenge text names the wallet, the host, the network (Base, 8453), the nonce and the expiry, so it cannot be replayed elsewhere. After five wrong signatures the challenge is discarded. All key and webhook management calls then use `Authorization: Bearer `. ## Creating an API key ```bash curl -X POST https://app.botradix.com/api/dex/developer/keys \ -H "Authorization: Bearer $DEVELOPER_SESSION" \ -H "Content-Type: application/json" \ -d '{ "label": "market-maker-01", "scopes": ["market:read", "account:read", "trade:prepare"], "expires_in_days": 90, "ip_allowlist": ["203.0.113.10"] }' ``` | Field | Rules | |---|---| | `label` | A name for your own reference | | `scopes` | Any of the scopes below. Unknown scopes are ignored; if none is valid the request fails. If omitted, the key receives every scope except `collateral:manage` | | `expires_in_days` | 1 to 2000. Default 180 | | `ip_allowlist` | Optional list (or comma-separated string) of IP addresses or CIDR ranges. Requests from other addresses get `403 IP_NOT_ALLOWED` | | `quotas` | Optional per-key rate limits, within the caps in [Errors, limits and versioning](https://docs.botradix.com/api-errors/) | The response (`201`) contains the full key in `api_key`. **It is shown only once.** A wallet can hold up to **10 active keys**. > [!NOTE] > Keys created from the **API** view of the DEX terminal are "bot-ready": the wallet also signs a one-time trading-agent grant, and the key receives the default scopes. To choose scopes yourself, create the key through the API as shown above. ## Scopes | Scope | Allows | |---|---| | `market:read` | Markets, candles, summaries, funding, open interest, order book and vault data | | `account:read` | The key's wallet: account, positions, orders, collateral, transactions, trades, history and execution status | | `trade:prepare` | Preparing opens, closes, inversions, TP/SL updates and isolated-margin changes | | `trade:execute` | Delegated execution through `/orders/execute`, when an executor is bound to the key | | `orders:manage` | Cancelling and replacing orders, and TP/SL primitives in delegated execution | | `collateral:manage` | Preparing collateral deposits and withdrawals | Give each key only the scopes it needs. ## Managing keys and webhooks | Method | Path | Purpose | |---|---|---| | POST | `/api/dex/developer/challenge` | Message for the wallet to sign | | POST | `/api/dex/developer/session` | Verifies the signature and returns a 4-hour developer session | | GET | `/api/dex/developer/keys` | Lists the wallet's keys (up to 64) | | POST | `/api/dex/developer/keys` | Creates a key | | POST | `/api/dex/developer/keys/prepare` | Step 1 of a bot-ready key: a new trading agent and the grant the wallet signs once. Nothing is created until that signature is sent with `POST /keys` (valid 30 minutes) | | POST | `/api/dex/developer/keys/{key_id}/rotate` | Issues a new secret. The previous secret stops working immediately | | PUT | `/api/dex/developer/keys/{key_id}/expiry` | Sets the validity from now: 30, 90, 360 or 2000 days | | POST | `/api/dex/developer/keys/{key_id}/agent` | Creates (or returns) the key's trading agent and the grant to sign | | POST | `/api/dex/developer/keys/{key_id}/agent/grant` | Stores the wallet's signed agent grant after verifying it | | PUT | `/api/dex/developer/keys/{key_id}/executor` | Binds the key to one executor for delegated execution | | POST | `/api/dex/developer/keys/{key_id}/execution-payment` | Prepares a transaction for the wallet to sign; managing keys never grants spending rights by itself | | DELETE | `/api/dex/developer/keys/{key_id}` | Revokes the key (and its agent). Safe to repeat | | GET | `/api/dex/developer/audit` | Audit log of credential activity | | GET, POST | `/api/dex/developer/webhooks` | Lists or creates webhook subscriptions | | DELETE | `/api/dex/developer/webhooks/{webhook_id}` | Disables a webhook subscription | Developer routes are limited to 10 requests per second per IP address. ## Security checklist - Use one key per bot or service, so you can revoke one without stopping the others. - Grant the minimum scopes, set an expiry and, if your server has a fixed IP, an IP allowlist. - Store keys in a secrets manager or environment variables, never in code or logs. - Rotate keys periodically and immediately if you suspect a leak; revoke keys you no longer use. - Verify webhook signatures and deduplicate events by ID (see [Real-time data and webhooks](https://docs.botradix.com/api-realtime/)). --- # API reference > Every v1 endpoint with method, scope and purpose. Source: https://docs.botradix.com/api-reference/ All paths below are relative to `https://app.botradix.com/api/dex/v1` and require an API key with the listed scope. Responses are JSON. Read limits, precision, tick size and order sizes from `/markets` and `/meta` at runtime instead of hard-coding them. ## Market data | Method | Path | Scope | Purpose | |---|---|---|---| | GET | `/status` | `market:read` | API, network and market-engine status | | GET | `/meta` | `market:read` | Schema versions, scopes and published capabilities | | GET | `/markets` | `market:read` | Market catalogue with per-market precision and order limits | | GET | `/candles` | `market:read` | Candles by `pair_id`, `interval` and `limit` | | GET | `/snapshot` | `market:read` | Market snapshot and current sequence | | GET | `/summary` | `market:read` | Summary of one market (`pair_id`) | | GET | `/summaries` | `market:read` | Summaries of all markets | | GET | `/markets/{pair_id}/funding` | `market:read` | Funding state of one market | | GET | `/markets/{pair_id}/open-interest` | `market:read` | Long and short open interest of one market | | GET | `/orderbook` | `market:read` | Order book derived from the available on-chain state | | GET | `/vault` | `market:read` | Public state of the DEX liquidity vault | ## Account (the key's wallet) | Method | Path | Scope | Purpose | |---|---|---|---| | GET | `/account` | `account:read` | Equity, collateral, margin, health factor and liquidation state | | GET | `/positions` | `account:read` | Open positions, with mark and liquidation prices | | GET | `/orders` | `account:read` | Orders indexed from the contracts (paginated) | | GET | `/orders/by-client-id` | `account:read` | Finds a prepared `open_position` by `client_order_id` | | GET | `/collateral` | `account:read` | Collateral balances and related account state | | POST | `/risk/preview` | `account:read` | Risk preview of a change before you execute it | | GET | `/transactions` | `account:read` | Prepared intents and their on-chain state (paginated) | | GET | `/trades` | `account:read` | Executed trades indexed from the chain (paginated) | | GET | `/positions/history` | `account:read` | Closed positions (paginated) | | GET | `/native/executions/{tx_hash}` | `account:read` | Finality of one execution: `PENDING`, `PENDING_FINALITY` (fewer than 8 confirmations), `REVERTED` or `FINAL`. Optional `account` and `trade_id` | | GET | `/executions/{command_id}` | `account:read` | Status of a delegated execution | | GET | `/stream` | `account:read` | Private Server-Sent Events stream. **Not enabled on the public service yet** (see below) | ## Trading | Method | Path | Scope | Purpose | |---|---|---|---| | POST | `/orders/prepare` | Depends on the action | Validates an action and returns what is needed to execute it. Idempotency key required | | POST | `/orders/execute` | `trade:execute` (plus `orders:manage` for cancel, replace and TP/SL primitives) | Delegated execution, when an executor is bound to the key | Actions and the scope each one needs: | Action | Scope | |---|---| | `open_position`, `close_position_market`, `close_position_limit`, `invert_position`, `update_tpsl`, `add_isolated_margin`, `reduce_isolated_margin`, `change_isolated_leverage` | `trade:prepare` | | `cancel_order`, `replace_order` | `orders:manage` | | `add_collateral`, `withdraw_collateral` | `collateral:manage` | The full flow, fields and an example are in [Trading through the API](https://docs.botradix.com/api-orders/). ## Pagination Paginated endpoints accept `cursor` and `limit` (default 50, maximum 200) and return: ```json { "items": [ … ], "next_cursor": 1234, "has_more": true, "limit": 50 } ``` The object is nested under `orders`, `transactions`, `trades` or `history` depending on the endpoint. Pass `next_cursor` back as `cursor` to get the next page. ## The real-time stream `GET /stream?pair_id={id}&interval=1m` is designed as a private Server-Sent Events stream (market snapshot, private account snapshot and lifecycle events, with a heartbeat every 12 seconds). It is **not enabled on the public service at the moment** and answers `503 REALTIME_STREAM_ASYNC_WORKER_REQUIRED` with `Retry-After: 5`. Until it is enabled, use [webhooks](https://docs.botradix.com/api-realtime/) for account events and poll the read endpoints within your rate limits. ## Public endpoints without an API key The web terminal uses unversioned endpoints that anyone can read. They are convenient for dashboards, but they are **not** a stable contract and may change without notice; integrations should prefer `/api/dex/v1`. | Path (under `https://app.botradix.com`) | Content | |---|---| | `/api/dex/config` | Execution, order, fee and precision models, and developer API capabilities | | `/api/dex/markets`, `/api/dex/summaries`, `/api/dex/summary` | Markets and summaries | | `/api/dex/candles`, `/api/dex/candles/history` | Candles (1m, 3m, 5m, 15m, 1h, 4h, 1d, 1w). History is paged with `before`, up to 50,000 candles; on 1d and 1w it continues with older external history, named in `history_sources` | | `/api/dex/marks?pair_ids=1,2` | Mark prices for 1 to 12 markets | | `/api/dex/orderbook`, `/api/dex/vault`, `/api/dex/liquidations` | Order book, vault and recent liquidations | | `/api/dex/markets/{id}/funding`, `/api/dex/markets/{id}/open-interest` | Funding and open interest | | `/api/dex/status`, `/api/dex/circuit-breakers` | Service status and safety switches | | `/api/dex/account?wallet=0x…` (also `positions`, `orders`, `collateral`, `transactions`, `trades`, `positions/history`) | Read-only views of any wallet. On-chain positions are public by nature | | `/api/public/baq-market`, `/api/public/baq-metrics` | BAQ market data and metrics (see [BAQ](https://docs.botradix.com/baq/)) | --- # Trading through the API > Prepare, sign or execute actions, idempotency and a complete example. Source: https://docs.botradix.com/api-orders/ Every trading action starts with **prepare**: BotRadix validates the action against the market, your account and the contracts, simulates it, and returns exactly what must be signed or sent. Nothing is executed by `prepare`. ## The flow 1. `POST /orders/prepare` with an action, its payload and an idempotency key. 2. Check the response: `execution.ready` must be `true`. 3. Execute it, depending on `execution.status`: | `execution.status` | What to do next | |---|---| | `signature_ready` | Sign `execution.typed_data` (EIP-712) with the wallet and send it to the relay. Used today to open and close positions | | `ready` | Sign and broadcast each transaction in `execution.transactions`, in order, from the wallet | | `preflight_failed` | Not executable now. `execution.reason` says why (for example `withdraw_margin_insufficient` or `oracle_unavailable`) | | `contract_pending` | The market or contract is not available for this action yet | > [!WARNING] > `prepare` answers HTTP 200 even when the action cannot be executed. Always check `execution.ready` and `execution.status` before signing anything. A prepared action expires: 120 seconds for trading actions, 180 seconds for collateral actions and 300 seconds for signed intents. Prepare again if it expires. ## Path 1 — Signed intent (open and close positions) For `open_position`, `close_position_market` and `close_position_limit`, the response contains an EIP-712 message instead of transactions: - `execution.mode` is `signed_intent` and `execution.transactions` is empty. - The typed data uses the domain `BotradixDEX`, version `1`, chain ID `8453`, and the DEX router as verifying contract. - The wallet signs it (a signature, not a transaction), and you send it to the relay: ```bash curl -X POST https://app.botradix.com/api/dex/actions/relay \ -H "Content-Type: application/json" \ -d '{"wallet":"0xYourWallet","intent_id":"dx_…","signature":"0x…"}' # → {"tx_hash":"0x…","state":"submitted"} ``` BotRadix's executor then broadcasts the transaction. Its network cost is charged in USDC from your DEX collateral and is shown beforehand in `execution.costs`, so the wallet does not need ETH for these actions. > [!NOTE] > The relay endpoint is currently part of the unversioned web API (`/api/dex/actions/relay`). It is the supported way to submit signed intents today. ## Path 2 — Wallet transactions For the other actions (collateral, TP/SL updates, isolated-margin changes, cancel and replace), `execution.transactions` lists one or more transactions: ```json { "kind": "action", "from": "0xYourWallet", "to": "0x…", "data": "0x…", "value": "0x0", "deadline": 1790950518 } ``` A `kind: "approval"` entry (an exact-amount token approval) may come first for deposits. Sign and broadcast them in order from the same wallet; they need a little ETH on Base for gas. **USDC deposit by permit (no gas).** When `GET /api/dex/config` reports `collateral_model.approval.permit: true`, add `"permit": true` next to `action` for an `add_collateral` of USDC. The response then has `execution.mode: "permit_deposit"` with EIP-2612 `typed_data`: sign it with the wallet and send `{"wallet","intent_id","signature"}` to `POST /api/dex/actions/relay`. A protocol executor submits the deposit and pays the gas. Without the flag, or for BAQ, you receive the approval and deposit transactions. If you broadcast transactions yourself, report the hash to `POST /api/dex/actions/receipt` (`{"wallet","intent_id","tx_hash","state"}`) to receive `transaction.*` webhooks for it; otherwise BotRadix only learns about the trade when it is indexed from the chain. ## Path 3 — Delegated execution `POST /orders/execute` submits actions through an executor bound to the API key (scope `trade:execute`; `orders:manage` for cancel, replace and TP/SL primitives). The response is `202` with `delegated.command_id`, `delegated.tx_hash` and a `status_url`; follow it with `GET /executions/{command_id}`. Send `"prepare_only": true` to validate without submitting. Accepted actions include `open_position`, `batch` (1 to 32 actions), `open_market`, `create_limit`, `create_stop`, `increase`, `reduce`, `close`, `cancel`, `replace`, `set_tp`, `clear_tp`, `set_sl`, `clear_sl`, `invert` and `isolated_manage`. If no executor is bound to the key, the API answers `403 delegated_executor_binding_required`. ## Idempotency `/orders/prepare` requires an idempotency key, taken from (in this order) the `Idempotency-Key` header, `payload.idempotency_key` or `payload.client_order_id`. It must match `^[A-Za-z0-9._:-]{8,128}$`. - Keys are scoped to wallet, action and key, and are remembered for 24 hours. - The same key with the same payload returns the original preparation (`idempotent_replay: true`). - The same key with a different payload returns `409 IDEMPOTENCY_KEY_CONFLICT`; a reused `client_order_id` with a different payload returns `409 DUPLICATE_CLIENT_ORDER_ID`. - The request is matched on what you sent (`payload`, plus `permit` for deposits), for every action including `open_position`. The body is validated before the key is looked up, so a retry while the market is stale or moved returns that validation error. A replayed preparation can already be expired: check `expires_at_ms`. `/orders/execute` reads the key only from `payload.idempotency_key` or `payload.client_order_id` and follows the same rules: the same key with the same payload replays the original response, and a different payload returns `409 IDEMPOTENCY_KEY_CONFLICT`. ## `open_position` payload | Field | Rules | |---|---| | `pair_id` | Market `id` from `/markets` | | `side` | `long` or `short` | | `order_type` | `market` (default), `limit` or `stop` | | `margin_mode` | `cross` (default) or `isolated` | | `leverage` | Integer from 1 up to the market maximum (see [Leverage and margin](https://docs.botradix.com/margin/)) | | `order_value_usdc` | Position size (notional) in USDC, up to 6 decimals, within the market minimum and maximum | | `reference_price` | Required for market orders. Rejected with `PRICE_DEVIATION_EXCEEDED` if more than 1.5% from the server price, or `MARKET_DATA_STALE` if prices are older than 8 seconds | | `max_slippage_bps` | Required for market orders, 1 to 1000 (0.01% to 10%) | | `limit_price` / `trigger_price` | Required for limit / stop orders | | `time_in_force` | `gtc`, `ioc` or `fok`; market orders are always `ioc` | | `rest_if_unfilled` | Market orders only: keep the unfilled part as a limit order | | `post_only` | Limit orders only | | `take_profit`, `stop_loss` | Optional; must be on the correct side of the entry price | | `client_order_id` | Up to 96 characters; generated if omitted | ## Example ```bash curl -X POST https://app.botradix.com/api/dex/v1/orders/prepare \ -H "X-BotRadix-API-Key: $BOTRADIX_API_KEY" \ -H "Idempotency-Key: mm01-2026-10-02-0001" \ -H "Content-Type: application/json" \ -d '{ "action": "open_position", "payload": { "pair_id": 1, "side": "long", "order_type": "market", "margin_mode": "cross", "order_value_usdc": "100", "leverage": 5, "reference_price": "2500.00", "max_slippage_bps": 50, "client_order_id": "mm01-2026-10-02-0001" } }' ``` The response contains `intent_id`, the normalized `payload`, `execution` (status, typed data or transactions, simulation, costs and deadline) and `expires_at_ms`. ## After execution - `GET /transactions` lists your intents and their on-chain state. - `GET /native/executions/{tx_hash}` reports finality: `PENDING`, `PENDING_FINALITY` (fewer than 8 confirmations), `REVERTED` or `FINAL`. - [Webhooks](https://docs.botradix.com/api-realtime/) notify order, position, collateral and transaction changes. --- # Real-time data and webhooks > Signed webhooks, how to verify them, and the status of the streaming endpoint. Source: https://docs.botradix.com/api-realtime/ Webhooks deliver your wallet's account events to your server as soon as BotRadix indexes them from the chain, so you do not need to poll aggressively. ## Creating a webhook Webhooks are managed with a developer session (see [API overview and authentication](https://docs.botradix.com/api/)): ```bash curl -X POST https://app.botradix.com/api/dex/developer/webhooks \ -H "Authorization: Bearer $DEVELOPER_SESSION" \ -H "Content-Type: application/json" \ -d '{"url":"https://example.com/botradix/webhook","events":["order.filled","position.changed","liquidation"]}' ``` | Rule | Value | |---|---| | URL | HTTPS on port 443 or 8443, no embedded credentials, up to 512 characters, resolving to public IP addresses | | Limit | Up to 8 active webhooks per wallet | | Events | A list of event names, or `["*"]` for all. Default: `transaction.confirmed` and `transaction.reverted` | | Secret | `signing_secret` (starts with `brx_whsec_`) is returned **only once**, when the webhook is created | | Removal | `DELETE /api/dex/developer/webhooks/{webhook_id}` disables the subscription | ## Events | Event | When | |---|---| | `order.accepted` | An order was accepted on chain | | `order.filled` | An order was completely filled | | `order.partially_filled` | An order was partly filled | | `order.cancelled` | An order was cancelled | | `position.changed` | A position was opened, increased, reduced, closed or inverted | | `liquidation` | A position was liquidated | | `funding.charged` / `funding.credited` | Funding was paid or received | | `collateral.changed` | A deposit or withdrawal changed your collateral | | `transaction.confirmed` / `transaction.reverted` | A transaction BotRadix knows about reached finality, successfully or not | | `chain.reorg` | A chain reorganization changed already reported data | | `transaction.pending` | Sent only as a correction after a reorganization (with `revoked_event_id`) | `liquidation.warning` is accepted in subscriptions but reserved: it is not emitted today. > [!NOTE] > `transaction.*` events are sent for transactions BotRadix knows the hash of: those submitted through the relay or the delegated executor, and those whose hash you reported to `/api/dex/actions/receipt`. ## Delivery Each delivery is an HTTPS `POST` with a JSON body: ```json { "id": "…", "type": "position.changed", "created_at": 1790950000, "data": { … } } ``` | Header | Content | |---|---| | `X-BotRadix-Event` | Event type | | `X-BotRadix-Event-ID` | Unique, stable event ID (up to 96 characters, same as `id` in the body). Use it to deduplicate | | `X-BotRadix-Timestamp` | Unix time (seconds) of this delivery attempt | | `X-BotRadix-Signature` | `v1=` followed by the hex HMAC-SHA256 signature | | `User-Agent` | `BotRadix-DEX-Webhook/1.0` | - Delivery is **at least once**: the same event can arrive more than once. Deduplicate by `X-BotRadix-Event-ID`. - Answer with any `2xx` status within 4 seconds. Redirects are not followed. - A failed delivery is retried up to 4 attempts in total, waiting 2, 4 and 8 seconds. - Events can arrive out of order; use `created_at` and the data itself to order them. ## Verifying the signature The signature is an HMAC-SHA256 of `timestamp + "." + raw_body`, keyed with your full `signing_secret`. Always verify it against the **raw** body, before parsing the JSON, and reject old timestamps. ```javascript // Node.js (Express: use express.raw({ type: "application/json" }) for this route) import crypto from "node:crypto"; export function verifyBotRadixWebhook(rawBody, headers, secret, toleranceSeconds = 300) { const timestamp = headers["x-botradix-timestamp"]; const received = headers["x-botradix-signature"] || ""; if (!timestamp || Math.abs(Date.now() / 1000 - Number(timestamp)) > toleranceSeconds) return false; const expected = "v1=" + crypto.createHmac("sha256", secret).update(`${timestamp}.`).update(rawBody).digest("hex"); return received.length === expected.length && crypto.timingSafeEqual(Buffer.from(received), Buffer.from(expected)); } ``` ```python # Python import hashlib, hmac, time def verify_botradix_webhook(raw_body: bytes, headers, secret: str, tolerance: int = 300) -> bool: timestamp = headers.get("X-BotRadix-Timestamp", "") if not timestamp.isdigit() or abs(time.time() - int(timestamp)) > tolerance: return False expected = "v1=" + hmac.new(secret.encode(), timestamp.encode() + b"." + raw_body, hashlib.sha256).hexdigest() return hmac.compare_digest(headers.get("X-BotRadix-Signature", ""), expected) ``` ## Server-Sent Events stream `GET /api/dex/v1/stream?pair_id={id}&interval=1m` is defined as a private stream with market snapshots, account snapshots and lifecycle events, a heartbeat every 12 seconds and resumption with `Last-Event-ID`. **It is not enabled on the public service yet** and answers `503 REALTIME_STREAM_ASYNC_WORKER_REQUIRED`. Use webhooks for account events and the read endpoints for market data in the meantime. This page will be updated when the stream is enabled. --- # Errors, limits and versioning > Error format, rate limits, headers and the versioning policy. Source: https://docs.botradix.com/api-errors/ ## Error format Every error from `/api/dex/v1` has the same JSON shape and an HTTP status that matches it: ```json { "success": false, "error": { "schema_version": "botradix-dex-error-v1", "code": "SCOPE_NOT_ALLOWED", "message": "…", "retryable": false, "details": {}, "request_id": "dxr_…" }, "request_id": "dxr_…", "api_version": "v1", "api_schema_revision": "botradix-dex-api-v1.1" } ``` Use `error.code` in your logic (messages can change) and keep `request_id` when you contact support. `retryable: true` means the same request may succeed later. ## Common errors | HTTP | Code | Meaning | |---|---|---| | 400 | (validation codes) | A field is missing, malformed or out of range. `prepare` validates the body before the key | | 400 | `IDEMPOTENCY_KEY_REQUIRED` | `/orders/prepare` needs a valid idempotency key | | 401 | `API_KEY_REQUIRED` | No API key was sent | | 401 | `API_KEY_INVALID` | The key is malformed or wrong | | 401 | `API_KEY_INACTIVE` | The key is revoked or expired | | 403 | `SCOPE_NOT_ALLOWED` | The key lacks the scope this endpoint or action needs | | 403 | `IP_NOT_ALLOWED` | The request IP is not in the key's allowlist | | 403 | `delegated_executor_binding_required` | Delegated execution needs an executor bound to the key | | 409 | `IDEMPOTENCY_KEY_CONFLICT` | The idempotency key was used with a different payload in the last 24 hours | | 409 | `DUPLICATE_CLIENT_ORDER_ID` | The `client_order_id` was used with a different payload | | 409 | `active_api_key_limit_reached` | The wallet already has 10 active keys | | 429 | `RATE_LIMITED` | A per-key limit was exceeded | | 503 | `REALTIME_STREAM_ASYNC_WORKER_REQUIRED` | The SSE stream is not enabled on this service | ## Version 2.2 codes | Code | Meaning | What to do | |---|---|---| | `COMMITTED_EXECUTOR_REQUIRED` | On a market with V2 risk rules, opening, increasing or inverting through the delegated route is executed committed to a price observed after your order, and only a protocol executor can do it. Your executor is not one | Use the BotRadix executor bound to your key | | `INVERT_NEEDS_AGENT` | On a market with V2 risk rules, the inversion cannot be sent as a direct wallet transaction | Use your trading key (or the delegated route with a protocol executor) | | `INTENT_CREATED_AT_BEFORE_RECEPTION` | The order's commitment time is earlier than its reception by the service (2 s margin); nothing is sent | Prepare it again | | `WALLET_MARGIN_NEEDS_AGENT` | A market of your cross account has its session closed: the isolated margin comes from your wallet, signed by your wallet or co-signed by your wallet together with your trading key. "Margin +" needs the trading key | Enable the trading key and retry | | `WALLET_MARGIN_NEEDS_WALLET_SIGNATURE` | Margin from your wallet needs your wallet's signature for this operation; a trading session cannot bring it | Repeat the operation and sign it with your wallet (or use your trading key, with your wallet's co-signature) | | `WALLET_COSIGN_REQUIRED` | Your wallet's co-signature for margin from your wallet is missing | Confirm again and sign with your wallet | | `WALLET_COSIGN_SIGNATURE_INVALID` | The co-signature does not match this wallet or this operation; nothing moved | Prepare it again; if it repeats, write to [support@botradix.com](mailto:support@botradix.com) | | `WALLET_COSIGN_INVALID` | The prepared co-signature does not match the operation; nothing moved | Prepare it again | | `WALLET_MARGIN_BALANCE_REQUIRED` | With that session closed, your wallet lacks enough USDC for the margin (and, for an open, the largest fees and, for a limit or stop order, the bond). `details.wallet_margin_usdc` gives the amount | Add USDC to your wallet or wait for the session to reopen | | `LIQUIDITY_CAPACITY` (also on `/orders/execute`) | The vault refused the risk: its share for this market and direction is full, or an order that joins a position with a backed take profit would push it over (the preview does not always anticipate this). Since v2.2 the delegated route answers it with HTTP 400 instead of a `503` with `VAULT_CAPACITY`; `details.max_open_usdc` gives the room when it can be estimated | Try the opposite side, a smaller size or later | When inverting next to an opposite-side net position with the same key, the response may return that net position's id: there is no `DexPositionOpened`, but a `DexPositionChanged` of the net position. ## Why a prepared action is not executable When `prepare` succeeds but `execution.ready` is `false`, `execution.reason` explains it: | Reason | Meaning | |---|---| | `withdraw_margin_insufficient` | The withdrawal would leave too little free margin. Withdraw less or close positions | | `oracle_unavailable` | A current market price is not available on chain right now; try again shortly | | `funding_unavailable` / `funding_stale` | The market's funding data must be updated before new positions can open | | `market_session_closed` | The market is outside its trading session | | `price_out_of_bounds` | The price moved beyond your allowed slippage; prepare again | | `price_tick_rejected` | The price does not match the market tick size | | `contract_limits_rejected` | The order exceeds a contract limit (size, leverage) or has expired | | `vault_capacity_unavailable` | Not enough liquidity capacity for this position right now | | `market_risk_paused` | New positions are paused on this market | | `market_not_bound` / `dex_not_operational` | The market is not enabled for trading yet | | `invalid_take_profit` / `invalid_stop_loss` | TP or SL is on the wrong side of the current price | | `intent_expired` | The preparation expired; prepare again | | `simulation_unavailable` | The pre-trade simulation could not run; prepare again in a moment | | `contract_preflight_failed` | The contract would reject the action under current conditions | ## Rate limits Each API key has its own limits, counted in 60-second windows: | Limit | Default | |---|---| | All requests | 3,600 per minute | | `/orders/prepare` | 900 per minute and 40 per second | | Account reads (`/account`, `/positions…`, `/orders…`, `/collateral`, `/transactions`, `/trades`, `/orders/execute`) | 3,000 per minute | | `/candles` | 900 per minute | Per-key `quotas` can be set when a key is created or rotated, up to these caps: requests 30,000, orders 12,000, burst 1,000, account reads 20,000 and historical reads 12,000 per minute. On top of the per-key limits, the network edge allows up to 100 requests per second per IP address (bursts of 200) and 60 per second per API key (bursts of 120). Edge rejections are plain `429` responses without the JSON body. Responses include `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset` (Unix seconds when the window resets) for the general per-key bucket. `429` responses carry no `Retry-After`: back off exponentially with jitter (for example 1, 2, 4, 8 seconds). ## Retries - Retry on `429`, on `5xx` and when `error.retryable` is `true`, with exponential backoff. - Reuse the same idempotency key, with the same body, when you retry a `prepare` or an `execute`, so a lost response does not create a second preparation or a second order. - Never blindly retry a broadcast transaction: check `/transactions` or `/native/executions/{tx_hash}` first. ## Response headers | Header | Value | |---|---| | `X-BotRadix-API-Version` | `v1` | | `X-BotRadix-API-Schema` | `botradix-dex-api-v1.1` | | `X-Request-ID` | Your request ID, or one generated by the server (`dxr_…`) | | `Cache-Control` | `no-store` | ## Versioning policy - `/api/dex/v1` is the stable integration contract. New fields and endpoints can be added to v1 without notice; your client should ignore fields it does not know. - Changes that would break existing integrations are published under a new version. - `GET /meta` returns the current schema revision and capabilities. - Unversioned endpoints used by the web terminal (`/api/dex/…` without `v1`) can change at any time. --- # Security > How accounts, keys and funds are protected, and what you should do on your side. Source: https://docs.botradix.com/security/ ## Official addresses BotRadix operates only on these domains. Bookmark them and check the address bar before signing in or connecting a wallet. | | | |---|---| | Platform | `botradix.com` | | DEX terminal and API | `app.botradix.com` | | Documentation | `docs.botradix.com` | | Support email | `support@botradix.com` | BotRadix staff will never ask for your password, two-factor codes, seed phrase or main wallet private key. ## Your BotRadix account - **Account creation** is confirmed with a 6-digit email code (valid 10 minutes). Passwords must have at least 10 characters and are stored only as one-way hashes. New registrations are temporarily closed. - **Two-factor authentication (2FA)** with an authenticator app (TOTP). Enabling it requires your password; replacing or disabling it requires your password and a current code. - **Account login sessions** last 8 hours (if the short-session profile is enabled, access expires earlier and renews under its configuration); they are distinct from trading authorizations. Signing out ends your sessions on every device; changing your password or 2FA also ends your other sessions. - **Changing your password** requires an email code and a 2FA code, so 2FA must be enabled first. - Repeated failed sign-in attempts are rate-limited. > [!TIP] > Enable 2FA as soon as you create your account. Without it you cannot change your password. There is currently no self-service password reset. If you lose access, contact support from your account's email address. ## Your exchange credentials - API keys and agent-wallet keys are **encrypted at rest** and decrypted only in memory when a bot uses them. - They are displayed masked and cannot be changed while bots or positions depend on them. - Grant trading permissions only, never withdrawals. See [Connecting exchanges](https://docs.botradix.com/exchanges/). ## Your DEX funds - Under the current code, your trading key and trading sessions **cannot withdraw**; withdrawals are authorized by your wallet (a transaction or a free signature) and return funds to your own wallet. The contracts are open and unsealed: the administrator can change this logic at any time without mandatory advance notice (0 hours); absolute custody protection is not guaranteed. - The interface validates and simulates prepared actions. State can change before execution; a successful simulation is not an execution guarantee. - You can close your positions and withdraw directly from BaseScan, without this website. The withdrawal pause in the code in force expires after 72 hours, but that does not guarantee recovering everything within that time: exit also depends on prices, positions, orders, debts and liquidity. See [Exit without BotRadix](https://docs.botradix.com/exit/). - The BotRadix administrator can change the logic at any time, without advance notice: **current notice 0 h, sealed no**, in a consolidation phase with sealing planned by component. The administrator can pause the DEX or withdrawals (under the current code, a withdrawal pause lasts at most 72 hours). Read [Security and contracts](https://docs.botradix.com/security-contracts/) and its [official addresses](https://docs.botradix.com/security-contracts/#official-addresses): fixed custody addresses keep the money in place during an upgrade, but new logic can change its protections. ## Platform protection - All sites are served over HTTPS with HSTS, strict security headers and per-IP rate limits. - Critical services are monitored continuously and restart automatically after a failure. - Data is backed up regularly. - The Android app adds biometric lock, screen-capture blocking and Keystore encryption. ## Good practice 1. Use a unique, strong password and enable 2FA. 2. Use a dedicated wallet for trading, with only the funds you intend to trade. 3. Create dedicated API keys and agent wallets for BotRadix, with minimum permissions. 4. Revoke trading keys, sessions and API keys you no longer use. 5. Never share screenshots that show keys, seeds or QR codes. ## Reporting a vulnerability If you find a security issue, report it privately to **support@botradix.com** with the subject "Security", including the steps to reproduce it. Please do not disclose it publicly until it has been fixed. ## Deleting your account You can delete your account from **Settings** once no bot, open signal, pending cycle or grid inventory remains. Deletion removes your BotRadix data (bots, history, exchange connections, alert destinations and wallet links). It does not close positions on your venues and does not affect funds held on the DEX contracts, whose withdrawal remains subject to contract rules, account state and pauses. --- # Smart contracts > Public contract addresses, upgradeability and administrative controls. Source: https://docs.botradix.com/contracts/ The BotRadix DEX runs as smart contracts on **Base mainnet** (chain ID 8453). This page lists the official addresses, explains what each contract does and describes, without simplification, the controls that the BotRadix administrator holds. The [Official v2.2 contract addresses](https://docs.botradix.com/security-contracts/#official-addresses) section details fixed components, replaceable logic, upgrade functions and who signs. **Consolidation phase, with sealing planned by component; currently unsealed with 0 h notice: the administrator can change the logic at any time, without advance notice.** ## Official addresses | Contract | Address | Role | |---|---|---| | DEX router | [`0x740E207d90ec9D82fce040F8DA0268dB761F364E`](https://basescan.org/address/0x740E207d90ec9D82fce040F8DA0268dB761F364E) | Entry point for trading, isolated margin, orders, the vault and on-chain reads | | Cross margin | [`0x79ED1002F842DE2A9E25d353F2627206483b2b3B`](https://basescan.org/address/0x79ED1002F842DE2A9E25d353F2627206483b2b3B) | Cross-margin accounts and collateral (USDC and BAQ) | | PairForge hub | [`0x55Ec5A8DFEb6ab71BCAE98D833b4E1d96a6c871C`](https://basescan.org/address/0x55Ec5A8DFEb6ab71BCAE98D833b4E1d96a6c871C) | Oracle: signed prices and funding rates | | Coordinator | [`0xA7509a1581bD718DE319475A0CEB9776bc29c463`](https://basescan.org/address/0xA7509a1581bD718DE319475A0CEB9776bc29c463) | Executes administrator-signed configuration and upgrade plans | | USDC | [`0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`](https://basescan.org/token/0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) | Settlement asset (native USDC issued by Circle on Base) | | BAQ | [`0x1B9f61483Dd6710E1Ad3b9d0bb92b710F1BA56B5`](https://basescan.org/token/0x1B9f61483Dd6710E1Ad3b9d0bb92b710F1BA56B5) | BotRadix token; supplementary collateral | > [!CAUTION] > Approve tokens and sign transactions only for these addresses, and only from **app.botradix.com** or, for the independent exit, from BaseScan following [Exit without BotRadix](https://docs.botradix.com/exit/). A wallet request involving any other contract does not come from BotRadix. ## How the contracts fit together - **Router.** A modular contract: each function is delegated to an implementation module (a "facet") for positions, orders, the vault, delegated execution, market data and administration. Trading, isolated margin and orders all go through this single address. - **Cross margin.** Holds cross collateral and evaluates the health of each cross account across all its positions. It is an upgradeable proxy: its address (which holds the collateral) is fixed, but the administrator can replace its logic instantly during the open phase. - **PairForge hub.** Stores the latest prices and funding rates signed by the reporters, and checks the 2-of-3 quorum and the age of every price. See [Prices and oracle](https://docs.botradix.com/oracle/). - **Coordinator.** Executes administrative plans. Each plan is authorized with an EIP-712 signature that carries a nonce and a deadline, and commits to the exact list of actions it will run. - **Advance-notice gate.** An immutable contract without an administrator of its own, which only obeys the Coordinator. Since version 2.2 it is the router's administrator and applies a notice to code changes and to operations. See [Security and contracts](https://docs.botradix.com/security-contracts/#the-prior-notice-gate). - **Exit.** An immutable contract with no owner. It forwards to the router the exit actions of the wallet that calls it; its community functions (freezing markets, closing frozen positions, completing distributions) can act on other accounts when their conditions are met, and payments always belong to the account owners. See [Exit without BotRadix](https://docs.botradix.com/exit/). - **Protocol executors and keeper.** BotRadix accounts that submit the actions you sign through your trading key or a session, and execute resting orders, take profit, stop loss, funding updates and liquidations. They pay the gas. They can only submit actions that you signed or that the contract rules allow, such as the liquidation of an account below its maintenance margin. ## Administrative controls The contracts give the BotRadix administrator these powers: | Control | Effect | |---|---| | Upgrade | Replace the router modules (through the advance-notice gate) and the cross-margin implementation and business logic (immediately), which changes the contracts' logic | | Pause | Suspend DEX activity, or only the opening of new positions. Pause-only keys can do this too, but never resume | | Reduce-only mode | Positions can only be reduced or closed | | Pause withdrawals | Collateral withdrawals are blocked while the pause lasts: at most 72 hours, then at least 24 hours without a pause | | Market configuration | List markets, set leverage tiers, open-interest caps and market sessions | | Parameters | Adjust fees, maintenance margin, the profit cap, the BAQ credit and other values within the limits of the code in force (which the administrator can also change while the contracts are open) | | Oracle management | Add, replace or revoke reporters and set the quorum | | Vault liquidity | Withdraw the vault's **free** liquidity: the part not reserved for traders' potential profits, and, under the code in force, only if after the withdrawal reserved capacity satisfies the admission ceiling and the auto-deleveraging target (being below the trigger is not enough). During an emergency it requires an open distribution, all claims paid and no deferred payment outstanding | | Emergency | Declare an emergency or settle a market without prices (anyone can do it after the waiting times described in [Exit without BotRadix](https://docs.botradix.com/exit/)) | | Service fee | Currently 0.03% on opens and increases, with a hard cap of 0.20% in the current code; each wallet must consent in its signature | Important properties of these controls: - **Advance notice on the router, 0 hours today.** Router changes go through the advance-notice gate. Its notices are 0 hours today, so a change can still take effect immediately; raising them is immediate and lowering them requires waiting for the notice in force. - **No notice on CrossMargin and the business logic.** Their proxies store a fixed administrator and a zero delay in immutable code, so upgrades of the contract that holds the collateral can take effect immediately while the contracts are open. They are publicly monitored. - **Single administrator key.** Administrative plans are signed by one administrator key held by BotRadix (an externally owned account, not a multisig). - **Open contracts.** The contracts are deliberately kept open (not sealed), so that features can be added and issues fixed. This also means every guarantee described in these docs depends on the code deployed at that moment. It is a temporary consolidation phase: sealing is planned by component after stability has been assessed, without a committed timetable. Each step must state which upgrade paths and parameters it constrains; sealing one component does not freeze the whole system. - **Independent exit.** Any wallet can close its positions and withdraw from BaseScan through the exit contract, with fallbacks after 24 hours, 3 days (a market without prices) and 72 hours (no prices at all). See [Exit without BotRadix](https://docs.botradix.com/exit/) for the steps and their limits. > [!IMPORTANT] > Under the current code, the administrator has no function to move a trader's collateral to another address, and your trading key cannot withdraw. Because CrossMargin can be upgraded without delay while the contracts are open, these protections ultimately rely on BotRadix operating its administrative key correctly. Read [Security and contracts](https://docs.botradix.com/security-contracts/) and [Risks](https://docs.botradix.com/risks/). ## Verification and audits - All transactions, events and token balances are public and can be checked on [BaseScan](https://basescan.org). - Check each address on BaseScan: its **Contract** tab shows whether its source is verified. Deployment alone does not prove source verification; matching source is not an audit. - No third-party audit report has been published. Before version 2.2 the contracts went through an internal multi-approach review and invariant testing, and the upgrade was rehearsed on a copy of Base. These docs will link any third-party audit report if one is published. ## How to verify it You do not have to take this page on trust: the key facts can be read directly from the chain. These commands use `cast`, the command-line tool from [Foundry](https://getfoundry.sh), with Base's public RPC. They are read-only: they sign nothing, send no transaction and cost no gas. ```bash RPC=https://mainnet.base.org ROUTER=0x740E207d90ec9D82fce040F8DA0268dB761F364E CROSS=0x79ED1002F842DE2A9E25d353F2627206483b2b3B HUB=0x55Ec5A8DFEb6ab71BCAE98D833b4E1d96a6c871C COORD=0xA7509a1581bD718DE319475A0CEB9776bc29c463 BAQ=0x1B9f61483Dd6710E1Ad3b9d0bb92b710F1BA56B5 USDC=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 # Cross margin: implementation, revision and open status cast call $CROSS "implementation()(address)" --rpc-url $RPC cast call $CROSS "implementationRevision()(uint64)" --rpc-url $RPC cast call $CROSS "isSealed()(bool)" --rpc-url $RPC # BAQ as collateral: reserve cast call $CROSS "dexBaqReserveState()(uint256,uint256)" --rpc-url $RPC # Router: administrator (the advance-notice gate) and the notices in force cast call $ROUTER "admin()(address)" --rpc-url $RPC # Coordinator: administrator key and open status cast call $COORD "OWNER()(address)" --rpc-url $RPC cast call $COORD "isSealed()(bool)" --rpc-url $RPC # PairForge hub: quorum and number of reporters cast call $HUB "QUORUM()(uint8)" --rpc-url $RPC cast call $HUB "reporterCount()(uint32)" --rpc-url $RPC # Tokens: BAQ supply and USDC held by the DEX contracts cast call $BAQ "totalSupply()(uint256)" --rpc-url $RPC cast call $USDC "balanceOf(address)(uint256)" $ROUTER --rpc-url $RPC cast call $USDC "balanceOf(address)(uint256)" $CROSS --rpc-url $RPC ``` Results with version 2.2 (checked on 11 October 2026): | Read | Result | What it confirms | |---|---|---| | `implementationRevision` | `24` | The cross-margin implementation included in version 2.2 (the revision may increase in later upgrades) | | `isSealed` (cross margin and Coordinator) | `false` | The contracts remain open, as explained in [Administrative controls](https://docs.botradix.com/contracts/#administrative-controls) | | `dexBaqReserveState` | Two USDC amounts (6 decimals) | The BAQ reserve and the part committed at that moment | | `admin` (router) | The gate's address | Changes to the router only come through the advance-notice gate | | `ADMIN` (gate) | The Coordinator's address | The gate only obeys the Coordinator | | `delays` | `0`, `0`, `0`, `2592000`, `1209600` | Code notice and operations notice of 0 hours, no committed minimum, a maximum notice of 30 days and a 14-day window to execute a scheduled change | | `OWNER` (Coordinator) | An externally owned account | The single administrator key that signs the plans | | `QUORUM` and `reporterCount` | `2` and `3` | The 2-of-3 PairForge reporter quorum | | `totalSupply` (BAQ) | `5000000000000000000000000000` | 5,000,000,000 BAQ (18 decimals) | | `balanceOf` (USDC) | Amounts with 6 decimals | The USDC held by each DEX contract at that moment | The BAQ reserve and the balances change with activity, so you will see different figures. The implementation address and its revision change with every contract upgrade. Fees, the profit cap, the BAQ credit and the other adjustable values can be read on the router's and CrossMargin's **Read Contract** tabs on BaseScan; the [Security and contracts](https://docs.botradix.com/security-contracts/#funds-permissions-and-risks) lists their values at launch and their limits. ## For integrators - Signed intents use the EIP-712 domain `BotradixDEX`, version `1`, chain ID `8453`, with the DEX router as verifying contract. See [Trading through the API](https://docs.botradix.com/api-orders/). - To index DEX events from the start, begin at block **51,767,085**. - USDC uses 6 decimals and BAQ 18 decimals. - Since version 2.2, every change to a position emits `DexPositionStateV2` (leverage, size, margins, profit cap and funding) and every close emits `DexPositionCloseReason` with its reason (your order, take profit or stop loss, liquidation, auto-deleveraging, exit or emergency). - Useful router reads on BaseScan: `dexAdlState` (auto-deleveraging), `dexPositionRiskV2` (a position's cap and take-profit backing), and `dexExitStatus` (the exit contract and an account's exit request); on the cross margin, `dexWithdrawPauseState` (current withdrawal pause and when it ends). - `PRODUCTION_READY` returns `false` on purpose: it only gates the legacy V1 venue and has no effect on the DEX. - For most needs, the [API](https://docs.botradix.com/api/) is simpler and returns the same on-chain data already indexed. ## Version The current contracts are **version 2.2**, live since 11 October 2026 (version 2.1.1 went live on 4 October 2026). See the [Changelog](https://docs.botradix.com/changelog/) for the history. --- # Security and contracts > Official addresses, administrative powers, the prior-notice gate, pausers, staged sealing and review scope. Source: https://docs.botradix.com/security-contracts/ This page explains who can change the contracts, how changes are processed and what limits apply to leaving the DEX. See also [Exit without the website](https://docs.botradix.com/exit/), [How to read BotRadix proxies](https://docs.botradix.com/proxies/) and [Reproducible compilation](https://docs.botradix.com/reproducible-build/). ## Reference status **Reference: 11 October 2026.** The v2.2 contracts are active; administrable components remain **OPEN**, without sealing. The router administrator is AvisoPrevio, `0x3a3273Df1c640D2625Bcc0f378Fc571D371f0dEd`. Code and operations delays and the committed minimum delay are **0 hours**. Pause-only keys are in place. **Source publication:** joint publication on BaseScan is planned near closure, before sealing. Address links on this page do not imply that the code has already been verified. ## Funds, permissions and risks Collateral is recorded in CrossMargin under your wallet. Under the code described here, user withdrawals require the corresponding wallet authorization and are paid to their owner; a trading or session key has no withdrawal permission. This is not an absolute custody guarantee: the addresses retaining state can stay the same while the logic enforcing those permissions is replaced. While a component remains OPEN, its authority can change code, routes, parameters or dependencies through its upgrade mechanisms. Powers include configuring markets and reporters, pausing, declaring an emergency and withdrawing free vault liquidity subject to the checks in the code in force. A stable address or a user signature does not remove administration, software, oracle, liquidation or liquidity risk. ## The prior-notice gate AvisoPrevio is a contract without a proxy that processes administrative calls through `execute(target, data, salt)`. Its `ADMIN()` is the coordinator authorized by BotRadix administration. Having this gate does not make that authority decentralized or a multisig. The gate classifies each call by destination, function and, where relevant, arguments. `classify()` exposes the class; `delays()` returns the current delays and minimum floor. | Class | Mechanism | Examples | |---|---|---| | `FAST` | No waiting period | Pauses, cancellations and certain revocations; arguments must meet the function's restrictions | | `OPS` | Requires the operations delay | Parameters, market listings, vault withdrawals, administrative emergency and resumption | | `CODE` | Requires the code delay | Logic or routing changes, pointers, price sources and destinations not otherwise classified | With a positive delay, administration schedules the exact data with `schedule()`. The identifier binds the destination, data and salt. `execute()` checks the delay **in force at execution**, so an increase also protects pending operations. The execution window lasts 14 days from when an operation becomes ready. `operationState()` exposes its dates and status; events record scheduling, execution and cancellation. With a zero delay, execution can proceed without prior scheduling: there is no mandatory reaction period. `raiseDelay()` only increases delays and takes effect immediately. `lowerDelay()` must go through the gate itself and wait for the longest current delay among those being reduced. `commitMinimumDelay()` raises a floor that cannot subsequently be lowered. These rules do not make every upgrade in the system pass through the gate. ### What the gate cannot hold back Replacing the CrossMargin proxy implementation and business logic has separate authority paths tied to the coordinator. While those paths remain open, the gate alone does not enforce a waiting period on them. It also does not delay direct action by keys authorized only to pause. `announce()` records the public `CambioAnunciado` event for a change the gate cannot hold back. **It neither executes the change nor blocks execution until a date.** An operational announcement is not a contract-enforced waiting period. Assessing protection requires checking each component's authority and lifecycle as well as the gate. ## Pausers and resumption The mechanism supports up to eight pause-only keys. They can activate pause, reduce-only mode, a trading stop or a withdrawal pause; that permission does not allow resuming, upgrading contracts or withdrawing user funds. Resumption belongs to administration and is classified as an operation by the gate. Under the v2.2 mechanism, a CrossMargin withdrawal pause expires after **72 hours**, requires **24 hours without a pause** before the next one and does not apply during a confirmed emergency. Its effective state and expiry can be read. Expiry does not guarantee payment: positions, orders, debts, prices and liquidity still matter. Restrictions on new positions do not replace closing and liquidation checks. While the code remains upgradeable, these rules can also change. ## Sealing in stages A seal applies to one component and its specific permissions. Sealing the router does not automatically seal CrossMargin, the oracle hub, its reporters or automation. A `sealed` flag alone is also insufficient: check whether upgradeable module routes, authorities with notice and parameters adjustable within their limits remain. The plan is to check and close upgrade surfaces separately, publish the source and compilation recipe, and document what becomes fixed and what remains administrable for each component. A full closure and a closure retaining changes through a notice gate have different permissions; the applied profile must be stated. Pauses, permitted parameters and external risks do not disappear when code is sealed. **Pending prerequisite at the reference date:** before increasing notice or sealing, two governance findings from the internal review must be fixed and retested. The future seal is not presented as protection already available. ## Reviews performed and their limits The work is an **internal review, not an external audit**. Documented work includes reading fund and permission paths, contract and invariant tests, upgrade and rollback rehearsals, exit and emergency review, and compilation and source-to-artifact checks. Each check covers its version and scenarios, not every possible state. The final fund-path review and the text review for publication are separate activities. Reviewing comments does not add an independent security review. The pending findings above remain a prerequisite for sealing; neither tests nor explorer source verification guarantee the absence of bugs. **Audit status at the reference date:** no external audit has been published. No security certification is claimed for these contracts. ## Official addresses All addresses below are on **Base mainnet, chain ID 8453**. They are cross-checked against the v2.2 deployment map and public manifest for the stated reference. An inventory is a snapshot: implementations and routes can change while open. Check the full address and distinguish entry points from their implementations; do not send tokens directly to a facet or module. ### Entry points and control | Contract or role | BaseScan address | |---|---| | DEX router (CoreUSDC) | [0x740E207d90ec9D82fce040F8DA0268dB761F364E](https://basescan.org/address/0x740E207d90ec9D82fce040F8DA0268dB761F364E) | | CrossMargin (collateral proxy) | [0x79ED1002F842DE2A9E25d353F2627206483b2b3B](https://basescan.org/address/0x79ED1002F842DE2A9E25d353F2627206483b2b3B) | | PairForge (oracle host) | [0x55Ec5A8DFEb6ab71BCAE98D833b4E1d96a6c871C](https://basescan.org/address/0x55Ec5A8DFEb6ab71BCAE98D833b4E1d96a6c871C) | | Registry (host) | [0x9ad0298331bda8E08034027e7C2b1352f9cEB164](https://basescan.org/address/0x9ad0298331bda8E08034027e7C2b1352f9cEB164) | | Automation (host) | [0x4b9adab771698a52460e5DeC0Ee91955436c68c2](https://basescan.org/address/0x4b9adab771698a52460e5DeC0Ee91955436c68c2) | | Uniswap V3 adapter (host) | [0x52D9bbcE58874272E1359769e643e4327427f4dB](https://basescan.org/address/0x52D9bbcE58874272E1359769e643e4327427f4dB) | | Account factory | [0x092A0905b357E72bacE1C2e3Fa46A45475FB9e24](https://basescan.org/address/0x092A0905b357E72bacE1C2e3Fa46A45475FB9e24) | | Administration coordinator | [0xA7509a1581bD718DE319475A0CEB9776bc29c463](https://basescan.org/address/0xA7509a1581bD718DE319475A0CEB9776bc29c463) | | BotradixSalida | [0x43473B3684ccB5d9d57D119f2A6bc7B9B1f5EEe5](https://basescan.org/address/0x43473B3684ccB5d9d57D119f2A6bc7B9B1f5EEe5) | | AvisoPrevio (router administrator) | [0x3a3273Df1c640D2625Bcc0f378Fc571D371f0dEd](https://basescan.org/address/0x3a3273Df1c640D2625Bcc0f378Fc571D371f0dEd) | ### Inventory of the 57 v2.2 release components These are the 54 components in the v2.2 map plus Salida, AvisoPrevio and its factory. Logic addresses are not deposit endpoints. #### Exit and notice | Contract or role | BaseScan address | |---|---| | BotradixSalida | [0x43473B3684ccB5d9d57D119f2A6bc7B9B1f5EEe5](https://basescan.org/address/0x43473B3684ccB5d9d57D119f2A6bc7B9B1f5EEe5) | | BotradixAvisoPrevio | [0x3a3273Df1c640D2625Bcc0f378Fc571D371f0dEd](https://basescan.org/address/0x3a3273Df1c640D2625Bcc0f378Fc571D371f0dEd) | | BotradixAvisoPrevioFactory | [0xD3369F63E6a8Dc60914a428c0d15d98CB9f5Ba12](https://basescan.org/address/0xD3369F63E6a8Dc60914a428c0d15d98CB9f5Ba12) | #### Dispatch and module administration | Contract or role | BaseScan address | |---|---| | BotradixDispatchKernelV2 | [0x95DC9EFbff26Acb8B9509d68dd73E712c4541093](https://basescan.org/address/0x95DC9EFbff26Acb8B9509d68dd73E712c4541093) | | BotradixRouterModuleHub | [0x1939D6DEA5032Af296888A2b5b379121981807E5](https://basescan.org/address/0x1939D6DEA5032Af296888A2b5b379121981807E5) | | BotradixRouterModuleAdminFacet | [0xd7Ee406f1309e422Ce215e1257799D595fA3EA02](https://basescan.org/address/0xd7Ee406f1309e422Ce215e1257799D595fA3EA02) | | BotradixBusinessModuleAdmin | [0x75434e902a3e9538fE9Cdc9606163fCd26073177](https://basescan.org/address/0x75434e902a3e9538fE9Cdc9606163fCd26073177) | #### Router facets | Contract or role | BaseScan address | |---|---| | BotradixAdminAuthFacet | [0x281f19360d4bd6278D8b36D239319E0152c4d15a](https://basescan.org/address/0x281f19360d4bd6278D8b36D239319E0152c4d15a) | | BotradixMarketLifecycleFacet | [0xFBe27EDAAD662eCf2315bCeEeAD626A88A8a1C3c](https://basescan.org/address/0xFBe27EDAAD662eCf2315bCeEeAD626A88A8a1C3c) | | BotradixTradeFacet | [0x4C154d0e8EC1123db8BfA9cAf5e9170229B01d59](https://basescan.org/address/0x4C154d0e8EC1123db8BfA9cAf5e9170229B01d59) | | BotradixPositionFacet | [0xa1D5a5B20b7ec4729d8d72B633CF6743Ed69E37b](https://basescan.org/address/0xa1D5a5B20b7ec4729d8d72B633CF6743Ed69E37b) | | BotradixSettlementFacet | [0x69c8228f0679db9b9d1815C5f46596D3A3cD794E](https://basescan.org/address/0x69c8228f0679db9b9d1815C5f46596D3A3cD794E) | | BotradixReadMarketFacet | [0x7CC58E07E4FF466cEB637F181118A13840b056D6](https://basescan.org/address/0x7CC58E07E4FF466cEB637F181118A13840b056D6) | | BotradixMarketAdminFacet | [0x13aa7628E7f163Ee6B55BB9d2b185Ab9e609680E](https://basescan.org/address/0x13aa7628E7f163Ee6B55BB9d2b185Ab9e609680E) | | BotradixAssetRiskFacet | [0x4c3528F5086af74B546Faa8F12AEc31A246aE77d](https://basescan.org/address/0x4c3528F5086af74B546Faa8F12AEc31A246aE77d) | | BotradixDelegateAuthFacet | [0xC10072306b31d3ad13d6c517ced6E003f92a3e5f](https://basescan.org/address/0xC10072306b31d3ad13d6c517ced6E003f92a3e5f) | | BotradixIncreaseFacet | [0x5351963473f2E1fB58853024D51494495e3E988b](https://basescan.org/address/0x5351963473f2E1fB58853024D51494495e3E988b) | | BotradixCollateralFacet | [0xD3a6759D95Dd186B3E0a04E81F3F4c0d6fF29520](https://basescan.org/address/0xD3a6759D95Dd186B3E0a04E81F3F4c0d6fF29520) | | BotradixSignedExitFacet | [0xcF06610b85C1274aEbc21BFA11C6086f87f996d8](https://basescan.org/address/0xcF06610b85C1274aEbc21BFA11C6086f87f996d8) | #### DEX components | Contract or role | BaseScan address | |---|---| | BotradixDexCreateEngine | [0x1eC79D9d237a4C1C52a1A031277418008DDc3Cc8](https://basescan.org/address/0x1eC79D9d237a4C1C52a1A031277418008DDc3Cc8) | | BotradixDexIncreaseEngine | [0x19c1124d3781902b027DFa6552d5C45a4feB86D8](https://basescan.org/address/0x19c1124d3781902b027DFa6552d5C45a4feB86D8) | | BotradixDexCloseEngine | [0x72027074498955a67c621b2D7f7f1afCcd5Dbd1E](https://basescan.org/address/0x72027074498955a67c621b2D7f7f1afCcd5Dbd1E) | | BotradixDexOrderEngine | [0x1194767Edff4E934cdDbB559261fEdE19baEc3a2](https://basescan.org/address/0x1194767Edff4E934cdDbB559261fEdE19baEc3a2) | | BotradixDexMarketFacet | [0xAf0c1d7b11E8D0D90A2Cb591D601b02f861E1B94](https://basescan.org/address/0xAf0c1d7b11E8D0D90A2Cb591D601b02f861E1B94) | | BotradixDexIntegrationFacet | [0x2015603CF00329CE95EfF785Ec28d9501056C407](https://basescan.org/address/0x2015603CF00329CE95EfF785Ec28d9501056C407) | | BotradixDexOrderFacet | [0xb18145Dde11aae097AFBe722A11df102c4C2fE47](https://basescan.org/address/0xb18145Dde11aae097AFBe722A11df102c4C2fE47) | | BotradixDexPositionFacet | [0xC36d1735434ba694C2e9b4A1efB7A9d0c2B9F8e5](https://basescan.org/address/0xC36d1735434ba694C2e9b4A1efB7A9d0c2B9F8e5) | | BotradixDexCanonicalFacet | [0xed8bc62D385f04a5ee9feC62F4b0B8e8AB7050AF](https://basescan.org/address/0xed8bc62D385f04a5ee9feC62F4b0B8e8AB7050AF) | | BotradixDexVaultFacet | [0x1039f4bC44BCa16F568C25fB954B5F88389bC7e3](https://basescan.org/address/0x1039f4bC44BCa16F568C25fB954B5F88389bC7e3) | | BotradixDexOpenEngine | [0x2Ff92928880f4ec898Be3aA71429fac326f9C490](https://basescan.org/address/0x2Ff92928880f4ec898Be3aA71429fac326f9C490) | | BotradixDexManageEngine | [0x393a9C32b81F817987E7FE6B97Dd67582ED939f6](https://basescan.org/address/0x393a9C32b81F817987E7FE6B97Dd67582ED939f6) | | BotradixDexInvertEngine | [0x510F52C36A8c77346A0209DbD77C1865E0a5882B](https://basescan.org/address/0x510F52C36A8c77346A0209DbD77C1865E0a5882B) | #### Router modules and parameters | Contract or role | BaseScan address | |---|---| | BotradixDexIntentFacet | [0x7Cc3c4b13AC75C02283797ACa5e8253e65CB5974](https://basescan.org/address/0x7Cc3c4b13AC75C02283797ACa5e8253e65CB5974) | | BotradixDexAgentFacet | [0x4E73fa57C3458Cec0e09518C65A878859D939947](https://basescan.org/address/0x4E73fa57C3458Cec0e09518C65A878859D939947) | | BotradixDexAgentEditFacet | [0xFb63b83aDb8Aa6f34E305c599dDec9De6E154776](https://basescan.org/address/0xFb63b83aDb8Aa6f34E305c599dDec9De6E154776) | | BotradixDexRiskModule | [0xEdA449CF2F93C57D7B4D8984Fb60e28615C13615](https://basescan.org/address/0xEdA449CF2F93C57D7B4D8984Fb60e28615C13615) | | BotradixDexAdlModule | [0xc1733C0bf5df9AEDD8B1386818A5C19A7CBbeA57](https://basescan.org/address/0xc1733C0bf5df9AEDD8B1386818A5C19A7CBbeA57) | | BotradixDexListingModule | [0xc21Afd694cCFDB601725A596e2ba02C9bEc16A9F](https://basescan.org/address/0xc21Afd694cCFDB601725A596e2ba02C9bEc16A9F) | | BotradixDexGuardModule | [0xF4a7a7Cac96Da442367557798214667b3a928fb4](https://basescan.org/address/0xF4a7a7Cac96Da442367557798214667b3a928fb4) | | BotradixDexExitModule | [0x65d1f0dF2E078ba5c80bDB0091A941948160CeE4](https://basescan.org/address/0x65d1f0dF2E078ba5c80bDB0091A941948160CeE4) | | BotradixDexEmergencyModule | [0xe35353e8864559a8833510F23E62e7E41D4f133C](https://basescan.org/address/0xe35353e8864559a8833510F23E62e7E41D4f133C) | | BotradixDexKeeperBatchModule | [0x736372e8cbd577BbEd55860C1d82C5ab46CfA513](https://basescan.org/address/0x736372e8cbd577BbEd55860C1d82C5ab46CfA513) | | BotradixDexParamSpec | [0xeB2EdE33468721B8116dD135b70c286a51946f3A](https://basescan.org/address/0xeB2EdE33468721B8116dD135b70c286a51946f3A) | #### Cross margin | Contract or role | BaseScan address | |---|---| | BotradixCrossMargin | [0xc1030c90C644Df556c5fe311601B55B84387f6d7](https://basescan.org/address/0xc1030c90C644Df556c5fe311601B55B84387f6d7) | | BotradixCrossSettlementFacet | [0xcD9dE1b0f9A7Fc5afE22cF4eb781198FF99FA851](https://basescan.org/address/0xcD9dE1b0f9A7Fc5afE22cF4eb781198FF99FA851) | | BotradixCrossAutomationFacet | [0xF18D2E033418DF345473FA696FF5c0aD1d504671](https://basescan.org/address/0xF18D2E033418DF345473FA696FF5c0aD1d504671) | | BotradixCrossDexCollateralFacet | [0x09E04102cE4Af4567F3f6698B23E3213cb723177](https://basescan.org/address/0x09E04102cE4Af4567F3f6698B23E3213cb723177) | | BotradixCrossDexBridgeFacet | [0x3744a1c6a8646a53404D530FF1e007d0c7af1E11](https://basescan.org/address/0x3744a1c6a8646a53404D530FF1e007d0c7af1E11) | | BotradixCrossDexReadFacet | [0xc1d7ccfCE31873129B08426C115C2B6f5D72eB78](https://basescan.org/address/0xc1d7ccfCE31873129B08426C115C2B6f5D72eB78) | | BotradixCrossModuleFacet | [0xA466E60cAe42E695Fb8f1Fc71d2f6816eE17E3dF](https://basescan.org/address/0xA466E60cAe42E695Fb8f1Fc71d2f6816eE17E3dF) | #### Business logic, extension and policies | Contract or role | BaseScan address | |---|---| | BotradixPairForgeLogic | [0x0744e9a3f4ad391414FA2d1443de2259bB1620e6](https://basescan.org/address/0x0744e9a3f4ad391414FA2d1443de2259bB1620e6) | | BotRadixRegistryLogic | [0xFBD00C93D96EF1a62EA1f017a6736927f5b98c2D](https://basescan.org/address/0xFBD00C93D96EF1a62EA1f017a6736927f5b98c2D) | | BotRadixAutomationLogic | [0xDC9604745165a2eA737485dB4232aa8555e0e529](https://basescan.org/address/0xDC9604745165a2eA737485dB4232aa8555e0e529) | | BotRadixAutomationExtension | [0x5256C7EbC2437F4820439D9754213B7759Db5dF5](https://basescan.org/address/0x5256C7EbC2437F4820439D9754213B7759Db5dF5) | | BotRadixUniswapV3Logic | [0xa9Ad93A078aB62830fbC7A4D9B9924bbBca2FAf1](https://basescan.org/address/0xa9Ad93A078aB62830fbC7A4D9B9924bbBca2FAf1) | | BotradixPairForgeParams | [0xD114ea201713EA7B9B5ea6244Fb850f0526Cc695](https://basescan.org/address/0xD114ea201713EA7B9B5ea6244Fb850f0526Cc695) | | BotradixRegistryPolicyV2 | [0x33F96413b548F1d7bbAca66E117424E4609E93b2](https://basescan.org/address/0x33F96413b548F1d7bbAca66E117424E4609E93b2) | ### Facets retained in the deployment The manifest also retains these earlier components, outside the 57 release components. They are included so the complete routes can be followed. | Contract or role | BaseScan address | |---|---| | BotradixCrossCustodyFacet | [0x4aFd0DeB7647De9d6C5Eb34C58cf28300357E717](https://basescan.org/address/0x4aFd0DeB7647De9d6C5Eb34C58cf28300357E717) | | BotradixCrossQuantFacet | [0xC31e4A46C514129983A5086d79D444854e54087b](https://basescan.org/address/0xC31e4A46C514129983A5086d79D444854e54087b) | | BotradixLiquidityFacet | [0x9EaC5c10855d1C494b30Af3e9C28123fe98ef5B9](https://basescan.org/address/0x9EaC5c10855d1C494b30Af3e9C28123fe98ef5B9) | | BotradixPreviewFacet | [0xEfdCe096526849dc313F0B0581f19aBb1bF1C4bd](https://basescan.org/address/0xEfdCe096526849dc313F0B0581f19aBb1bF1C4bd) | | BotradixReadAccountFacet | [0xdD1D8aB402FCED0b2DbD02b9D0D7783f54909B81](https://basescan.org/address/0xdD1D8aB402FCED0b2DbD02b9D0D7783f54909B81) | | BotradixConstantsFacet | [0xe65314C1ae2FE001d60Ad49d017a4869A30cB4a2](https://basescan.org/address/0xe65314C1ae2FE001d60Ad49d017a4869A30cB4a2) | | BotradixProviderRegistryFacet | [0x5B815ef9c353b62Ca1d5885077a8D7C19B5269F8](https://basescan.org/address/0x5B815ef9c353b62Ca1d5885077a8D7C19B5269F8) | ## Contact and related terms Report security issues to [support@botradix.com](mailto:support@botradix.com) with the subject **Security**, the network, affected address and reproduction steps. Include only information needed to investigate; never private keys, seed phrases or credentials. See the [Terms, sections 21–26](https://botradix.com/terms) for the protocol, exits, administrative powers, deferred payments, parameters and rollback, and the [Risks](https://docs.botradix.com/risks/) page. This explanation of the mechanism does not remove those risks. --- # Exit without the website > How BotradixSalida handles exit requests, self-execution after 24 hours, withdrawals and order cancellation, with their limits. Source: https://docs.botradix.com/exit/ BotradixSalida provides functions to request a DEX exit, execute your own exit, withdraw available funds and cancel orders without using the BotRadix website. Your account functions use the wallet sending the transaction as the owner; they do not let you choose another recipient. The exit contract does not hold your collateral: it communicates with the router, and payments go from CrossMargin to your wallet. > [!CAUTION] > Use only the address `0x43473B3684ccB5d9d57D119f2A6bc7B9B1f5EEe5`, on Base. Type it yourself on basescan.org or compare it character by character; do not follow addresses or links received in messages, ads or social networks, even if they claim to come from BotRadix. In the **Contract** tab, BaseScan must show the code at that address as verified; if it does not, do not continue. This exit never needs your recovery phrase or private key: do not share them with anyone. > [!IMPORTANT] > This guide describes the mechanism, not the state of an account or the router configuration at this moment. The periods and limits are those of the router Salida was deployed for; check its read functions before acting. **There is no guaranteed deadline for closing positions or receiving payment.** ## Step by step A summary of the full exit. Each step is detailed in the sections below; the names are those of BotradixSalida's verified code (English / Spanish, they do the same). 1. **Open Salida on BaseScan.** On **basescan.org**, type the address `0x43473B3684ccB5d9d57D119f2A6bc7B9B1f5EEe5` yourself and check that the **Contract** tab shows the code as verified. 2. **Read your status.** In **Contract → Read Contract**, expand `status` (or `estado`). In the `account` (or `cuenta`) field enter your wallet address and click **Query**. Check that `forwarder` is the Salida address and note `requestedAt`, `openPositions` and `openOrders`. 3. **Connect your wallet.** In **Contract → Write Contract**, click **Connect to Web3**. Use the wallet that owns the account, on **Base (chain ID 8453)**, with some **ETH on Base** for gas. 4. **Request the exit.** In Write Contract, `exitDex` (or `salirDelDex`), with no parameters: click **Write** and confirm in your wallet. Your account stops accepting new positions. If you had no positions or orders, the exit can complete in that same transaction. 5. **Cancel your orders, if `openOrders` is above 0.** `cancelOrders` (or `cancelarOrdenes`); in the `ids` field enter the list of your order IDs in brackets, for example `[123,456]` (how to find them: section 2). 6. **Wait for the period.** The BotRadix keeper may close your positions earlier. Otherwise, from `selfExecutableAt`, **24 hours** after the request, you can execute the exit yourself. With a confirmed emergency (`emergencyAt` other than 0) there is no wait, but only positions in fixed markets close. 7. **Execute your exit.** `executeMyExit` (or `ejecutarMiSalida`): the block without fields attempts to close up to **8** positions; the one with `maxPositions` (or `maxPosiciones`) accepts **1 to 16**. Repeat while `openPositions` is above 0 and valid prices are available. **Before confirming, raise the gas limit in your wallet to 8,000,000 by hand** (16,000,000 if you use `maxPositions` 16): with the limit the wallet computes, the transaction can succeed without closing any position, because the contract skips the closes it has no gas left for. You only pay for the gas used. 8. **Withdraw everything.** With `openPositions` at 0 and no orders, `withdrawAll` (or `retirarTodo`), with no parameters. Check the USDC and BAQ transfers to your wallet in the transaction and read `status` again. If withdrawals are paused, repeat after the pause. 9. **If something reverts or makes no progress**, do not repeat the same call: read `status` and find your case in [If it reverts or makes no progress](#if-it-reverts-or-makes-no-progress). If you cannot find the cause, keep the hash and write to [support@botradix.com](mailto:support@botradix.com). Want to cancel the request instead of exiting? Use `cancelExit` (or `cancelarSalida`), with no parameters. None of this guarantees a deadline for closing or payment: it depends on prices, orders, debts, pauses and liquidity (Terms, section 22). ## Before starting 1. Open [BotradixSalida on basescan.org](https://basescan.org/address/0x43473B3684ccB5d9d57D119f2A6bc7B9B1f5EEe5#code). Check the full address, `0x43473B3684ccB5d9d57D119f2A6bc7B9B1f5EEe5`, and that the **Contract** tab shows the code as verified. 2. **Before connecting or sending anything**, open **Contract → Read Contract**. Expand `status` (alias `estado`), enter your wallet address in `account` (or `cuenta`) and click **Query**. In the returned tuple, `forwarder` must be **the Salida address above**. If it is zero, different, or the read fails, do not continue through this Salida: check the address and router configuration. Also read `ROUTER()` and compare it with the [official addresses](https://docs.botradix.com/security-contracts/). 3. Set your wallet to **Base mainnet, chain ID 8453**, with **ETH on Base for gas**. Use the wallet that owns the positions and collateral; your account functions act on the signer. 4. At the same Salida address, open **Write Contract**, click **Connect to Web3**, choose your wallet and check the connected account and network. Connecting does not execute an exit. 5. For each action below, expand the block with that name, fill in its parameters, click **Write** and confirm the transaction in your wallet. Open its hash, wait for confirmation and query `status(yourAddress)` again in **Read Contract**. Recheck `forwarder` before further actions; an earlier read does not prevent later router changes. Reads do not change state or require a transaction. Dates are Unix timestamps in **seconds**, not countdowns or local times. | Field in `status(yourAddress)` | How to interpret it | |---|---| | `requestedAt` | Zero: no pending request. A nonzero value: the request timestamp. | | `selfExecutableAt` | The ordinary time from which you can execute your exit; a prior request is required. A confirmed emergency skips the wait even if this field still shows the ordinary time. | | `openPositions`, `openOrders` | Counts of remaining positions and orders. These are not ID lists. | | `withdrawalsPaused`, `withdrawalsPausedUntil` | Whether withdrawals are paused and when the pause ends. | | `emergencyChallengeAt`, `emergencyAt` | The first indicates a challenge; only `emergencyAt != 0` indicates a confirmed emergency. | | `emergencyPending`, `unsettledAccounts`, `distributionOpenedAt` | Your account's pending settlement, the global count of unsettled accounts, and the distribution opening time (`0`: not open yet). | | `emergencyClaimUSDC`, `deferredUSDC` | Emergency claim and deferred payment; these are not free funds already received. | ## Your account functions The functions have Spanish and English aliases that follow the same path. | Action | Spanish name | English name | |---|---|---| | Request an exit | `salirDelDex()` | `exitDex()` | | Execute your exit | `ejecutarMiSalida()` or `ejecutarMiSalida(uint256)` | `executeMyExit()` or `executeMyExit(uint256)` | | Withdraw what is available | `retirarTodo()` | `withdrawAll()` | | Cancel your orders | `cancelarOrdenes(uint256[])` | `cancelOrders(uint256[])` | | Cancel the exit request | `cancelarSalida()` | `cancelExit()` | The return values described below are contract results. **A receipt marked `Success` does not usually display those values or prove that everything was withdrawn**: check the `status` reads and the transfers to your wallet. `SalidaUsada` identifies the action sent, not completion of the process. ### 1. Request an exit In **Write Contract**, use `exitDex()` or `salirDelDex()`, with no parameters. It records the request and locks new positions for the account. If there are no open positions or orders, it attempts to complete withdrawal in that transaction, subject to the other checks. Repeating a pending request keeps its original timestamp; it does not restart the 24-hour wait. It returns `1` if the exit completed in that transaction and `0` if it remains pending. Check `requestedAt`, `selfExecutableAt`, `openPositions` and `openOrders`. A `0` is not itself a failure: continue with pending orders and positions. A `1` does not guarantee payment of unbacked deferred amounts or unpaid claims. The keeper can cancel orders and close positions using valid prices observed **at or after the request**. Execution within seconds is not promised. Price, funding and liquidation risk remain during the wait. ### 2. Cancel pending orders The IDs this function takes are those of the router's `DexOrderCreated` events, the router being the address returned by `ROUTER()`. On BaseScan, open that address and look in its **Events** for the `DexOrderCreated` events of your wallet: in that event, the first indexed value is the order ID, the second the owner wallet and the third the `pairId`. Copy only the order IDs, never the `pairId`. Return to **Salida's Write Contract**, expand `cancelOrders` or `cancelarOrdenes` and enter the list in `ids`, for example `[123,456]`, **replacing those numbers with your actual IDs**. It needs no prices and returns no value. Check that `openOrders` goes down. An order of yours that was already executed or cancelled is ignored; an order of another wallet, or an ID that is not yours, reverts the whole transaction. Cancelling orders does not by itself close all positions. The self-execution function does not enumerate and automatically cancel all your entry orders: check `openOrders` and cancel any remaining ones so the exit can complete and their reserves can be released. ### 3. Execute your exit after 24 hours If the request remains pending, read `status(yourAddress)` and use `executeMyExit` or `ejecutarMiSalida` in **Write Contract** once `selfExecutableAt` is reached, **24 hours after the request**. A confirmed emergency (`emergencyAt != 0`) removes that wait, but you must still request the exit with `exitDex()` first; opening a challenge is not enough. BaseScan shows two versions with the same name: the block **without input fields** attempts to close up to **8 positions**; the one with `maxPositions` (or `maxPosiciones`) lets you enter a batch size of **1 to 16**. Available gas can reduce the amount processed. Multiple calls may be needed. For an unfrozen market, both price legs must have an open session, have been observed at or after the request, be at most **10 minutes** old, not be dated in the future and meet their confidence limits. A frozen market uses its fixed price. **During an emergency, only positions in frozen markets can close.** Positions without a usable price are skipped and remain open. It returns `(closed, remaining, finished)`: positions closed in this call, positions still open, and `1` if the exit completed (`0` otherwise). Check `status(yourAddress)` after each batch. Repeat while positions remain and price conditions are met; if there is no progress, check the causes below. If orders, debts, an effective pause or pending emergency settlement remain, closing the last position may not complete withdrawal. **During an emergency, finish with `withdrawAll()`**, even if no positions remain. Reaching 24 hours enables a call; it does not trigger a transaction or guarantee available prices or funds. ### 4. Withdraw what is available Once `openPositions` is `0`, cancel any remaining orders first and use `withdrawAll()` or `retirarTodo()` in **Write Contract**, with no parameters. It needs no prices or prior exit request. With open positions it reverts with `DexPositionsOpen`. It attempts to settle and collect applicable emergency payments, claim deferred payments that now have backing, and withdraw available free USDC and BAQ to the owner wallet. It returns no value: check the USDC and BAQ transfers to your wallet in that transaction and the new state. A successful transaction can reflect a partial withdrawal or a zero amount; it does not by itself prove that nothing remains pending. During a pause the router emits `DexExitAwaitingWithdrawal` and stops withdrawal **without necessarily reverting the transaction**. Repeat once the pause ends. Order reserves are not withdrawn; cross debt or pending settlement can also prevent completion. Calling this function does not turn an unbacked deferred payment into withdrawable balance. During an emergency, distribution requires no open position anywhere in the DEX and every account to be settled. If `distributionOpenedAt` is still `0` or a claim remains, call again once those conditions are met; payment may be partial, with a deferred remainder. ### Cancel the request To cancel a pending request, use `cancelExit()` or `cancelarSalida()`, with no parameters, in **Write Contract**. It returns no value: check that `requestedAt` is back to `0`. It removes that request's lock on new positions; it does not remove an emergency or other protocol restrictions. It does not restore closed positions or cancelled orders, or reverse confirmed transactions. A later exit request starts a new ordinary wait. ## If it reverts or makes no progress If BaseScan or the wallet warns that the call would revert, check the cause before signing. A transaction confirmed as failed keeps no changes from that call but consumes gas. Do not repeat it without addressing the condition that prevents it. Salida forwards the call to the router: if the router's code does not appear as verified on BaseScan, the error reason may show as a hexadecimal code instead of a name. The `status` and `market` reads tell you which situation you are in. | Situation | What to do | |---|---| | `executeMyExit()` or `cancelExit()` would fail and `requestedAt` is `0` | There is no pending request. If you want to exit and positions remain, request the exit with `exitDex()` first. If the exit already completed, you do not need to cancel it. | | `executeMyExit()` would fail before `selfExecutableAt` | Wait until that time, unless an emergency is confirmed (`emergencyAt != 0`). | | `withdrawAll()` reverts with `DexPositionsOpen` | Positions remain: request an exit if needed, close them with `executeMyExit()` when eligible and read the state again. | | Any of your account functions would fail with no other visible cause | Check that `forwarder` is this Salida address, the connected account and, for `cancelOrders`, that every ID belongs to an order of your wallet. Adding gas does not fix it. | | `DexExitAwaitingWithdrawal` or `withdrawalsPaused == true` | Withdrawal is waiting, not necessarily reverting. Read `withdrawalsPausedUntil` and retry withdrawal after the pause. | | `withdrawAll()` succeeds but not everything arrives | A pause, orders with reserved funds, cross debt, a pending settlement or an unbacked deferred payment may remain. Check `openOrders`, `deferredUSDC`, `emergencyPending` and the pause; if the reads do not explain it, report the hash to support. | | No positions closed, or `finished == 0` | There may be no valid price, too little gas for another position, orders, debt or pending settlement. Read the counters and market state; during an emergency the market may still need fixing. A successful call does not force those conditions to be met. | | Insufficient gas | Check ETH on Base and the estimate. For self-execution, try a smaller batch, such as `maxPositions = 1`; split order lists into smaller batches. | | A community function would fail | The challenge or emergency is not in the required state, or its period has not elapsed. Read `status` (`emergencyChallengeAt`, `emergencyAt`) and `market(pairId)` (`challengeOpenedAt`, `settleAfter`, `frozenKind`) again before retrying. | | `confirmEmergency` would fail with a market list | Read the complete, ascending list from `marketsWithPositions()` again; do not invent IDs or use a shortened list. | | `settleMarket` would fail although `settleAfter` has passed | There may be no observation to fix the price with: reaching the deadline does not create a price. Check `market(pairId)` and report the problem. | If you cannot identify the cause, keep the hash and visible error and contact [support@botradix.com](mailto:support@botradix.com). Waiting or repeating the same call is not guaranteed to complete it. ## Pauses, missing prices and emergency Under the rules of the router Salida was deployed for, each withdrawal pause expires after 72 hours, requires 24 hours without a pause before the next one and does not apply during a confirmed emergency. Other payment constraints can remain after expiry. The **community functions** are also in **Salida's Write Contract**. Anyone can pay gas to call them when their conditions are met. Results and payments belong to each account owner; submitting the transaction gives no right to anyone else's funds. They do not activate automatically when your request reaches 24 hours. | English function / Spanish alias | Conditions and result | |---|---| | `openEmergencyChallenge()` / `abrirDesafioEmergencia()` | Opens the public **72-hour** challenge if positions exist in the DEX and there is no emergency yet. Read `emergencyChallengeAt`. | | `confirmEmergency(markets)` / `confirmarEmergencia(mercados)` | After 72 hours, get the **complete, ascending** `bytes32[]` list from `marketsWithPositions()` / `mercadosConPosiciones()` in **Read Contract** and paste it into `markets` (or `mercados`) in **Write Contract**. Returns `true` if it activates the emergency. An observation of USDC or a market with positions since the challenge opened, even with a closed session, clears the challenge and returns `false`. Check `emergencyAt`. | | `fixEmergencyMarkets(markets)` / `fijarMercadosEmergencia(mercados)` | During an emergency, fixes the remaining markets with positions; returns how many it fixed. Use the market IDs from the read above and repeat if gas left work pending. Price and funding are fixed at the emergency instant even if fixing finishes later. | | `challengeMarket(pairId)` / `desafiarMercado(pairId)` | Opens the **3-day** challenge for a market with positions that is not frozen. `pairId` is the pair's number, not a `bytes32` market ID. Read `market(pairId)` / `mercado(pairId)`, including `challengeOpenedAt` and `settleAfter`. | | `settleMarket(pairId)` / `liquidarMercado(pairId)` | From `settleAfter`, with no observations since the challenge, freezes the market at its last observed price and fixes its funding. Returns `true` when it freezes the market; a later observation clears the challenge and returns `false`. Check `frozenKind` and `frozenPriceX18` in `market`. | | `closeFrozen(positions, orders)` / `cerrarCongeladas(posiciones, ordenes)` | Takes two ID lists, closes positions in frozen markets and cancels their orders; during an emergency it can cancel any order. Returns `(positions closed, orders cancelled)`. Batches may be needed; results stay in the owners' accounts. | | `settleAccounts(accounts)` / `liquidarCuentas(cuentas)` | During an emergency, settles the listed accounts with no positions or orders; returns how many it settled. Net gain: a claim. Net loss: cash, then committed BAQ backing. Accounts not yet eligible are skipped. | | `payEmergencyClaims(accounts)` / `cobrarReparto(cuentas)` | With no positions anywhere in the DEX and all accounts settled, opens distribution and credits each owner's share to their CrossMargin account. Returns the total amount paid, not the number of accounts; `0` can mean distribution cannot open yet. Each owner finishes with `withdrawAll()` to withdraw to their wallet. | A confirmed emergency is final for this DEX and stops trading; the administrator can declare it without the public challenge. Distribution applies the same fixed percentage to everyone: the smaller of 100% and available liquidity (vault, insurance and emergency reserves, excluding reserves for earlier deferred payments) divided by claims, subject to rounding. Any shortfall remains deferred, without a guaranteed payment deadline. Challenges, batches and distribution require transactions; no clock executes them automatically. ## What this exit depends on BotradixSalida has no administrator or upgrade mechanism of its own, but **depends on the router and CrossMargin**. The router must recognize it as the `forwarder`. While configuration is open, administration can replace or disconnect it using `setDexExitForwarder(address(0))` and can change the logic processing exits without mandatory advance notice. A return to an earlier router version can leave Salida unusable even if its address still exists. After the sealing provided for by this code, Salida can no longer be disconnected and router modules can only change through the advance-notice gate, with a committed minimum of at least 72 hours. This describes the sealing rules; it does not claim sealing is active. Administrative changes are public transactions on Base. Leaving without the website removes dependence on that interface, but not on the Base network, prices, deployed code, account conditions or liquidity. See [Security and contracts](https://docs.botradix.com/security-contracts/), [Risks](https://docs.botradix.com/risks/) and [Terms §22: independent exit, pauses and emergency](https://botradix.com/terms?lang=en#dex-exit), together with sections 23–24 on administration and deferred payments. --- # How to read BotRadix proxies > Follow router facets, module routes, CrossMargin and business controls without assuming EIP-1967. Source: https://docs.botradix.com/proxies/ BotRadix proxies and router **do not use EIP-1967**. The router also does not expose the EIP-2535 loupe. An explorer failing to detect a proxy, or an empty standard slot, does not prove that logic is fixed. Follow each family's own read functions. ## Address, state and logic The host or proxy retains its address and state. When it delegates a function, code from another address executes against that state. An implementation can change without moving funds or changing the address the user sees. To reconstruct a route, start from the [official addresses](https://docs.botradix.com/security-contracts/), identify the function selector and query the contracts at **the same block**. Record the block number and hash, addresses, revisions and code hashes: mixing reads before and after an upgrade can produce a route that never existed. An implementation ABI helps interpret delegated functions, but state reads and user transactions belong at the host address. Calling an implementation directly can revert or read different state. Identity reads explicitly directed to the implementation below are an exception. ## Router: facets, dispatch kernel and modules The router combines a host table, extensions and a dispatch kernel that can prioritize the module registry. A facet is a piece of logic to which a function is routed. | Read | What it checks | |---|---| | `routerLifecycle()` on the router | Readiness, configuration seal, epoch, manifest and pending proposal | | `getFacetManifest()` on the router | The 17 manifest facets and their code hashes | | `facetForSelector(bytes4)` on the router | The host route for that selector; alone it does not reflect a registry override | | `dispatchLifecycle()` on the router | Address, code hash, revision and proposal of the dispatch kernel | | `moduleRegistryInfo()` on the router | Lookup mode, epoch, manifest, frozen state, delay and registry size | | `moduleRoute(bytes4)` on the router | Reported effective target for that selector, identity, revision and route source | | `TRADE_FACET()`, then `dexModule(0..12)` on that facet | Internal DEX components delegated to by the trading facet | With a kernel that enables the registry, a module route can take priority over the host route. In `moduleRoute()`, source `1` means a fixed or extension route, `2` the registry, and `3` a registry override of a fixed route; `0` means no effective route. A new selector may point to the hub in the host table: that hub reverts unless the required module route exists. A kernel that ignores the registry changes this interpretation, which is why `dispatchLifecycle()` and lookup mode also matter. `DexExtensionInstalled` events help reconstruct extension changes, but a historical event does not prove the current route. Compare it with reads at the chosen block. Checking only the 17 facets omits extensions and module overrides. ## CrossMargin: custom slot and modules On the CrossMargin proxy, `implementation()` returns the logic and `lifecycle()` exposes its seal, proposal, revisions and hashes. Its lifecycle storage root is: ```text bytes32(uint256(keccak256("botradix.cross.proxy.v1")) - 1) ``` This uses Ethereum Keccak-256, not SHA3-256. It is not the EIP-1967 slot. The first field is the implementation address; it shares a word with the sealing boolean, so do not interpret the entire word as an address. Prefer the read functions. Next, call `implementationModules()` **on the returned implementation address** to identify its eight internal pieces. Account queries still belong at the proxy. Also call `moduleRegistryInfo()` and `moduleRoute(selector)` on the proxy to distinguish those pieces from module registry routes. Sealing the proxy and freezing every route or parameter are different questions. ## Business proxies: separate control The oracle hub (PairForge), Registry, Automation and the Uniswap adapter use a separate control contract. Other business components, such as CrossVerifier, use the same family. 1. Read `BUSINESS_CONTROL()` on the host. 2. On the returned control, read `current()`, `revision()` and `isSealed()` for the logic, its revision and that path's seal. 3. Read `openPolicyLifecycle()` on the host for the corresponding upgrade policy. A policy and business logic are different components. 4. Where the host exposes the module registry, also read `moduleRegistryInfo()` and `moduleRoute(selector)` there. The main logic alone does not describe every function. ## Reference example **Documentation snapshot: 11 October 2026.** These relationships provide orientation, not a substitute for a current read: | Starting point | Read | Reference result | |---|---|---| | Router `0x740E207d90ec9D82fce040F8DA0268dB761F364E` | `dispatchLifecycle()` | BotradixDispatchKernelV2 `0x95DC9EFbff26Acb8B9509d68dd73E712c4541093` | | CrossMargin `0x79ED1002F842DE2A9E25d353F2627206483b2b3B` | `implementation()` | BotradixCrossMargin `0xc1030c90C644Df556c5fe311601B55B84387f6d7` | | PairForge `0x55Ec5A8DFEb6ab71BCAE98D833b4E1d96a6c871C` | `BUSINESS_CONTROL()` | Control `0x255DdF4313FC5D547c3925748f30A8008676551f` | | That PairForge control | `current()` | BotradixPairForgeLogic `0x0744e9a3f4ad391414FA2d1443de2259bB1620e6` | ## What verification establishes Verifying a host's source does not automatically verify its implementations, modules, policies or controls. A combined ABI also does not prove which route was active at a block. A complete check relates each component's address, bytecode, reproducible source, routes, authorities and seals. **Publication status at the reference date:** source will be published jointly on BaseScan near closure. Read or write buttons are not assumed to exist already for every function. The mechanism above can also be inspected with tools holding the correct ABIs, without sending transactions. See [Security and contracts](https://docs.botradix.com/security-contracts/) to interpret OPEN, the limits of AvisoPrevio and staged sealing, and [Reproducible compilation](https://docs.botradix.com/reproducible-build/) to relate source and bytecode. --- # Reproducible compilation > The solc 0.8.37 recipe, exact input hash and checks for relating sources, artifacts and deployed code. Source: https://docs.botradix.com/reproducible-build/ A reproducible compilation checks that specific sources and settings produce the expected artifacts. It establishes correspondence; **it is not a security audit** and does not prove that an implementation is still active. That requires [reading proxy routes](https://docs.botradix.com/proxies/) at a specific block. ## Compiler and settings The v2.2 reference recipe uses: | Setting | Value | |---|---| | Solidity | `solc 0.8.37+commit.f401782d` | | Input language | `Solidity`, Standard JSON format | | Optimizer | `enabled: true`, `runs: 200` | | Compilation through IR | `viaIR: true` | | EVM target | `evmVersion: "paris"` | | Metadata hash in bytecode | `metadata.bytecodeHash: "none"` | | Reference input dependencies | OpenZeppelin `5.6.1`, included with their original source unit names | This settings fragment describes the recipe. Compile with the complete input, including sources and `outputSelection`, rather than reconstructing it from the fragment: ```json { "optimizer": { "enabled": true, "runs": 200 }, "viaIR": true, "evmVersion": "paris", "metadata": { "bytecodeHash": "none" } } ``` ## Identify the exact input The Standard JSON input collects source and dependency content under their original paths. Preserve filenames, imported source unit names, settings and versions. Do not replace dependencies with the latest release or mix sources from different releases. **Documentation reference: 11 October 2026.** The `v22.standard-input.json` input in reference package `20261011-145007` contains 54 source units. Its SHA-256, calculated over the file bytes, is: ```text 54a204b3dd61ceb7196f84c7337927fbf5b3af5c721e6eac1319487da050ddf6 ``` This hash identifies that specific input, not a final package yet to be published. Changing comments or JSON formatting changes the file hash even if bytecode remains identical. Publication must identify its own input and SHA-256 along with the bytecode comparison result. **Publication status:** verified sources will be published jointly on BaseScan near closure. Public download of the final input and artifacts is pending; no unavailable download URL is presented here. ## Reproduce without publishing With the exact compiler already installed and the complete input available, work in a local directory. These commands do not send transactions or publish code: ```bash solc --version sha256sum v22.standard-input.json solc --standard-json < v22.standard-input.json > v22.compiler-output.json ``` Check that the version includes `0.8.37+commit.f401782d` and the hash matches the file from the release being verified. The hash above applies only to the stated reference input. An input embedding all sources does not need network import resolution. Also check errors in the output JSON: the process exit code alone does not prove that Solidity compiled successfully. ```python import json from pathlib import Path result = json.loads(Path("v22.compiler-output.json").read_text()) errors = [item for item in result.get("errors", []) if item.get("severity") == "error"] for item in errors: print(item.get("formattedMessage", item.get("message", ""))) assert not errors, "Solidity compilation failed" assert result.get("contracts"), "No contract output" print("Compilation completed; compare artifacts next") ``` Review warnings too, and retain the compiler, input, output and hashes. This local compilation requires no wallet, private key or API key. ## Compare artifacts and deployment Compare by **source unit name and contract name**, not just output filename. For identical sources, compare both `evm.bytecode.object` (creation) and `evm.deployedBytecode.object` (runtime), together with ABI and storage layout when evaluating an upgrade. Compiler runtime can contain locations for `immutable` values set by the constructor at deployment. Checking an address requires resolving `immutableReferences`, constructor arguments and any linked-library references. Creation code and constructor arguments are also different things. Do not discard arbitrary differences to force a match. `bytecodeHash: "none"` omits the metadata hash from bytecode; it does not mean that every source change is harmless or that all metadata information disappears. A comment-only change can preserve generated code, but recompilation and comparison are required to demonstrate it. Changing logic, literals or names used to compute identifiers can change the result. Comparison with on-chain code must identify the network, address and block, and handle the host, implementations and modules separately. A proxy match does not establish the logic it delegates to. See [Security and contracts](https://docs.botradix.com/security-contracts/) for review scope and possible changes while components remain OPEN. --- # Risks > The risks of leveraged trading, automation and smart contracts, stated plainly. Source: https://docs.botradix.com/risks/ Trading perpetual futures, especially with leverage, is high risk. You can lose all the collateral you deposit. This page explains the main risks of using BotRadix in plain language. It is not exhaustive and it is not financial advice. > [!WARNING] > Only trade with money you can afford to lose. Past results of any strategy or bot do not guarantee future results. ## Market and leverage risk - Prices of crypto assets, stocks, indices, commodities and currencies can move sharply and quickly. - Leverage multiplies both gains and losses. At 100x, a price move of less than 1% against you liquidates an isolated position and its whole margin is lost. - Synthetic pairs combine the movements of two assets and can be more volatile than either one. ## Liquidation risk - If your margin falls to the maintenance level, your position is **liquidated in full**, in a single execution, and the loss is final. - With the v2.2 reference values, an isolated position loses its entire margin when liquidated (adjustable penalty). - In fast markets the price can move past your stop loss or your liquidation price before an execution happens. - Withdrawing collateral and paying funding move cross liquidation prices closer. See [Liquidation](https://docs.botradix.com/liquidation/). ## Oracle and data risk - Every price used by the DEX comes from the PairForge data provider. On Base it is signed by three reporters operated by BotRadix, and a 2-of-3 quorum is required. - If sources report wrong data, or reporters fail, prices may be inaccurate or unavailable. - Without current prices, actions that need them wait: opening and closing positions, liquidations, and withdrawals while you hold open cross positions. - A market can be administratively closed (`SESSION_CLOSED`) when its data is unreliable; while closed, its positions cannot be opened, closed or liquidated through ordinary paths, except for the freezing and emergency procedures, and valid funding does not stop because of it. - If a market stops receiving prices, anyone can challenge it; after 3 days without a price it is settled at its last observed price, which may differ from the price the asset trades at elsewhere. - Orders execute at the oracle price, which can differ from prices on other exchanges. See [Prices and oracle](https://docs.botradix.com/oracle/). ## Smart contract risk - The contracts may contain bugs that could cause losses, including loss of deposited funds. - Check source verification for each address on BaseScan. No third-party audit report has been published; source verification alone does not establish safety. - Base is a layer-2 network; congestion, outages or problems on Base or Ethereum can delay or prevent transactions. ## Administrative and centralization risk - The contracts are **upgradeable by BotRadix** with a single administrator key. Router changes go through an advance-notice gate whose notice is **0 hours** today; the cross-margin contract that holds the collateral and the business logic can be upgraded **immediately**. This belongs to the current consolidation phase: sealing is planned by component once the system has proven stable. - If the administrator key were stolen, the attacker could upgrade CrossMargin immediately. Monitoring would make it visible; it would not prevent it. - The administrator can pause the DEX, put markets in reduce-only mode, pause withdrawals (at most 72 hours at a time), change fees, maintenance margin, the profit cap, the BAQ credit and other parameters within the contracts' limits, and withdraw the vault's free liquidity. Pause-only keys can also pause, but never resume. - The **independent exit** lets you leave from BaseScan, but it depends on prices being published within its time limits (24 hours, 3 days, 72 hours) and, while the contracts are open, on the exit contract staying connected. See [Exit without BotRadix](https://docs.botradix.com/exit/). - Keepers, executors, the terminal and the API are operated by BotRadix. If they are unavailable, resting orders, take profit, stop loss and liquidations may be delayed. See [Security and contracts](https://docs.botradix.com/security-contracts/) and [Smart contracts](https://docs.botradix.com/contracts/). ## Vault and capacity risk - Profits are paid by the protocol's vault. Each position has a **maximum profit**; beyond it, further favourable moves do not increase your gain. - **Auto-deleveraging (ADL).** When the vault is at risk, winning positions can be reduced or closed early, at the oracle price, even if you did not ask for it, and you lose any further gain. The cap applies and funding is settled; the net is paid from available liquidity and any uncovered part is deferred, so immediate payment of the entire gross gain is not guaranteed. A position with a valid backed take profit is not closed for this reason. With a small vault, ADL can act after relatively moderate moves. - When capacity limits are reached, new positions can be rejected or a market can move to reduce-only. - After an extreme price gap the vault and reserves could still fall short; unpaid profits would be recorded as deferred payments, not withdrawable balance, and could only be claimed if contributions or vault income replenish their backing, with no guaranteed payment or deadline. In an emergency, profits are paid pro rata and the shortfall remains deferred. See [Leverage and margin](https://docs.botradix.com/margin/#profit-cap). ## Wallet and key risk - Anyone with access to your wallet can withdraw your collateral. Protect your seed phrase and never share it. - A compromised browser holding your trading key can trade on your behalf (it cannot withdraw). Revoke trading keys and API keys you no longer use. - Transactions on Base cannot be reversed. ## Automated trading risk - Bots follow their configuration mechanically; they can open losing positions, accumulate positions with DCA and keep trading in adverse conditions. - Connectivity problems, exchange outages, API changes or rejected orders can prevent a bot from acting at the expected time. - A bot paused or stopped by your tier, by an error or by you does not close its open positions. - On Uniswap, every bot swap needs a second signature from a BotRadix co-signing service and respects rate limits and a price safety band. Without an available co-signer, Uniswap bots, including their stop-losses, wait until one returns; no band guarantees stop-loss execution. See [Quant bot](https://docs.botradix.com/quant/) and [Grid bot](https://docs.botradix.com/grid/). ## Third-party venue risk Bots on Hyperliquid or Uniswap trade on platforms that BotRadix does not control. Their rules, fees, outages or failures, and the custody of the funds you keep there, are their responsibility. ## BAQ token risk BAQ can be volatile and thinly traded, and its price can fall sharply, even losing most of its value. Its value affects your bot limits and its collateral credit on the DEX. BAQ is not a share in BotRadix and pays no dividends or yield. See [BAQ](https://docs.botradix.com/baq/). ## Legal, regulatory and tax risk - Regulations on derivatives and crypto assets vary by country and can change. You are responsible for using BotRadix only where it is lawful for you. - You are responsible for your own tax obligations; the history export can help you keep records. - Read the [Terms](https://botradix.com/terms) and [Privacy policy](https://botradix.com/privacy). --- # FAQ > Short answers to the questions users ask most. Source: https://docs.botradix.com/faq/ ## General ### What is BotRadix? BotRadix is a trading platform with three parts: the **BotRadix DEX**, a perpetual futures exchange on Base where you trade from your own wallet; **trading bots** (Quant and Grid) that automate strategies on the BotRadix DEX, Hyperliquid or Uniswap; and **BAQ**, the BotRadix token. See the [overview](https://docs.botradix.com/). ### Do I need an account? Not for the DEX: a wallet on Base is enough. Bots need a BotRadix account. New account registrations are temporarily closed; existing accounts can sign in normally. ### Which wallets can I use? Any EVM wallet that supports the Base network, for example MetaMask, Rabby, Coinbase Wallet, OKX Wallet, Rainbow, Trust Wallet, Phantom or Brave Wallet. Smart-contract wallets that cannot sign permits deposit USDC with the classic approval and deposit transactions. ### Is there a mobile app? Yes, for Android, downloadable from botradix.com. There is no iOS version yet. See [Mobile app](https://docs.botradix.com/mobile/). ## BotRadix DEX ### What can I trade? 150 perpetual markets settled in USDC: 50 crypto markets, 18 multi-asset markets (stocks, indices, metals, natural gas, euro and pound) and 82 synthetic cross pairs. See [Markets](https://docs.botradix.com/markets/). ### What can I use as collateral? USDC, which counts in full, and BAQ, which adds a limited credit in cross margin only and, under the code in force, is not sold to cover losses (it remains exposed to its price risk). See [Collateral](https://docs.botradix.com/collateral/). ### How much does trading cost? An opening fee of 0.06% (taker) or 0.03% (maker) plus the BotRadix service fee of 0.03%, no closing fee, and funding of up to 0.03% every 8 hours under the current operational policy, paid or received. These are reference values for v2.2 deployed on 11 October 2026 and adjustable. Most network gas is paid by the protocol. See [Fees](https://docs.botradix.com/fees/). ### Do I need ETH? Only for actions sent from your wallet: classic withdrawals, BAQ deposits, approvals, revocations and exit actions from BaseScan. Trades made with your trading key, USDC deposits by permit, withdrawals by signature and the execution permission cost you no gas. ### What is the maximum leverage? Up to 100x on the first size tier of every market; larger positions have lower maximums. The minimum position is 18 USDC in the v2.2 catalogue (per-market configuration). Maintenance also limits maximum leverage. See [Leverage and margin](https://docs.botradix.com/margin/#leverage-tiers). ### Is there a limit on profit? Yes. Each position has a gross maximum profit: at the v2.2 launch, 20 times its size for new exposure, which a long reaches only if the price rises 21-fold. Earlier exposure keeps its cap. See [Profit cap](https://docs.botradix.com/margin/#profit-cap). ### Can my position be closed without my asking? Yes. **Liquidation** closes positions at or below maintenance; **ADL** may reduce or close winners without a valid backed TP when vault capacity is strained. There are also closes after a market is frozen or an emergency is declared, under their own rules. The cap and funding apply, and profit that available liquidity cannot cover may be deferred without a payment deadline or guarantee. See [Leverage and margin](https://docs.botradix.com/margin/) and [Exit without BotRadix](https://docs.botradix.com/exit/). ### How many positions and orders can I have? Up to 128 open positions, cross positions on up to 32 markets and 256 open entry orders per wallet. See [Account limits](https://docs.botradix.com/orders/#account-limits). ### Why was my order rejected? The terminal checks every order before you sign and shows the reason. Common causes are a price move beyond your slippage, a price that is not current, a leverage tier or open-interest cap, the vault's capacity, insufficient margin, or a market that is closed or reduce-only. See [Errors and limits](https://docs.botradix.com/api-errors/). ### Why can't I withdraw? A withdrawal must leave your account healthy. With open cross positions, it needs current prices and enough free margin; if the amount is too high the terminal shows **"Not enough free margin to withdraw this amount"**: withdraw less or close positions first. Withdrawals can also be paused for safety, for at most 72 hours at a time. See [Withdrawing](https://docs.botradix.com/collateral/#withdrawing). ### What happens if I am liquidated? The whole position is closed in a single execution. With the v2.2 reference values, an isolated position loses its margin (adjustable penalty, split 90% to the vault and 10% to the BAQ reserve); a cross liquidation is paid from your collateral and carries no additional penalty. See [Liquidation](https://docs.botradix.com/liquidation/). ### Can BotRadix access my funds? Your trading key, trading sessions and API keys cannot withdraw, and under the current code the administrator has no function to move your collateral to another address. However, while the contracts are open BotRadix can upgrade the cross-margin contract that holds the collateral immediately (router changes go through an advance-notice gate, 0 hours today), and withdrawals can be paused for up to 72 hours at a time. Read [Security and contracts](https://docs.botradix.com/security-contracts/) and [Risks](https://docs.botradix.com/risks/) before depositing. ### What happens if BotRadix's services stop? Your positions and collateral are recorded on Base, and you can leave without BotRadix from BaseScan: request your exit, and if BotRadix does not execute it within 24 hours, close your positions yourself with a price observed since your request, at most 10 minutes old, with both legs in an open session and within their confidence. A public emergency requires opening a challenge while positions exist and waiting 72 hours without observations of USDC or of markets with positions; positions are then closed at fixed prices and profits are paid pro rata from available liquidity. During the open phase the administrator can change these rules without mandatory advance notice. See [Exit without BotRadix](https://docs.botradix.com/exit/). ### Are the contracts audited? The contracts went through an internal review before v2.2. Check source verification for each address on BaseScan; it does not replace an audit. No third-party audit report has been published. See [Verification and audits](https://docs.botradix.com/contracts/#verification-and-audits). ## Bots ### Where can bots trade? On the BotRadix DEX, on Hyperliquid (through a dedicated agent wallet) and on Uniswap on Base (spot). See [Connecting exchanges](https://docs.botradix.com/exchanges/). ### Do I need BAQ to use bots? On the BotRadix DEX, up to 2 Quant bots, 6 pairs and 1 Grid are free. On Hyperliquid and Uniswap you need BAQ worth at least 20 USD in your linked wallet, and Grid needs the 100 USD tier. See [Access tiers](https://docs.botradix.com/baq/#access-tiers). ### Does BotRadix hold my funds when a bot trades? On Hyperliquid, funds remain in your account and the agent wallet has trading permissions. On Uniswap, swaps use wallet-authorized limits and the required co-signature. On the BotRadix DEX, collateral is held in Base contracts; the current code prevents an API key from authorizing withdrawals. This is not an absolute custody guarantee: BotRadix can change its open contract logic with 0 h notice, during consolidation before future sealing by component. ### What happens to my positions if I stop a bot? They stay open. Stopping or pausing a bot never closes its positions automatically; use **Close all** (Quant) or **Close inventory** (Grid) if you want to exit. ### Can a bot lose money? Yes. Bots apply their rules mechanically and can lose money, sometimes quickly. See [Risks](https://docs.botradix.com/risks/#automated-trading-risk). ### What if the value of my BAQ falls? For bot access, your limits adjust: excess Quant bots are paused and excess Grids stop, without closing positions solely because of the tier change. If you also use BAQ as DEX collateral, a lower price can reduce its margin credit and bring cross positions closer to liquidation. ## Developers ### Is there an API? Yes. The DEX API v1 offers market data, account data, orders and webhooks, authenticated with API keys. See [API overview](https://docs.botradix.com/api/). ### Is there a WebSocket or streaming feed? Not yet. The streaming endpoint is defined but not enabled. Use the read endpoints for market data and webhooks for account events. See [Real-time data and webhooks](https://docs.botradix.com/api-realtime/). ## Account and security ### I lost my password or my 2FA device. What do I do? There is no self-service reset yet. Write to support@botradix.com from your account's email address. See [Support](https://docs.botradix.com/support/). ### How do I delete my account? From **Settings**, once no bot, open signal, pending cycle or grid inventory remains. See [Deleting your account](https://docs.botradix.com/security/#deleting-your-account). ### How do I report a bug or a security issue? Report bugs through support, and security issues privately to support@botradix.com with the subject "Security". See [Security](https://docs.botradix.com/security/#reporting-a-vulnerability). --- # Glossary > Definitions of the terms used across BotRadix. Source: https://docs.botradix.com/glossary/ | Term | Meaning | |---|---| | Advance-notice gate | The contract (`BotradixAvisoPrevio`) that administers the DEX router: code changes and ordinary router operations follow their notice (0 hours today), and immediate protective actions do not wait. Cross-margin and business logic can be replaced without mandatory notice while the contracts are open. See [Security and contracts](https://docs.botradix.com/security-contracts/#the-prior-notice-gate) | | Agent wallet | On Hyperliquid, a secondary wallet authorized to trade for your account but not to withdraw. BotRadix bots use one created only for them. See [Connecting exchanges](https://docs.botradix.com/exchanges/) | | API key | A credential for the DEX API v1 (`BRX…`), linked to your wallet, with scopes that limit what it can do. Under the current code it cannot authorize withdrawals. See [API](https://docs.botradix.com/api/) | | BAQ | The BotRadix token on Base. It unlocks bot limits and can be deposited as supplementary collateral. See [BAQ](https://docs.botradix.com/baq/) | | BAQ reserve | A protocol reserve that receives, with the v2.2 reference values, 10% of the protocol opening fee (not the service fee) and of isolated penalties, and backs the BAQ collateral credit | | Auto-deleveraging (ADL) | The early reduction or closing, at the oracle price and without a closing fee, of winning positions when the vault is at risk; the cap and funding apply, and any uncovered part is deferred. See [Leverage and margin](https://docs.botradix.com/margin/#backed-take-profit-and-auto-deleveraging) | | Backed take profit | A take profit for which the vault has reserved capacity within the cap. While backing remains valid, its position is not closed by ADL; it is not a payment guarantee in every scenario | | Base | An Ethereum layer-2 network (chain ID 8453) where the BotRadix DEX runs | | Basis point (bp) | One hundredth of a percent: 1 bp = 0.01%. A 6 bps fee is 0.06% | | Collateral | Funds deposited in the DEX to back your positions: USDC, and BAQ as a limited credit | | Cross margin | A mode in which all your free collateral backs all your cross positions together | | DCA | Dollar-cost averaging: adding to a position at better prices to improve its average entry. Used by the Quant bot | | Co-signer | A BotRadix service, on a separate server, whose second signature every Uniswap bot swap needs | | Deferred payment | A profit recorded for later payment if the vault and reserves were ever insufficient | | EIP-712 | The standard for signing structured data with a wallet. BotRadix uses it for trading keys, sessions and signed orders | | EMA | Exponential moving average; the trend reference used by the Quant bot | | Emergency | A final state of the DEX, confirmed by anyone 72 hours after a challenge without observations of USDC or of markets with positions (or declared by the administrator): trading stops, markets are fixed at the price and funding of the emergency instant and profits are paid pro rata from available liquidity. See [Exit without BotRadix](https://docs.botradix.com/exit/) | | Equity | The value of a cross account: free USDC plus unrealized PnL, minus fees, funding and debt, plus the BAQ credit | | Execution permission | A one-time authorization, granted with a free signature, that lets the keeper execute your resting orders, take profit and stop loss for a small fee. See [Fees](https://docs.botradix.com/fees/#execution-permission) | | Executor | A protocol account that submits the actions you sign and pays their gas | | Exit contract | The contract (`BotradixSalida`) that lets any wallet close its own positions and withdraw from BaseScan. See [Exit without BotRadix](https://docs.botradix.com/exit/) | | Funding | Periodic payments between longs and shorts that keep the market balanced. See [Funding](https://docs.botradix.com/funding/) | | Grid bot | A bot that buys and sells at predefined levels inside a price range. See [Grid bot](https://docs.botradix.com/grid/) | | Health factor | Account equity divided by its maintenance margin. At 1 or below, positions can be liquidated | | Initial margin | The collateral needed to open a position: size divided by leverage | | Isolated margin | A mode in which a position has its own margin; losing it does not affect the rest of the account | | Keeper | The protocol service that executes resting orders, take profit, stop loss, funding updates and liquidations | | Leverage | The ratio between position size and margin. 10x means a 1,000 USDC position with 100 USDC of margin | | Liquidation | The forced closing of a position whose margin can no longer cover losses. See [Liquidation](https://docs.botradix.com/liquidation/) | | Liquidation price | The price at which a position becomes liquidatable | | Maintenance margin | The minimum margin a position must keep: 0.5% of its size on the BotRadix DEX, unless a market has its own value; fixed when the position opens | | Maker / taker | Maker: a limit order checked against a valid price, unable to execute and left resting (v2.2 reference fee 0.03%); taker: everything else, including the first execution of a limit order placed while the market is closed (v2.2 reference fee 0.06%) | | Maximum profit | The highest profit a position can realize (profit cap). See [Leverage and margin](https://docs.botradix.com/margin/#profit-cap) | | Open interest (OI) | The total size of open positions in a market | | Open phase | The current consolidation phase in which the contracts remain upgradeable by the administrator. See [Security and contracts](https://docs.botradix.com/security-contracts/) | | Oracle | The system that supplies prices to the contracts. On BotRadix, PairForge. See [Prices and oracle](https://docs.botradix.com/oracle/) | | PairForge | Market-data and oracle provider the DEX prices come from. On Base, those prices are signed by BotRadix's reporters and checked by the hub contract | | Permit (EIP-2612) | A signature that authorizes a token transfer without a separate approval transaction; used for gas-free USDC deposits | | Pause-only key | A key that can pause the DEX or withdrawals but can never resume them | | Perpetual future | A derivative that tracks an asset's price with no expiry date, kept close to the market price by funding | | PnL | Profit and loss. **Unrealized** while the position is open, **realized** once it is closed | | Pro-rata distribution | In an emergency, every winner receives the same percentage of their claim from the available funds; the rest remains deferred | | Position size (notional) | The value of a position in USDC, before leverage is considered | | Quant bot | BotRadix's trend-following bot with DCA. See [Quant bot](https://docs.botradix.com/quant/) | | Reduce-only | A state in which positions can only be reduced or closed, not opened or increased | | Reporter | A PairForge service that reads prices from exchanges and signs them. A price needs 2 of the 3 reporters | | Resting order | A limit or stop order waiting for its price before executing | | Sealing | Future steps by component that restrict specified upgrade paths. None is active today; sealing one part does not freeze the entire system or every parameter | | Settled market | A market fixed at its last observed price after 3 days without prices, whose positions anyone can close at that price | | Slippage | The difference between the expected price and the execution price. Your maximum slippage protects the order | | Stop loss / take profit | Orders that close a position automatically at a loss limit or a profit target | | Synthetic pair | A market priced as the ratio of two assets, such as GOLD/BTC, settled in USDC | | Trading key | A key kept in your browser and authorized by your wallet to trade without a signature per order. It cannot withdraw. See [Signatures and trading sessions](https://docs.botradix.com/sessions/) | | Trading session | A time-limited authorization (8, 24 or 72 hours) to relay your orders, used when a trading key is not available | | Vault | The protocol's liquidity pool that pays traders' profits and receives their losses and, with the v2.2 reference values, 90% of the protocol opening fee | | Webhook | An HTTPS notification that the DEX API sends to your server when an account event happens. See [Real-time data and webhooks](https://docs.botradix.com/api-realtime/) | --- # Support and legal > How to get help, and where to find the terms and privacy policy. Source: https://docs.botradix.com/support/ ## Where to get help | Channel | Best for | How to reach it | |---|---|---| | This documentation | How BotRadix works: fees, limits, risks and the API | Search with `/` or Ctrl+K | | Support ticket | Private questions about your account, bots, the DEX or BAQ | Sign in at [botradix.com](https://botradix.com), open **Community** (the forum) and choose **Open ticket** | | Email | When you cannot sign in, and for security reports | **support@botradix.com** | | Community forum | Ideas, suggestions and questions for other users | [botradix.com/forum](https://botradix.com/forum) (reading is open; posting requires an account) | Tickets have a category (technical, trading, account, BAQ, forum, privacy or other), a subject of 4 to 120 characters and a message of 10 to 6,000 characters. You can send up to 5 tickets per hour. Each ticket receives a reference number. ## What to include A precise request gets a faster answer. Include: - your account email or your **wallet address**; - the market, the date and time with your time zone, and the **transaction hash** if there is one; - the exact message the terminal showed, and a screenshot with no sensitive data; - what you expected to happen and what happened instead. > [!CAUTION] > BotRadix support will **never** ask for your seed phrase, private keys, password or 2FA codes, will never ask you to install remote-access software and will never ask you to send funds. Anyone who does is not BotRadix. ## Before you write Many questions are answered here: - [Frequently asked questions](https://docs.botradix.com/faq/) - [Why can't I withdraw?](https://docs.botradix.com/faq/#why-cant-i-withdraw) - [Why was my order rejected?](https://docs.botradix.com/faq/#why-was-my-order-rejected) - [API errors and limits](https://docs.botradix.com/api-errors/) ## Legal - [Terms of use](https://botradix.com/terms), including the BotRadix DEX section. Before your first DEX action, your wallet signs, for free, the complete Terms (sections 1 to 26) and the Privacy Policy, version 2026-10-12.2, identified by their SHA-256 fingerprint. Your PDF agreement is downloaded when you sign, and you can download it again from **DEX settings → My agreement (PDF)**. See [Signatures and trading sessions](https://docs.botradix.com/sessions/#terms-and-risk-guide). - [Privacy policy](https://botradix.com/privacy). - [Risks](https://docs.botradix.com/risks/). --- # Changelog > Notable changes to the platform, the DEX and these docs. Source: https://docs.botradix.com/changelog/ The most important changes to BotRadix, newest first. Dates are in 2026. ## 12 October - **A signed PDF copy of your acceptance of the Terms.** When you accept, you now sign the complete text of the Terms of Use (sections 1 to 26) and of the Privacy Policy, version 2026-10-12.2, identified by its SHA-256 fingerprint, and your BotRadix User Agreement is downloaded right away: a PDF in English and Spanish with your signature and the data to verify it without relying on BotRadix and, since the evening of the 12th, a third, bilingual User Safeguards page that summarizes the Terms' protections with their sections (earlier copies keep their two pages). Each wallet signs the new version once; you can download it again from DEX settings → My agreement (PDF). - **Your wallet decides over its USDC.** No trading key or session can bring USDC from your wallet into an isolated position's margin unless your wallet signs or co-signs that specific action, plus the permit for the exact amount. After this update, trading sessions are renewed once with a signature. - **Limit and stop orders paid from the wallet.** They set aside the margin plus 0.31% of the size and the order bond, to cover their maximum fees even when the order fills in several parts; whatever is not spent stays as DEX balance. - **Less gas** when opening positions in accounts with many positions, and keeper batches of liquidations and TP/SL that execute in full. - **Exit without the website.** New step-by-step guide to use the verified exit contract from BaseScan. - **Trash in the Positions panel.** It closes an open Quant or Grid bot position at market and removes it from BotRadix, with the same closes as their sections and a preview before you confirm. See [History, PnL and exports](https://docs.botradix.com/history/#trash-close-and-remove-an-open-position). - **New /Quant and /Grid addresses.** The bot sections are at botradix.com/Quant and botradix.com/Grid; the old `/Futures` and `/GlobalPendingOrders` addresses redirect there. - **Documentation up to date** with the v2.2 contracts (deployed on 11 October): fees, funding, liquidation, margin, BAQ, oracle and security. ## 4 October - **Bigger profits on the DEX.** A position keeps its whole profit up to 100% of its size (for a long, a doubled price). Before, it stopped at 3 times its margin, which at 100x was a 3% move. Positions opened earlier keep their previous cap until closed. - **BAQ margin with a single price source.** Deposited BAQ counts as margin with a single verified price source, like single-source markets. - **Isolated margin only grows.** You can add margin to an isolated position or lower its leverage at any time; taking margin out of it, or raising its leverage, is no longer possible. Closing the position returns its whole margin. - **BotRadix service fee of 0.03%** on DEX opens and increases, with your signed consent (the terminal asks once). Closes, TP/SL and liquidations never pay it. ## 3 October - **Android app 0.1.0, first public version.** A clean, compact design: equity and open PnL at a glance, shortcuts to trade, create a bot, history and positions, all your account's bots, a full-screen landscape chart and notices in the bell. You connect your wallet by picking one of those installed on the phone (MetaMask, Trust Wallet…), with no code to scan, and it adds protection: screen protected by default, hide balances and fingerprint for bots. - **Order ticket.** It shows the maximum profit of the position and the total opening fee before you confirm. - **Grid on the BotRadix DEX.** The BAQ/USDC market is available for Grid bots. - **Weekly charts and long history.** The DEX chart adds the 1W timeframe. On 1D and 1W the history now reaches years back (Bitcoin from 2011, the S&P 500 from 1975), from established market sources. The 30m timeframe, which never loaded, was removed. - **USDC deposits.** One-signature USDC deposits work again. If a deposit cannot be sent, the terminal now says so (your funds do not move) and the next attempt uses the classic wallet deposit. - **Synthetic pairs on Hyperliquid.** Before a Quant bot with synthetic pairs starts on Hyperliquid, a short notice shows the LONG position each pair needs as its base, and conflicts between bots name the bot in the way and what to do. ## 2 October - **Documentation.** New documentation site in English and Spanish, with a Markdown version of every page and an `llms.txt` index for AI assistants. - **24-hour volume.** The market header shows the real DEX trading volume of the last 24 hours. - **DEX withdrawals.** With open cross positions, the terminal now refreshes all the prices your account needs before you sign a withdrawal, and shows a clear message when the amount exceeds your free margin: *"Not enough free margin to withdraw this amount. Withdraw less or close positions."* ## 1 October — DEX contracts v2.1 - **150 markets** (55 new), including more synthetic cross pairs. - **Single liquidation.** A liquidation closes the whole position in one execution. Cross liquidations carry no penalty, and liquidations never charge an execution fee. - **Fees.** Opening fee of 0.06% (taker) and 0.03% (maker); closing remains free. The per-position bond is removed and the BotRadix service fee is 0%. - **Funding** rates are valid for 2 hours. - **Trading sessions** of up to 72 hours. - **Liquidation ledger**, DEX history export to CSV and XLSX, and realized PnL in the terminal header. - **Risk guide and DEX terms.** A guide to the DEX's risks is shown on first use, and the DEX terms (version 2026-10-01) are accepted with a free wallet signature. ## 30 September — DEX v2 - **Trading key.** Authorize once and trade without a wallet signature for each order. The key can never withdraw. - **Leverage up to 100x** with tiers by position size. - **Committed execution.** The execution price is observed after your order is committed, which protects against stale prices. - **Gas included.** The protocol pays the network gas of trading; minimum position of 18 USDC. - **Take profit, stop loss, cancel and replace** through the trading key, with no wallet signature. - **Funding** capped at 0.03% per 8 hours. Opening fees of 0.05% (taker) and 0.02% (maker) at launch, revised in v2.1. - **95 markets.** - **Bots on the BotRadix DEX.** Quant and Grid can trade on the DEX through an API key, with a free tier of up to 2 Quant bots, 6 pairs and 1 Grid.