# Mog Docs — complete public guide Reviewed protocol version: 11.0.0 Protocol review date: 2026-10-30 Scope: reviewed public documentation. Numerical examples use illustrative or launch settings; they are not live quotes or a guarantee of current deployed parameters. Consult the app for current market and position values. Index: https://docs.testnet.mog.xyz/llms.txt # What is Mog? Source: https://docs.testnet.mog.xyz/ Markdown: https://docs.testnet.mog.xyz/index.md Reviewed protocol version: 11.0.0 Protocol review date: 2026-10-30 Scope: reviewed public documentation. Numerical examples use illustrative or launch settings; they are not live quotes or a guarantee of current deployed parameters. Consult the app for current market and position values. Mog is a **self-bootstrapping perpetual DEX**. Trade long or short with up to 1,000× leverage, zero funding fees, and zero slippage from order size. Every trade faces **Mog's treasury**—the pool of funds used to pay trading profits. Oracle prices determine your entry and exit; your order size does not move those prices. No order book. No market makers. ## A DEX that builds its own liquidity Liquidity comes from trading itself. The treasury pays winning trades and receives realized cash losses. Mog's [close curve](https://docs.testnet.mog.xyz/trading/pnl-and-closing/) helps it retain funds from that activity, building liquidity for future payouts. **Trading and treasury flow** - Realized cash losses flow from traders to the Mog treasury. - Winning payouts flow from the treasury to traders. - Trading activity builds liquidity for future payouts. That's **self-bootstrapping**: the venue builds its own liquidity as people trade. Each settled position earns **MOG**, the protocol's token, on the value it gives the venue: its fees and the part of a profit the close curve keeps back. Mog allocates a share of trading revenue to [buying and burning MOG](https://docs.testnet.mog.xyz/mog/buybacks-and-burns/), linking the token to the venue's trading activity. ## Trading on Mog Choose a market, go long or short, and set your margin and leverage. Your position has a liquidation price, and you can add a [take-profit or stop-loss](https://docs.testnet.mog.xyz/trading/take-profit/) that closes it at market when the price reaches your level. You can close all or part of it at any time, or add margin to give it more room. An order that fills pays an [open fee](https://docs.testnet.mog.xyz/trading/fees/): at launch, 0.025% of position size, capped at 1% of margin. A cancel or a void returns it. Profitable closes follow the close curve, with a 2.5% fee on settled profit at launch. When the treasury covers the payout, your net profit is available as cash at settlement. Your remaining cash margin returns to your balance. If a payout exceeds available treasury cash, only the unfunded amount enters [the payout queue](https://docs.testnet.mog.xyz/account/payout-queue/). You can also [give up a claim for MOG](https://docs.testnet.mog.xyz/account/payout-queue/#give-up-a-claim-for-mog). [Open your first position](https://docs.testnet.mog.xyz/quick-start/) · [Explore MOG rewards](https://docs.testnet.mog.xyz/mog/earning-mog/) · [Trading risks](https://docs.testnet.mog.xyz/risk/) --- # FAQ Source: https://docs.testnet.mog.xyz/faq/ Markdown: https://docs.testnet.mog.xyz/faq.md Reviewed protocol version: 11.0.0 Protocol review date: 2026-10-30 Scope: reviewed public documentation. Numerical examples use illustrative or launch settings; they are not live quotes or a guarantee of current deployed parameters. Consult the app for current market and position values. ## How are trades priced? Mog uses oracle prices. Your order fills on a later oracle price update, so the market can move after you submit. Order size does not change the price. See [order execution](https://docs.testnet.mog.xyz/trading/positions-and-leverage/#from-order-to-fill). ## What happens to my profit when I close? When the treasury covers your payout, your net profit is available as cash at settlement. Only an unfunded amount enters [the payout queue](https://docs.testnet.mog.xyz/account/payout-queue/) and waits for incoming trading funds. ## How is profit calculated? Your position size and the price move determine raw PnL. Profitable closes use Mog's [close curve](https://docs.testnet.mog.xyz/trading/pnl-and-closing/), which keeps up to just under 95% of a large move before fees at launch, and less of a small one. A [take-profit or stop-loss](https://docs.testnet.mog.xyz/trading/take-profit/) closes the same way. ## Where does the payout money come from? The treasury pays winning trades and receives realized cash losses. The close curve helps it retain liquidity over time. This is how Mog [builds its own liquidity](https://docs.testnet.mog.xyz/). ## Can I trade with a queued payout? No. Only cash in your balance is margin. A queued payout becomes cash as payments reach it. See [the payout queue](https://docs.testnet.mog.xyz/account/payout-queue/). ## Can I give up a queued payout for MOG? Yes. You can give up any part of one claim and receive MOG at once, with no cash. At zero supply, each USDG you give up earns 72 MOG; the rate falls as supply grows. The amount leaves the queue immediately, and every claim behind it moves up. You cannot undo it. Only your main wallet can do it. See [giving up a claim](https://docs.testnet.mog.xyz/account/payout-queue/#give-up-a-claim-for-mog). ## What does adding margin do? It gives your position more room before liquidation. Position size, take-profit and stop-loss stay the same. The new liquidation price takes effect when the margin activates. See [Adding margin](https://docs.testnet.mog.xyz/trading/adding-margin/). ## How do I earn MOG? Each settled position earns MOG on its trading edge: the fees you pay and the part of a profit the close curve keeps back. Contributions and given-up payouts earn MOG too. The rate falls as supply grows. Positions on the light side of a crowded market earn up to twice as much, and positions on the crowded side less. Mog allocates trading revenue to buying and burning the token. See [MOG rewards](https://docs.testnet.mog.xyz/mog/earning-mog/). ## Can I withdraw a contribution? No. A contribution is one-way and pays you MOG. It is not the same as an account deposit, which stays your balance and you can withdraw. See [Contributions](https://docs.testnet.mog.xyz/mog/earning-mog/#contributions). ## What are the fees? At launch, Mog charges an open fee of 0.025% of position size, capped at 1% of margin, and 2.5% of settled profit. There are no funding fees. Adding margin pays only the rest of the open fee, if any, that the larger margin would have paid at opening. See [Fees](https://docs.testnet.mog.xyz/trading/fees/). Each position keeps the close curve it filled with. --- # Quick start Source: https://docs.testnet.mog.xyz/quick-start/ Markdown: https://docs.testnet.mog.xyz/quick-start.md Reviewed protocol version: 11.0.0 Protocol review date: 2026-10-30 Scope: reviewed public documentation. Numerical examples use illustrative or launch settings; they are not live quotes or a guarantee of current deployed parameters. Consult the app for current market and position values. Start with a funded wallet. Connect to Mog, choose a market, and open your first trade. Your first position 1. Connect: Use your funded wallet. 2. Trade: Choose a market and direction. 3. Manage: Close or add margin. ## 1. Connect Open [Mog](https://app.testnet.mog.xyz) and connect your funded wallet. Enable a [session key](https://docs.testnet.mog.xyz/account/session-keys/) for fewer wallet prompts. ## 2. Choose your position Select a market. Go long for a rising price or short for a falling price. Set your margin and leverage, and a take-profit or stop-loss if you want one. Review the position size and liquidation price shown in the app. The app also estimates the [MOG multiplier](https://docs.testnet.mog.xyz/mog/earning-mog/#mog-funding-the-skew-multiplier) for each side. [Positions and leverage](https://docs.testnet.mog.xyz/trading/positions-and-leverage/) explains these choices. ## 3. Submit your order Placing the order charges the [open fee](https://docs.testnet.mog.xyz/trading/fees/) from your balance. Your order fills using a later [oracle price update](https://docs.testnet.mog.xyz/trading/positions-and-leverage/#from-order-to-fill). Once filled, check your actual entry price, the position's liquidation price, and any take-profit or stop-loss it carries. ## 4. Manage the position [Close all or part](https://docs.testnet.mog.xyz/trading/pnl-and-closing/) of the position, or [add margin](https://docs.testnet.mog.xyz/trading/adding-margin/) to move liquidation farther away. Reaching either price level closes the position automatically. ## 5. Use your balance When the treasury covers your payout, profit after fees is available as cash at settlement. Your remaining cash margin returns to your balance. Withdraw available funds with your main wallet. Only an unfunded payout enters [the queue](https://docs.testnet.mog.xyz/account/payout-queue/). Each settled position earns [MOG](https://docs.testnet.mog.xyz/mog/earning-mog/) on its fees and on the part of a profit the close curve keeps back. --- # Positions and leverage Source: https://docs.testnet.mog.xyz/trading/positions-and-leverage/ Markdown: https://docs.testnet.mog.xyz/trading/positions-and-leverage.md Reviewed protocol version: 11.0.0 Protocol review date: 2026-10-30 Scope: reviewed public documentation. Numerical examples use illustrative or launch settings; they are not live quotes or a guarantee of current deployed parameters. Consult the app for current market and position values. Go long when you expect the price to rise, or short when you expect it to fall. Choose your margin and leverage, and add a [take-profit or stop-loss](https://docs.testnet.mog.xyz/trading/take-profit/) if you want one. Mog fixes the position's liquidation price when it fills. ## Margin and leverage **Margin**, also called collateral, is the money you commit to the trade. Leverage turns that margin into a larger position: **position size = margin × leverage**. Each market sets its leverage range within 1×–1,000×. The ticket uses that market’s current leverage range. After you add margin, effective leverage is position size divided by active margin. It cannot fall below the bottom of the market's leverage range. Adding margin does not increase position size. Higher leverage makes a given price move worth more relative to your margin. It also brings liquidation closer. Your position size is also called its **notional**. ## Open-interest rules Each market has three open-interest settings: a pace, a side cap and a fade time. Together they limit how fast the gap between longs and shorts can grow and how large one side can get. They do not limit a balanced book: it can grow as large as traders make it. Every fill adds its position size to its side. A close removes the size it closes. Adding margin does not change position size, so it does not use room. - **Pace:** after your fill, your side may lead the other side by at most its aged lead plus the pace. An order that leaves your side at or below the other side always fits. - **Side cap:** after your fill, your side may hold at most the side cap. A new position ages over the fade time, 30 minutes at launch. After one fade time it counts toward the aged lead at about 63% of its size, and after three at about 95%. Your side's aged lead is how far its aged positions lead the other side's aged positions. A lead that has held for a while therefore makes room to grow further, and a position opened a moment ago makes almost none. A close leaves both counts at once. These are the only size limits: one order may use all the room they leave. The limits count notional, so they scale with leverage. At the same margin, a 100× position uses a tenth of the room of a 1,000× position. The app shows the room left on each side. Lower the size or the leverage to fit, or wait a few minutes. An order the limits cannot take is refused when you submit it, before the open fee is charged. Room can still run out before your order fills. Then the order is voided, and its collateral and open fee return. Governance sets each market's pace, side cap, drift dial and volatility dial, and one fade time for every market. It can change them without the 24-hour delay, but only while the market is at rest: every published price update for the market processed. In practice that takes seconds. A lower limit does not close open positions. ### The crowded side The side that leads is crowded. Its crowding is its smoothed lead as a share of the side cap, from 0 to 100%. While a side is crowded, its profits pay two charges, and the other side pays neither: - **Drift charge:** the crowded side keeps 1 − drift dial × crowding of each move in its favor. At a drift dial of 1, a side 20% crowded keeps 80% of each move, and a side whose lead reaches the side cap earns nothing more. - **Volatility charge:** each price update also takes volatility dial × crowding × move² ÷ price off the crowded side's gain. Bigger swings take more, and a quiet market takes almost nothing. Losses pay neither charge. Nothing is ever taken from your margin, so holding a position through time never liquidates it. Each side has a gain index that moves with the price by the share it keeps, less its volatility charge. Your profit is the price gain, but never more than your side's index gain since your fill. A move that reverses leaves the drift part where it started, and the volatility charge only lowers the index, so a price swing alone never pays a profit and a close at your entry price costs nothing. Crowding reads a smoothed book: new positions count in over the fade time and closed ones fade out over half of it, so one order does not swing it. The charges are not fixed at fill. They apply to every open position on the crowded side, at each price update, and only to the move in that update. Profit already in the index stays. A [take-profit](https://docs.testnet.mog.xyz/trading/take-profit/) is still a price level: the position closes when the price reaches it and pays on the gain left after both charges, as any close does. Each market's drift dial runs from 0 to 1 and its volatility dial from 0 to 100, both 1 at listing. The pace limits only how fast a side can lead; it moves neither charge. The fade time, 30 minutes at launch, is the same for every market, and governance can change it without the 24-hour delay only while every market is at rest: every published price update on every market processed. In practice that takes seconds. A change of the side cap, either dial or the fade time reaches every open position from the next price update. The ticket shows a crowded side's current drift charge, for example −5%. Crowding also moves your MOG. A position on the light side earns up to twice the MOG, and a position on the crowded side less, from the average skew over its hold. See [MOG funding](https://docs.testnet.mog.xyz/mog/earning-mog/#mog-funding-the-skew-multiplier). ## Two price levels to follow **Long position · price levels** Schematic, not a live price quote. - Liquidation: below entry, where active margin is lost. - Entry: your fill price. - Take-profit price: above entry, where the take-profit is reached, if one is set. * **Liquidation price:** the price at which the position loses its active margin and closes. * **Take-profit and stop-loss:** optional [orders](https://docs.testnet.mog.xyz/trading/take-profit/) that close the whole position at market when the price reaches their level. You can [close earlier](https://docs.testnet.mog.xyz/trading/pnl-and-closing/) or [add margin](https://docs.testnet.mog.xyz/trading/adding-margin/) to move liquidation farther away. ## From order to fill Oracle-priced execution 1. Submit: Commit margin and pay the open fee. 2. Price update: Receive a later oracle price. 3. Fill: Open your position. The update must be posted after your order. Its price window must end more than two seconds after the on-chain time of the block that included your order; the two seconds allow for the chain clock running behind the oracle clock. The market can move between submission and fill. Your order size does not change the oracle price. Orders must meet market and position limits, including the [open-interest rules](https://docs.testnet.mog.xyz/trading/positions-and-leverage/#open-interest-rules); an order that fails those checks returns its collateral. Placing an order charges the [open fee](https://docs.testnet.mog.xyz/trading/fees/); it comes back unless the order fills. Fill capacity can delay an eligible order until a later update. If an eligible update arrives beyond the oracle delivery staleness limit, the order is voided, and its collateral and open fee return. The fee rate, the [close-curve width](https://docs.testnet.mog.xyz/trading/pnl-and-closing/#why-the-curve-differs-by-market) and the liquidation buffer are fixed when the position fills. ## Trigger orders A trigger order becomes ready to fill when an eligible oracle update touches its level from either direction. It fills at the final price of the update that can admit it, which can differ from the trigger level. There is no limit on that difference. If fill capacity delays execution, the order stays armed and needs no second touch. ## Cancelling an order Cancellation is a request, not an immediate refund. Updates are processed in order. An eligible update whose window closed no more than two seconds after your cancellation's on-chain time can still assign the fill. For a trigger order, that assignment occurs when it arms. If no fill has been assigned, the first update whose window closes more than two seconds after the cancellation's on-chain time removes the order and returns its collateral and open fee. --- # PnL and closing Source: https://docs.testnet.mog.xyz/trading/pnl-and-closing/ Markdown: https://docs.testnet.mog.xyz/trading/pnl-and-closing.md Reviewed protocol version: 11.0.0 Protocol review date: 2026-10-30 Scope: reviewed public documentation. Numerical examples use illustrative or launch settings; they are not live quotes or a guarantee of current deployed parameters. Consult the app for current market and position values. You can close all or part of a position. Your position size and the price move determine raw PnL; a profitable close applies Mog's **close curve**, then the settlement fee. ## How the close curve works The close curve helps trading activity build Mog's liquidity. Larger favorable moves settle a greater share of raw profit. The share rises toward 95% at launch. The settlement fee applies afterward. The curve also limits profit from small, short-lived distortions in oracle prices. ## Why the curve differs by market Each market has a setting called **c**, the curve's width at 100× leverage and below. Above 100×, your position's width is c × (leverage / 100)^k. The width is fixed when the position fills. k is one setting for every market, 0.25 at launch, so the width is about 1.78 × c at 1,000×. Governance can change k without the 24-hour delay, but only while every market is at rest: every published price update on every market processed. In practice that takes seconds. A change applies only to positions that fill after it. A move equal to the width retains 47.5% of raw profit, half of 95%. A larger move retains more. A price distortion pays per dollar of size, whatever the leverage, so the width does not narrow below 100×. Above 100×, the same move retains less at higher leverage. Select an asset and a leverage, then move across the plot to explore it. The dashed line is the same market at 100×. Close curve `p = a·move/(move + w)`, with `w = c·(max(leverage, 100)/100)^k` fixed at fill, k = 0.25 at launch, and a the cap retention frozen at fill (0.95 at launch). At move = w, p = a/2. Move, c and w are price fractions; 0.0189% = 0.000189. Multiply the fraction by 100 for a percentage. Illustrative c = 0.000189 (0.0189%); this is not a live market quote or current parameter lookup. Values exclude the settlement fee. | Favorable move | Retained at 100× | Retained at 1,000× | | -------------- | ---------------- | ------------------ | | 0.01% | 32.87197% | 21.78425% | | 0.0189% | 47.5% | 34.19383% | | 0.1% | 79.89907% | 71.10274% | | 1% | 93.23781% | 91.91092% | A [take-profit or stop-loss](https://docs.testnet.mog.xyz/trading/take-profit/) closes on the same curve. Test settings are labeled; values are before fees. Each position keeps the close curve it filled with. **View the close formulas** For a favorable price move $\Delta$ and entry leverage $\lambda$: $$ w=c\,(\lambda/100)^k,\qquad p=\frac{a\Delta}{\Delta+w},\qquad W=p\Pi $$ $N$ is position size and $\Pi=N\Delta$ is positive raw PnL. $W$ is profit before the settlement fee. $\Delta$, $c$ and $w$ are price fractions: 0.0189% is 0.000189. $a$ is the cap retention the position froze at fill, 95% at launch. Governance can change $a$ and $c$ for future positions only. Losing closes realize the loss directly, limited to active collateral. On-chain rounding can slightly reduce calculated amounts. ## Closing a position A close uses a later [oracle price update](https://docs.testnet.mog.xyz/trading/positions-and-leverage/#from-order-to-fill), so the market can move after you submit. If the price touches your liquidation price first, that closes the position instead. If an update exceeds the oracle delivery staleness limit, it voids the pending close request. The position remains open unless a recorded barrier touch closes it. Review the position and submit a new close if needed. A partial close reduces position size and collateral by the same proportion. The remaining position keeps its liquidation price, and its take-profit and stop-loss orders. A remainder below the minimum size, or below 1× effective leverage after rounding, triggers a full close. The close preview shows when this applies. [Adding margin](https://docs.testnet.mog.xyz/trading/adding-margin/) leaves the profitable-close curve unchanged. ## Your balance after closing Your remaining cash margin returns to your balance. With enough treasury cash, profit after [fees](https://docs.testnet.mog.xyz/trading/fees/) is available as cash at settlement. Only an unfunded amount enters [the payout queue](https://docs.testnet.mog.xyz/account/payout-queue/). ## During a pause Mog can pause one market or the whole venue. A new market starts paused, and accepts orders only after Mog lifts that pause. A pause stops new orders, new fills, and new margin requests. You can still close all or part of a position, and the close settles at a later oracle update as usual. Liquidation prices, take-profits and stop-losses keep working. Deposits, withdrawals, and payout-queue payments continue. Pending orders under a pause do not fill. Anyone can void them, and the void returns their collateral and [open fee](https://docs.testnet.mog.xyz/trading/fees/). ## When a market retires You can request a close during the market’s drain period. Once its final oracle record is posted, new close requests stop. That record settles remaining positions at their barrier or the final mark; a pending close request does not survive retirement. --- # Take profit and stop loss Source: https://docs.testnet.mog.xyz/trading/take-profit/ Markdown: https://docs.testnet.mog.xyz/trading/take-profit.md Reviewed protocol version: 11.0.0 Protocol review date: 2026-10-30 Scope: reviewed public documentation. Numerical examples use illustrative or launch settings; they are not live quotes or a guarantee of current deployed parameters. Consult the app for current market and position values. A **take-profit (TP)** and a **stop-loss (SL)** are orders on your position. Each one names a price. When an [oracle price update](https://docs.testnet.mog.xyz/trading/positions-and-leverage/#from-order-to-fill) reaches that price, Mog closes your whole position at market, as if you had pressed Close when you set the order. **Long position · price levels** Schematic, not a live price quote. - Liquidation: below entry, where active margin is lost. - Entry: your fill price. - Take-profit price: above entry, where the take-profit is reached, if one is set. ## Where you can set them A long's take-profit sits above the current price and its stop-loss below it. A short's are the other way round. - **When you open:** turn on TP or SL on the order ticket. The order is created when your position fills. If the fill price has already passed your level, the position opens without that order and the app tells you. - **On an open position:** add, change or cancel a TP or SL at any time from your positions. A position holds at most one TP and one SL. Each closes the whole position. A stop may sit above your entry on a long, or below it on a short, once the price has moved past it, so you can lock in a gain. You can type the TP as a price, or as a gain in dollars or as a percent of your margin. The app turns a gain into a price before it sends the order. ## What the close pays The order fixes when the close starts, not what it pays. Usually the close settles at the price of the update that reached your level. If that update came in within a few seconds of setting the order, or arrived late after an outage, the close settles at the next fresh update instead. So the close can fill above or below your level when the price moves fast, but a price that passes your level always triggers it. It pays like any other close: profit goes through the [close curve](https://docs.testnet.mog.xyz/trading/pnl-and-closing/), and the [settlement fee](https://docs.testnet.mog.xyz/trading/fees/) applies to profit. A TP or SL costs no fee to place, change or cancel. ## Changes and cancellations A new level, a change or a cancellation takes effect from the next oracle price update. An update that was already on its way can still close your position at the old level. A close never settles at a price that was already known when you set the order, so nobody can set a level after seeing the price that would reach it. Once a TP or SL triggers, the position is closing: you cannot add margin or press Close until the close settles. ## Stops near liquidation Liquidation is checked before your stop. A stop at or past your [liquidation price](https://docs.testnet.mog.xyz/trading/positions-and-leverage/) could never close the position, so the app refuses it. A stop within 0.2% of the liquidation price is allowed, with a warning: one fast move can reach both, and liquidation then closes first. [Adding margin](https://docs.testnet.mog.xyz/trading/adding-margin/) moves the liquidation price, and the app checks against the current one. ## When orders retire A TP or SL ends when it closes your position, when you cancel it, or when the position closes another way: liquidation, a manual whole close, or a market's final settlement. A partial close leaves both orders in place on what remains. A market pause does not stop them. Scale orders and orders funded from a payout claim open without a TP or SL. Add one to the position after it fills. --- # Liquidations Source: https://docs.testnet.mog.xyz/trading/liquidations/ Markdown: https://docs.testnet.mog.xyz/trading/liquidations.md Reviewed protocol version: 11.0.0 Protocol review date: 2026-10-30 Scope: reviewed public documentation. Numerical examples use illustrative or launch settings; they are not live quotes or a guarantee of current deployed parameters. Consult the app for current market and position values. Liquidation closes your position when the oracle price reaches its liquidation price. You lose the margin committed to that position, including any added margin that has activated. ## More leverage, less room Higher leverage brings liquidation closer to your entry price. Longs liquidate below entry; shorts liquidate above it. Each market sets a **liquidation buffer**, 0.02% of price at launch. The liquidation price sits that much closer to entry than the point where your margin runs out. The buffer is the same price distance at every leverage, so it takes a larger share of a high-leverage position's room: about 2% of it at 100× and 20% at 1,000×. While available treasury equity is below the 5 million USDG [threshold](https://docs.testnet.mog.xyz/mog/buybacks-and-burns/), a new fill takes the market's buffer times a global buffer multiplier. The multiplier is 2× at launch, so a fill at launch takes a 0.04% buffer: about 4% of the room at 100× and 40% at 1,000×. Governance can set it from 1× to 10× after the timelock delay. At or above the threshold, a fill takes the market's buffer alone. Higher leverage, nearer liquidation Initial liquidation distance falls from 0.96 percent at 100 times leverage to 0.06 percent at 1,000 times leverage. The dashed line shows the distance without the buffer. Illustrative entry liquidation distance: `distance (%) = 100 / leverage − b`, with b the buffer a fill takes at launch: the market's 0.02% times the 2× multiplier below the threshold, 0.04%. The loss at liquidation is still the whole margin. This is the initial distance before price rounding, not a current position liquidation calculation after margin changes. | Entry leverage | Distance from entry | | -------------- | ------------------- | | 1× | 99.96% | | 50× | 1.96% | | 100× | 0.96% | | 500× | 0.16% | | 1000× | 0.06% | Entry distances at the launch buffer times the launch multiplier, before price rounding. Follow the liquidation price shown on your position. [Adding margin](https://docs.testnet.mog.xyz/trading/adding-margin/) moves liquidation farther away once the addition activates. The buffer stays the one set when the position filled. ## A touch is enough Mog checks the price path recorded by the oracle. A touch of your liquidation price closes the position, even if the price later recovers. That touch takes priority over a pending close or margin addition. A liquidation earns [MOG](https://docs.testnet.mog.xyz/mog/earning-mog/#your-trading-edge) on the buffer you give up and on your open fee. --- # Adding margin Source: https://docs.testnet.mog.xyz/trading/adding-margin/ Markdown: https://docs.testnet.mog.xyz/trading/adding-margin.md Reviewed protocol version: 11.0.0 Protocol review date: 2026-10-30 Scope: reviewed public documentation. Numerical examples use illustrative or launch settings; they are not live quotes or a guarantee of current deployed parameters. Consult the app for current market and position values. Adding margin gives your position more room before liquidation. For a long, the liquidation price moves lower. For a short, it moves higher. Your position size, take-profit and stop-loss stay the same. **Effective leverage cannot fall below the bottom of the market's leverage range.** **Long position · price levels** Schematic, not a live price quote. - Liquidation: moves farther below entry after added margin activates. - Entry: fixed. - Take-profit price: fixed; the take-profit is unchanged. ## How to add margin Choose your open position, enter the cash amount, and confirm. The position must be within its margin limit, with no close or margin addition already pending. Mog locks the cash while the addition waits for a later [oracle price update](https://docs.testnet.mog.xyz/trading/positions-and-leverage/#from-order-to-fill). Once activated, the new liquidation price applies. You can then request a close or another margin addition. ## Margin limit Each market sets its leverage range within 1×–1,000×. Added margin cannot take effective leverage below the bottom of that market's current leverage range. Your available account balance also limits what you can add, and it must also cover the addition's open fee. For example, on a market with a 10× minimum, a \$10,000 position opened with \$100 at 100× can receive up to \$900 more, which brings it to 10×. Repeated additions share the same total limit. If the market lowers its minimum, the limit grows. An amount too small to move the liquidation price is refused. The minimum is read when Mog accepts the addition. A later change does not stop an accepted addition from activating. A partial close must also leave effective leverage at or above 1×. If rounding would put the remainder below the floor, the close becomes a full close. Check the close preview before confirming. ## The open fee on added margin An addition pays the rest of the [open fee](https://docs.testnet.mog.xyz/trading/fees/#the-open-fee) that the position's new margin would have paid at opening, less what the position already paid. This is often zero. It is more than zero when the 1% margin cap set your fee at opening, at 40× or above at launch. The app shows the fee before you confirm. Mog holds it with the addition, pays it when the addition activates, and returns it if the addition is refunded. ## While it is pending **Your current liquidation price still applies.** The activation update checks that price before adding the margin. If the position closes before activation, the pending cash is refunded. An accepted addition cannot be cancelled. You cannot request a close while it is pending. Activation requires an update posted after acceptance. Its price window must end more than two seconds after the on-chain time of acceptance. Added margin increases the amount you can lose if the position is liquidated. Accepted additions still resolve through activation or refund during a pause or delisting. On a market with a 1× minimum, a long at 1× with no liquidation buffer has no positive liquidation price. It remains open until another exit, such as your close, a take-profit or a stop-loss. The full margin remains at risk. --- # Fees Source: https://docs.testnet.mog.xyz/trading/fees/ Markdown: https://docs.testnet.mog.xyz/trading/fees.md Reviewed protocol version: 11.0.0 Protocol review date: 2026-10-30 Scope: reviewed public documentation. Numerical examples use illustrative or launch settings; they are not live quotes or a guarantee of current deployed parameters. Consult the app for current market and position values. Mog has two fees at launch. Opening a position costs an **open fee of 0.025% of position size, capped at 1% of margin**. A winning close pays **2.5% of settled profit**. There are no funding fees. Adding margin pays only the rest of the open fee, if any, that the larger margin would have paid at opening. ## The open fee Every order pays the open fee when you place it. The fee is 0.025% of the order's position size, and it is never more than 1% of the order's margin. The cap applies from 40× leverage up. For example, a 10 USDG order at 10× pays 0.025 USDG, and a 10 USDG order at 100× pays the smaller of 0.025% of 1,000 USDG and 1% of 10 USDG: 0.10 USDG. The fee is not collateral. Your available balance must cover the margin plus the fee, and a scale order pays one fee per entry. When you [add margin](https://docs.testnet.mog.xyz/trading/adding-margin/), Mog prices the open fee again on the new margin and charges only the difference to what the position already paid. Below the cap this is zero. For example, a 10 USDG order at 1,000× pays 0.10 USDG, the cap. Adding 30 USDG of margin later pays 1% of 40 USDG less 0.10 USDG: 0.30 USDG. The same position opened with 40 USDG at 250× pays 0.40 USDG, so both routes pay the same fee. Mog holds the fee with the order. You pay it only if the order fills. If you cancel the order or it is voided, the fee comes back with your collateral. An order that fails the market's entry checks or its [open-interest rules](https://docs.testnet.mog.xyz/trading/positions-and-leverage/#open-interest-rules) when you submit it is refused before the fee is charged. Each market has its own rate and cap. Governance can change them through the timelock, up to 1% of position size and 10% of margin. A change applies to later orders and later margin additions. An order you already placed keeps the fee it paid. The app shows the fee before you sign. If the fee rises above the amount you signed for, the order is refused. **View the open fee formula** $$ \text{fee}=\min\left(\text{rate}\times N,\ \text{cap}\times M\right) $$ $N$ is the order's position size and $M$ its margin. At launch, the rate is 0.025% and the cap is 1%. On-chain rounding can raise the fee by the smallest unit. ## The profit fee On a winning close, Mog calculates profit using the [close curve](https://docs.testnet.mog.xyz/trading/pnl-and-closing/), then deducts the fee. A take-profit or stop-loss is a close and pays the same fee. Your remaining cash margin returns to your balance. A losing close has no profit fee. Your fee rate is fixed when the position fills. The fee is paid together with your payout. When the treasury covers your payout, the fee is paid at settlement too. When part of your payout waits in [the payout queue](https://docs.testnet.mog.xyz/account/payout-queue/), the matching part of the fee waits with it. The fee is never paid ahead of a trader payout. ## What the fees fund At launch, 70% of each fee funds MOG buybacks and 30% funds protocol operations. The same split applies to the open fee and the profit fee. The open fee is paid out when the order fills. See [Buybacks and burns](https://docs.testnet.mog.xyz/mog/buybacks-and-burns/). Both fees are part of your [trading edge](https://docs.testnet.mog.xyz/mog/earning-mog/#your-trading-edge), so the fees you pay earn MOG when the position settles. Network transaction costs are separate. Each position keeps the close curve it filled with. --- # Wins and losses Source: https://docs.testnet.mog.xyz/account/wins-and-losses/ Markdown: https://docs.testnet.mog.xyz/account/wins-and-losses.md Reviewed protocol version: 11.0.0 Protocol review date: 2026-10-30 Scope: reviewed public documentation. Numerical examples use illustrative or launch settings; they are not live quotes or a guarantee of current deployed parameters. Consult the app for current market and position values. A winning close returns your collateral and settles your profit after fees. A losing close deducts the loss from your collateral and returns the rest. ## A winning position When the treasury covers your payout, net profit is available as cash at settlement. Your remaining cash margin returns to your balance. Where your profit goes Is the payout fully funded? - Yes: Profit is available as cash. - Partly or not yet: Cash pays first; only the rest queues. A profitable close settles through the [close curve](https://docs.testnet.mog.xyz/trading/pnl-and-closing/), before [fees](https://docs.testnet.mog.xyz/trading/fees/): at launch just under 95% of a large move, and less of a small one. A [take-profit or stop-loss](https://docs.testnet.mog.xyz/trading/take-profit/) is a close and uses the same curve. Governance can change the curve for future positions; each position keeps the terms set when it filled. ## A losing position The loss comes out of the position's margin. Your remaining cash margin returns to your balance. Liquidation uses all active margin, including added margin that has activated. Every settled position earns [MOG](https://docs.testnet.mog.xyz/mog/earning-mog/) on its trading edge. A losing close earns MOG only on its open fee. Each position keeps the close curve it filled with. --- # The payout queue Source: https://docs.testnet.mog.xyz/account/payout-queue/ Markdown: https://docs.testnet.mog.xyz/account/payout-queue.md Reviewed protocol version: 11.0.0 Protocol review date: 2026-10-30 Scope: reviewed public documentation. Numerical examples use illustrative or launch settings; they are not live quotes or a guarantee of current deployed parameters. Consult the app for current market and position values. **With enough treasury cash, your profit is paid at settlement.** The queue applies only when a payout exceeds the cash available. Any funded portion is available as cash; only the remainder waits. **Your remaining cash margin returns to your balance when the position closes.** Only unfunded profit waits in the queue. That unpaid amount is a **claim**: a record of what Mog still owes you. Incoming trading funds and contributions pay queued claims in order. ## Give up a claim for MOG If you prefer MOG now to cash later, you can give up (renounce) any part of a claim. You receive MOG at once and no cash. At zero supply, each **1 USDG you give up earns 72 MOG**. The rate falls as [supply](https://docs.testnet.mog.xyz/mog/supply-and-unlock/) grows, so it can fall while you wait. It never rises. See [MOG for giving up a claim](https://docs.testnet.mog.xyz/mog/earning-mog/#mog-for-giving-up-a-claim). The amount you give up leaves the queue at once. Every claim behind yours moves up by that amount. Choices for an unpaid claim What do you want to do with it? - Wait: Incoming trading funds pay it in order, as cash. - Give it up: Receive MOG now. It leaves the queue at once, with no cash. Before you give up a claim: - **It is final.** You cannot undo it, and the claim does not return. - **One claim at a time.** Choose a claim and an amount up to what remains unpaid on it. - **Main wallet only.** A session key cannot give up a claim. - **Settled claims only.** A claim qualifies once its settlement round completes. - **Payments come first.** If a payment reaches the claim first, you keep that cash and give up at most what remains. - **Not during a venue-wide pause.** Give up the claim after the pause ends. The rate changes in the meantime only as supply grows. MOG's market value is not promised. See [Payout liquidity risks](https://docs.testnet.mog.xyz/risk/#payout-liquidity). ## The order of payment The oldest group of claims is paid first. Traders who settle in the same round share that group's payments proportionally. Each group also holds the profit fees of its winning trades. A fee is paid with its payout, at the same rate: when half of a payout is paid, half of its fee is paid. A fee never comes ahead of a trader's claim. Payments become available as cash as funds arrive. How often you collect them does not change your queue priority. Claims stay with their account. The buyback allocation from treasury growth waits until every claim is paid. A [contribution](https://docs.testnet.mog.xyz/mog/earning-mog/#contributions) also pays queued claims first, in the same order. Payment timing depends on incoming trading funds and contributions. See [Payout liquidity risks](https://docs.testnet.mog.xyz/risk/#payout-liquidity). --- # Deposits and withdrawals Source: https://docs.testnet.mog.xyz/account/deposits-and-withdrawals/ Markdown: https://docs.testnet.mog.xyz/account/deposits-and-withdrawals.md Reviewed protocol version: 11.0.0 Protocol review date: 2026-10-30 Scope: reviewed public documentation. Numerical examples use illustrative or launch settings; they are not live quotes or a guarantee of current deployed parameters. Consult the app for current market and position values. Deposit funds to trade, then withdraw available cash with your main wallet. ## Deposit Use the network, asset, and destination account shown in the app. Once the funds reach your balance, they are ready to use. From wallet to trade 1. Deposit: Send supported funds. 2. Balance: Cash arrives in your account. 3. Trade: Choose your margin. Anyone can deposit to an account; its main wallet controls withdrawals. An account deposit is not a [contribution](https://docs.testnet.mog.xyz/mog/earning-mog/#contributions). An account deposit stays your balance, and you can withdraw it. A contribution moves part of that balance to the treasury for good and pays you MOG. You can never withdraw it. ## After a trade Your remaining cash margin returns to your balance when the position closes. When the treasury covers the payout, net profit is available as cash at settlement. Only an unfunded payout waits in [the queue](https://docs.testnet.mog.xyz/account/payout-queue/). ## Withdraw Choose an amount from your available funds and confirm the destination with your main wallet. Available profits can be included in the same withdrawal. Funds committed to an open position or pending order must be released before withdrawal. Network fees may apply. [Session keys](https://docs.testnet.mog.xyz/account/session-keys/) cover trading; your main wallet authorizes withdrawals. --- # Session keys Source: https://docs.testnet.mog.xyz/account/session-keys/ Markdown: https://docs.testnet.mog.xyz/account/session-keys.md Reviewed protocol version: 11.0.0 Protocol review date: 2026-10-30 Scope: reviewed public documentation. Numerical examples use illustrative or launch settings; they are not live quotes or a guarantee of current deployed parameters. Consult the app for current market and position values. A session key lets you trade with fewer wallet prompts. Your main wallet sets its permissions and expiry, and can revoke access. ## Account permissions | Action | Authority | | ---------------------------------------- | --------------------------------- | | Place or cancel orders | Main wallet or authorized session | | Request full or partial closes | Main wallet or authorized session | | Add margin | Main wallet or authorized session | | Withdraw or set a withdrawal destination | Main wallet only | | Give up a queued payout for MOG | Main wallet only | | Grant or revoke sessions | Main wallet only | A compromised session key can put funds at risk through trading, closes, and margin additions within its permissions. ## Session lifecycle Control access from your main wallet 1. Authorize: Set permissions and expiry. 2. Trade: Use the approved permissions. 3. End access: Revoke or let it expire. 4. Start again: Authorize a new key. Maximum session duration: 7 days at launch. Existing positions and accepted actions continue after expiry or revocation. Accepted margin additions remain locked until activation or refund. ## Revoke access Revoke the key from your main wallet, then review open positions and pending actions. Use a new key for future sessions after revocation. See [Wallet and session risks](https://docs.testnet.mog.xyz/risk/#wallets-and-sessions). --- # Referrals Source: https://docs.testnet.mog.xyz/account/referrals/ Markdown: https://docs.testnet.mog.xyz/account/referrals.md Reviewed protocol version: 11.0.0 Protocol review date: 2026-10-30 Scope: reviewed public documentation. Numerical examples use illustrative or launch settings; they are not live quotes or a guarantee of current deployed parameters. Consult the app for current market and position values. Create a referral link to invite traders to Mog. You can earn a share of settlement fees on their winning trades. A referral does not add a fee for the trader. ## Create your link 1. Open **Referrals** from the desktop navigation or your account menu. 2. Hold the MOG amount shown on the page in your account wallet. 3. Choose a code with 3–24 letters, numbers, or underscores. 4. Select **Create link** and confirm the wallet signature. Creating a code has no network fee. Each wallet can have one code. Codes are unique and permanent. ## Activate rewards Before sharing your link, select **Activate rewards** if the page offers it. This transaction records your wallet's MOG balance for the protocol's reward check. It does not transfer or lock your MOG. Your wallet needs ETH on Mog's network to pay the network fee. On testnet, the page links to the test ETH faucet when ETH is missing. The initial holding requirement is 10,000 MOG. The recorded balance and your balance at settlement must both meet the current requirement. A governance change can change the holding requirement or introduce a delay after activation. The page shows the current status. Creating a link does not activate rewards. You receive no referral reward for a settlement that fails the holding or activation checks. Rewards are not added retroactively. Existing settlement rounds can remain ineligible after activation because they use the activation status at the round's opening block. If your balance falls below the requirement, rewards pause. Restore the holding to resume eligibility. Activate again only if the recorded balance no longer meets the requirement. ## Share and track Select **Copy link** and share it. The invited trader must accept the referral before placing their first order. They can dismiss the invitation instead. A wallet cannot refer itself or replace an accepted referrer. Your Referrals page shows referred opening volume, trader count, accrued rewards, and rewards paid to your trading balance. Accrued rewards and paid rewards are separate amounts. A reward is paid with the referred trade's payout, at the same rate: if part of that payout waits in [the payout queue](https://docs.testnet.mog.xyz/account/payout-queue/), that part of the reward waits too. **Collect rewards** moves paid rewards to your trading balance. Rewards come from profit fees only, never from open fees, and they cannot be given up. The referral leaderboard has all-time and current-week volume views. A weekly ranking does not promise a cash payout. ## If activation does not finish If the wallet rejects the request or reports insufficient ETH, correct the issue and try again. If a transaction was submitted, use **Check activation**. If the wallet response was lost, check the wallet before trying again. Only select **Request failed or cancelled** after your wallet confirms the request failed or was cancelled. See [Fees](https://docs.testnet.mog.xyz/trading/fees/) and [Earning MOG](https://docs.testnet.mog.xyz/mog/earning-mog/) for the related trading rules. --- # Earning MOG Source: https://docs.testnet.mog.xyz/mog/earning-mog/ Markdown: https://docs.testnet.mog.xyz/mog/earning-mog.md Reviewed protocol version: 11.0.0 Protocol review date: 2026-10-30 Scope: reviewed public documentation. Numerical examples use illustrative or launch settings; they are not live quotes or a guarantee of current deployed parameters. Consult the app for current market and position values. MOG is the protocol's token. You earn MOG in three ways: - **Trading:** each settled position earns MOG on its trading edge, the value it gives Mog. - **Contributions:** you can [contribute part of your balance to the treasury](https://docs.testnet.mog.xyz/mog/earning-mog/#contributions) for good, for MOG. - **Giving up a payout:** you can [give up a queued claim](https://docs.testnet.mog.xyz/mog/earning-mog/#mog-for-giving-up-a-claim) for MOG. Mog also allocates a share of trading revenue to [buying and burning MOG](https://docs.testnet.mog.xyz/mog/buybacks-and-burns/). ## Your trading edge Your trading edge is what your position pays beyond a fee-free payout. Mog counts it once, when the position settles: - **Every position:** the open fee you paid. - **A winning close:** the profit fee, and the part of the price gain that the [close curve](https://docs.testnet.mog.xyz/trading/pnl-and-closing/) and the [crowded-side charges](https://docs.testnet.mog.xyz/trading/positions-and-leverage/#the-crowded-side) keep back. - **A liquidation:** the liquidation buffer you give up. A losing close earns MOG only on its open fee. The collateral you lose is not edge, because a fee-free venue would take the same loss. A partial close earns on its own part. ## One rate from supply Every mint uses one rate: **100 MOG per counted dollar at zero supply**. The rate falls in proportion to the supply already allocated, and it reaches zero at the [100 billion MOG cap](https://docs.testnet.mog.xyz/mog/supply-and-unlock/#the-supply-cap). A burn does not make room, so the rate never rises. More supply, fewer MOG per dollar The rate starts at 100 MOG per counted dollar at zero supply, is 50 at 50 billion MOG allocated, and is zero at the 100 billion cap. Mint rate: `R = 100 × (100,000,000,000 − allocated) / 100,000,000,000` MOG per counted dollar. Allocated supply counts minted, airdropped and burned MOG and the team's unclaimed parts, so R never rises. The trader receives 90% of each mint. The team's 10% mints only at or above the 5,000,000 USDG threshold. Giving up a queued payout always counts at 80%, so it earns `0.9 × 0.8 × R` = 72 MOG per USDG at zero supply. | MOG supply allocated | R (MOG per counted dollar) | Give-up (MOG per USDG) | | -------------------- | -------------------------- | ---------------------- | | 0 | 100 | 72 | | 25,000,000,000 | 75 | 54 | | 50,000,000,000 | 50 | 36 | | 90,000,000,000 | 10 | 7.2 | MOG per counted dollar, before the split below. The trader receives 90% of each mint. A settlement round fixes the rate when it opens. A contribution and a give-up read the rate when you send them. ## Available treasury equity This is treasury cash after accounting for unpaid payouts and allocated buyback funds. Traders' cash collateral is held separately. It is zero while any payout waits in the queue. ## Trading and contributions share each dollar The 5 million USDG threshold splits each counted dollar between trading and cash in. While available treasury equity is low, a contribution counts most and a trade's edge least. At the threshold, only trading edge counts. | Available treasury equity | Up to 1M USDG | 2.5M USDG | 4M USDG | 5M USDG and above | | -------------------------------- | ------------- | --------- | ------- | ----------------- | | Trading edge counts | 20% | 50% | 80% | 100% | | Contributions and give-ups count | 80% | 50% | 20% | 0% | More equity, more weight on trading Trading edge counts at 20 percent up to 1 million USDG of available treasury equity, rises to 100 percent at the 5 million USDG threshold, and stays there. Deposits and give-ups count at the rest. Contribution share: `s = min(0.8, max(0, 1 − F / 5,000,000))`. F is available treasury equity in USDG. A contribution and a given-up payout count at s; a trade's edge counts at 1 − s. A contribution integrates s over the equity it moves. | Available treasury equity (USDG) | Trading edge counts | Contributions count | | -------------------------------- | ------------------- | ------------------- | | 0 | 20% | 80% | | 1,000,000 | 20% | 80% | | 2,500,000 | 50% | 50% | | 4,000,000 | 80% | 20% | | 5,000,000 | 100% | 0% | Launch threshold. Governance can change the threshold after the timelock delay. At launch, with zero supply and zero equity, each dollar of trading edge earns 18 MOG. At or above the threshold, it earns 90 MOG. A trade reads the equity posted when its round opened. ## MOG funding: the skew multiplier Mog pays more MOG to positions that hold the light side of a crowded market. This is MOG funding. It moves MOG only, never USDG. Each market tracks its skew: how much the longs lead the shorts, as a share of the side cap. Mog averages that skew over the time you hold the position. At settlement, your mint is multiplied by: - **Up to 2×** if you held the light side. - **Down to 0×** if you held the crowded side. - **1×** if the market was balanced, or for a position with no hold time. At launch, a position on the light side of a fully crowded market for its whole hold earns 2×. A position on the fully crowded side earns nothing. A long and a short held over the same time on one market add up to 2× together, so a hedged pair earns no extra MOG. The app shows an estimate for a new position, if the current skew stays the same. The real multiplier uses the average over your whole hold. ## Contributions You can contribute part of your available balance to the treasury and receive MOG at once. **A contribution is one-way. You can never withdraw it.** First [deposit](https://docs.testnet.mog.xyz/account/deposits-and-withdrawals/) to your account, then contribute from that balance. Your main wallet signs each contribution, as it signs a withdrawal, and the app pays its gas. - The contribution first pays any [queued payouts](https://docs.testnet.mog.xyz/account/payout-queue/), oldest first. The rest goes into the treasury. - It counts at the contribution share over the equity it moves. A dollar that pays the queue counts at 80%. A contribution made at or above the threshold earns no MOG. - You set a minimum MOG amount. If the treasury moves before your contribution lands and it would earn less, it does not go through. - Splitting a contribution into parts does not earn more MOG. - Contributions are not possible during a venue-wide pause. While Mog is part-way through applying a price update, a contribution waits and the app tries again. - A contribution raises available treasury equity. It can bring the venue to the threshold, and so start the [unlock](https://docs.testnet.mog.xyz/mog/supply-and-unlock/#locked-launch). At launch, with zero supply and zero equity, each USDG contributed earns 72 MOG, up to 1 million USDG of equity. ## MOG for giving up a claim You can also give up an unpaid claim for MOG. See [how to give up a claim](https://docs.testnet.mog.xyz/account/payout-queue/#give-up-a-claim-for-mog). Giving up a claim reduces what Mog owes traders, so it counts like a dollar contributed to an empty treasury: at 80%. At zero supply, each USDG you give up earns **72 MOG**. The rate reads supply, so it can fall while you wait, as other mints add supply. It never rises. ## The team share The trader always receives 90% of each mint. At or above the threshold, the team receives another 10% beside it. Below the threshold, the team receives nothing from trading. Contributions and give-ups never add a team part. See [Team allocation](https://docs.testnet.mog.xyz/mog/supply-and-unlock/#team-allocation). **View the mint formulas** The rate, with a cap of 100 billion MOG: $$ R=100\cdot\frac{\text{cap}-\text{allocated}}{\text{cap}} $$ The contribution share, with $F$ the available treasury equity and $\Theta$ the threshold: $$ s=\min\left(80\%,\ \max\left(0,\ 1-\frac{F}{\Theta}\right)\right) $$ A settlement mints $R\,(1-s)\,\mu\,e$, with $e$ the trading edge and $\mu$ the skew multiplier. With $\bar s$ the market's average skew over the hold, positive when longs were crowded, a long takes $\mu=1-k\bar s$ and a short $\mu=1+k\bar s$, each kept between 0 and 2. The skew dial $k$ is 1 at launch. A contribution of $x$ at equity $V_0$ mints $R\cdot I$, with $$ I=\int_{V_0}^{V_0+x} s(v)\,dv $$ A give-up of $a$ mints $R\cdot 80\%\cdot a$. The trader, contributor or holder receives 90% of each amount, with on-chain rounding. MOG's market value depends on demand and liquidity. See [Supply and the unlock](https://docs.testnet.mog.xyz/mog/supply-and-unlock/) and [Token risks](https://docs.testnet.mog.xyz/risk/#usdg-and-mog). --- # Supply and the unlock Source: https://docs.testnet.mog.xyz/mog/supply-and-unlock/ Markdown: https://docs.testnet.mog.xyz/mog/supply-and-unlock.md Reviewed protocol version: 11.0.0 Protocol review date: 2026-10-30 Scope: reviewed public documentation. Numerical examples use illustrative or launch settings; they are not live quotes or a guarantee of current deployed parameters. Consult the app for current market and position values. MOG is fair-launched with zero starting supply. New MOG comes from [trading edge, contributions and given-up payouts](https://docs.testnet.mog.xyz/mog/earning-mog/), at one rate that falls as supply grows. Governance can also airdrop MOG until it gives that power up. Lifetime supply is capped at 100 billion MOG. ## The rate falls with supply Each mint counts dollars at 100 MOG per dollar at zero supply. The rate falls in proportion to the supply already allocated: at 50 billion MOG it is 50, and at the cap it is zero. No clock, fee count or treasury level changes the rate. See [One rate from supply](https://docs.testnet.mog.xyz/mog/earning-mog/#one-rate-from-supply). ## Team allocation At or above the 5 million USDG threshold, each trading mint adds 10% more for the team. Below the threshold, trading adds nothing for the team. [Contributions](https://docs.testnet.mog.xyz/mog/earning-mog/#contributions) and [given-up claims](https://docs.testnet.mog.xyz/mog/earning-mog/#mog-for-giving-up-a-claim) never add a team part. The trader's 90% does not change either way. The team part is split among a team list of up to eight members by fixed weights. Each member's part is kept apart, and only that member can claim it, at any time. There is no end date. Governance can replace the team list through the timelock. A member that the new list drops loses its unclaimed part. See [Governance risks](https://docs.testnet.mog.xyz/risk/#governance). ## The supply cap Lifetime supply stops at 100 billion MOG. The cap counts every minted and airdropped MOG, and the team's unclaimed parts too. When a mint would pass the cap, the trader's part and the team's part shrink by the same share. Burned MOG still counts toward the cap, so a burn does not make room for new MOG. ## Airdrop Governance can mint MOG straight to chosen wallets through the timelock. An airdrop works while MOG is locked, adds no team allocation and counts toward the cap. An airdrop that would pass the cap fails. The token operator's pool funds come from an airdrop. Governance can give up the airdrop through the timelock, and after that no airdrop can happen again. ## Locked launch MOG launches locked: no holder can send it. Mints, team claims, airdrops, burns and approvals still work. The unlock starts once available treasury equity has stood at or above the 5 million USDG threshold for **7 days**. Mog checks equity at each oracle price posting. A posting below the threshold resets the count, and the next posting at or above the threshold starts it again. The first posting that finds 7 days of count starts the unlock. A later drop below the threshold does not lock the token again. After the unlock starts: 1. **For 48 hours,** only the token operator can send, to seed the token's pool. 2. **After the 48 hours,** every holder can send, for ever. Governance can change the threshold through the timelock. A lower threshold can start the unlock sooner, and the unlock cannot be reversed. See [Governance risks](https://docs.testnet.mog.xyz/risk/#governance). --- # Buybacks and burns Source: https://docs.testnet.mog.xyz/mog/buybacks-and-burns/ Markdown: https://docs.testnet.mog.xyz/mog/buybacks-and-burns.md Reviewed protocol version: 11.0.0 Protocol review date: 2026-10-30 Scope: reviewed public documentation. Numerical examples use illustrative or launch settings; they are not live quotes or a guarantee of current deployed parameters. Consult the app for current market and position values. Mog allocates trading revenue to buying and burning MOG. Burns permanently remove purchased tokens from supply. ## What funds buybacks? At launch, **70% of every trading fee** funds buybacks: the open fee and the profit fee alike. The remaining 30% funds protocol operations. The buyback share of a profit fee is paid with the winning trade's payout, at the same time and at the same rate. If part of the payout waits in [the payout queue](https://docs.testnet.mog.xyz/account/payout-queue/), that part of the fee waits with it. The buyback share of an open fee is paid when the order fills. Above **5 million USDG of available treasury equity**, a growing share of net treasury growth also funds buybacks. Earlier deficits must be recovered before new growth qualifies. More equity, a larger buyback allocation The allocation rate is zero through 5 million USDG of available treasury equity, 50 percent at 10 million, and 80 percent at 15 million. Launch formula: `excess = max(F - 5000000, 0)`; `allocation = excess² / (excess² + 5000000²)`. F is available treasury equity in USDG, and 5000000 USDG is the governed threshold. The fraction applies to eligible net treasury growth after settled profits and recovery of prior deficits, not to all treasury funds. | Available treasury equity (USDG) | Eligible growth allocated to buybacks | | -------------------------------- | ------------------------------------- | | 5,000,000 | 0% | | 10,000,000 | 50% | | 15,000,000 | 80% | Applies to eligible net cash growth after settled profits and prior deficits. **View the allocation curve** $$ z=\max(F-T,0),\qquad g(F)=\frac{z^2}{z^2+T^2} $$ $F$ is [available treasury equity](https://docs.testnet.mog.xyz/mog/earning-mog/#available-treasury-equity), and $T$ is the threshold, 5 million USDG at launch. One number sets where the allocation starts and how fast it grows. Governance can change it after the timelock delay. The same threshold sets the [liquidation buffer multiplier](https://docs.testnet.mog.xyz/trading/liquidations/). ## From revenue to burns How buybacks work 1. Fund: Pay the buyback wallet. 2. Buy: Purchase MOG. 3. Burn: Remove purchased tokens. No fee is paid ahead of a trader payout. The allocation from treasury growth is paid only when trader claims remain fully cash-covered. Purchases then depend on the operator and market liquidity. ## When the buyback wallet gives up its allocation The buyback wallet can give up allocation from treasury growth that Mog has not yet paid to it. This allocation already waits behind every trader payout. Giving it up mints no MOG and pays no trader sooner. Afterward, the treasury keeps the amount given up: once the queue clears, that part of the surplus is never paid to the wallet. Allocations booked after the give-up are still paid. A given-up allocation funds no buyback. Fees cannot be given up. Every fee is paid as its trade's payout is paid. MOG's price depends on market conditions. See [Token risks](https://docs.testnet.mog.xyz/risk/#usdg-and-mog). --- # Risks and trust assumptions Source: https://docs.testnet.mog.xyz/risk/ Markdown: https://docs.testnet.mog.xyz/risk.md Reviewed protocol version: 11.0.0 Protocol review date: 2026-10-30 Scope: reviewed public documentation. Numerical examples use illustrative or launch settings; they are not live quotes or a guarantee of current deployed parameters. Consult the app for current market and position values. Trading puts your active collateral at risk. Payout funding, oracle prices, software, governance, and account security also affect your funds. ## Leverage and execution Each market sets its leverage range within 1×–1,000×. At 1× and 1,000×, the initial liquidation distances are about 99.96% and 0.06% with the illustrative 0.02% buffer at the launch 2× multiplier, before rounding: the margin's distance less the market's 0.02% liquidation buffer times the multiplier. Liquidation still takes all active collateral. A small price move can trigger it. Orders and closes use later oracle prices. A touch of the liquidation price settles before margin activations and closes, including take-profits and stop-losses. Added margin increases the amount at risk; its protection begins at activation. ## Payout liquidity With enough treasury cash, profit is paid at settlement. If a payout exceeds available cash, the unfunded portion enters the queue as an unpaid claim. Its payment depends on future cash flow and can be delayed indefinitely. You can also give up a claim for MOG. That is final: you receive MOG, not cash, and its value is not guaranteed. ## Oracles and infrastructure Mog relies on accurate source prices, verified oracle updates, and correct settlement. Incorrect or manipulated updates can cause losses. Each market’s open-interest rules limit how fast the gap between longs and shorts can grow and how large one side can get, so a push of the source price needs time to build a large position and must hold it at risk while it ages. While one side leads, its profits grow more slowly. The rules do not limit matched positions on both sides, and they are only as good as the depth estimate behind them. Network congestion, outages, and delayed updates can extend exposure and delay actions. Positions remain exposed during interruptions. Recorded barrier touches can close them when processing resumes. Smart-contract or integration defects can also put funds at risk. ## Governance The launch governance delay is 24 hours. Global parameter bounds and protocol module replacements use the timelock. The threshold, the liquidation buffer multiplier and the skew dial use it too, and so do each market's open fee rate and cap. A threshold change moves the buyback allocation, the buffer rule, the split of each minted dollar between trading and deposits, the team share and the unlock count at once. A lower threshold can start the token's unlock, which cannot be reversed. A multiplier change reaches only later fills. Governance can change an asset’s close-curve width, liquidation buffer, leverage range, open-interest rules and price-signing key, and the venue’s fade time and curve exponent k, in either direction, without that delay. An order with no room on its side at fill is voided, and its collateral and open fee return. Payout and entry terms stay within the global bounds. An asset change takes effect only after every published price update for that market has been processed, so it affects only fills priced after it; open positions keep their frozen terms. A fade time or k change can be made only while every market is at rest, with every published price update on every market processed. In practice each wait takes seconds. The side cap, the drift and volatility dials and the fade time are the exception to frozen terms: a change reaches every open position’s future profit through the drift charge and the volatility charge. Emergency pauses can stop new orders and margin requests sooner; accepted actions continue under their settlement rules. The protocol has authority to mint MOG. A malicious upgrade could break its mint rules. The supply cap and the token lock are in the token itself, so an upgrade cannot move them. Governance can also airdrop MOG through the timelock, inside the supply cap, until it gives that power up. When funds can leave Where are your funds? - Available cash: Withdraw with your main wallet. - Committed funds: Wait for settlement, refund, or claim payment. Funds in positions, pending orders or margin additions, and unpaid claims can remain committed beyond the governance delay. ## Wallets and sessions A compromised main wallet can control the account, withdraw cash, and give up claims. A compromised session can put funds at risk through trading and margin additions. Revoke affected sessions and review pending actions. ## USDG and MOG USDG depends on its issuer, network, and availability. Test deployments use test assets. MOG's price and liquidity depend on market conditions. MOG can be worth less than the fees you paid, the claim you gave up or the USDG you contributed to the treasury. A contribution is one-way: you can never withdraw it. The MOG rate falls as supply grows, so the rate for giving up a claim can fall while you wait. The skew multiplier for an open position is an estimate until the position settles. MOG is locked until the venue has stood at the threshold for 7 days, and that may never happen. Buybacks depend on the operator, available funding, and market liquidity. --- # Build on Mog Source: https://docs.testnet.mog.xyz/integrators/ Markdown: https://docs.testnet.mog.xyz/integrators.md Reviewed protocol version: 11.0.0 Protocol review date: 2026-10-30 Scope: reviewed public documentation. Numerical examples use illustrative or launch settings; they are not live quotes or a guarantee of current deployed parameters. Consult the app for current market and position values. An integration is your own interface on top of Mog's venue. Your users trade the same markets, with the same positions, payouts and risks, as traders in the Mog app. Every order your interface signs can name your address as its builder. When those positions settle a win, you earn a share of the settlement fee. ## How an order travels 1. Your user connects a wallet in your interface. 2. The wallet signs once to grant a session key. The session key can trade for the account, but it can never withdraw. 3. Your interface signs each order with the session key and puts your builder address in the order. 4. The signed order goes to Mog's relay, which pays the network fee, or straight to the chain. Today the relay accepts browser requests only from Mog's own sites. Send to it from your server, which sends no browser origin, or have your users' wallets send the order to the chain. 5. The order fills at the next attested price, the same as an order from the Mog app. See [Positions and leverage](https://docs.testnet.mog.xyz/trading/positions-and-leverage/#from-order-to-fill). The builder address is part of what the user signs. Nobody can add it, change it or remove it later. ## What you need | Need | Where | | ---------------------------------------------------- | -------------------------------------------------------------------------------------------- | | How builder earnings work and how to collect them | [Builder codes](https://docs.testnet.mog.xyz/integrators/builder-codes/) | | How builder codes relate to the app's referral links | [Builder codes and referrals](https://docs.testnet.mog.xyz/integrators/builder-vs-referral/) | | Endpoints, the CLI and error codes | [API](https://docs.testnet.mog.xyz/api/) | | Who may call each part of the venue | [Permissions](https://docs.testnet.mog.xyz/api/reference/permissions/) | ## Before you start - Test on Robinhood Chain testnet first. Its markets and endpoints mirror mainnet. See [API](https://docs.testnet.mog.xyz/api/#networks). - Your users carry the same risks as any Mog trader. Link them to [Risk](https://docs.testnet.mog.xyz/risk/). - Launch values on these pages can change by governance. The app and the venue read the live values. --- # Builder codes Source: https://docs.testnet.mog.xyz/integrators/builder-codes/ Markdown: https://docs.testnet.mog.xyz/integrators/builder-codes.md Reviewed protocol version: 11.0.0 Protocol review date: 2026-10-30 Scope: reviewed public documentation. Numerical examples use illustrative or launch settings; they are not live quotes or a guarantee of current deployed parameters. Consult the app for current market and position values. A builder code is an address. Any address can be one: there is no registration and no approval. An order names its builder when it is signed. The builder earns a share of the settlement fee each time that position settles a win. ## What a builder earns When a winning position settles, Mog charges the [profit fee](https://docs.testnet.mog.xyz/trading/fees/#the-profit-fee). 70% of that fee goes to MOG buybacks and 30% to protocol operations. The protocol fixes this split; governance cannot change it. A builder takes its share out of the operations part only: | | Launch value | | ------------------------------------------------ | ------------------------------- | | Builder share of the operations part | 50% | | The same share as a part of the whole profit fee | 15% | | Buyback part | 70%, never reduced by a builder | The share is fixed for each position when it fills. A later governance change applies only to positions that fill after it. A losing close pays no profit fee, so it pays no builder. The open fee never goes to a builder. ## The holding rule A builder must hold MOG to earn, and must prove it held it. 1. Hold at least the required MOG in the builder address. The launch requirement is 10,000 MOG. 2. Record the balance on chain: `mog builder attest`, or **Activate rewards** on the app's Referrals page. This stores the address's MOG balance and block. It does not move or lock any MOG. 3. At each settlement, the builder's balance and its recorded balance must both meet the requirement. A record counts for settlement rounds that open in the same block as the record or later. Settlements in a round that opened in an earlier block do not pay you. Governance can also set a minimum age for the record, in blocks; it is zero at launch. A settlement that fails the check pays the builder nothing, and the share stays with operations. Nothing is paid later for a failed settlement. If your balance falls below the requirement, earnings stop until it recovers. When your recorded balance still meets the requirement, restoring the balance is enough: **do not record again**. A new record replaces the old one and does not count for a round that opened in an earlier block, so it can cost you the rest of the current round. Record again only when the recorded balance itself is below the requirement. ## Orders that cannot name you The venue refuses an order at placement when its builder is the account itself, the key that signed it, or any live session key of the account. The order is never placed, so nothing is charged. Through the relay the refusal is `INTENT_WOULD_FAIL`. A builder code pays for routed orders, not a discount on your own trades. ## Collect your earnings Earnings collect in a builder balance. They are paid as cash into the builder address's trading balance on Mog, from where the address can withdraw. - **Pay:** anyone can trigger the payment for any builder: `mog keeper pay-builder`, or **Collect rewards** in the app. The money always goes to the builder. Payment waits while the venue is paused, and runs only when every market is at rest. - **Order of payment:** builder payments are junior. They pay only from treasury cash above every trader claim, including claims used as collateral, so a payment can be partial, and a builder balance can wait. - **Give up:** a builder can give up any part of its own unpaid balance with `mog builder renounce`. This is final, and it mints no MOG. `mog builder status` shows the recorded balance, the requirement, and the earned, paid and unpaid amounts. ## Track builders Every builder payment and every share booked to a builder is a public on-chain event. A builder leaderboard comes from these events. See [API](https://docs.testnet.mog.xyz/api/) for the read endpoints. --- # Builder codes and referrals Source: https://docs.testnet.mog.xyz/integrators/builder-vs-referral/ Markdown: https://docs.testnet.mog.xyz/integrators/builder-vs-referral.md Reviewed protocol version: 11.0.0 Protocol review date: 2026-10-30 Scope: reviewed public documentation. Numerical examples use illustrative or launch settings; they are not live quotes or a guarantee of current deployed parameters. Consult the app for current market and position values. The app's [referral links](https://docs.testnet.mog.xyz/account/referrals/) and an integrator's builder code are the same thing on chain. Both put an address in the `builder` field of each order. Both earn the same share, under the same holding rule. See [Builder codes](https://docs.testnet.mog.xyz/integrators/builder-codes/). They differ only in who fills the field. | | Referral link | Builder code in your interface | | ----------------------------------------------- | --------------------------------------------------------- | ------------------------------------------ | | Who sets the builder | The Mog app, from the referral the trader accepted | Your interface, on every order it signs | | Where the link between trader and builder lives | Off chain, in Mog's referral records | In each signed order | | Which orders it covers | Orders the trader places in the Mog app | Orders the trader places in your interface | | Holding rule and share | Same | Same | | Can the trader change it | The trader cannot replace an accepted referrer in the app | Each order names its own builder | ## What this means for a trader who uses both A trader can accept a referral in the Mog app and also trade in your interface. Each order pays the builder it names. Orders from the app pay the referrer. Orders from your interface pay you. No order pays two builders. ## Which one to use - Use a **referral link** to bring traders to the Mog app. - Use a **builder code** when traders use your own interface. One address can do both. The holding rule, the recorded balance and the earnings are per address, so they are shared. --- # API Source: https://docs.testnet.mog.xyz/api/ Markdown: https://docs.testnet.mog.xyz/api.md Reviewed protocol version: 11.0.0 Protocol review date: 2026-10-30 Scope: reviewed public documentation. Numerical examples use illustrative or launch settings; they are not live quotes or a guarantee of current deployed parameters. Consult the app for current market and position values. Mog has no account API keys. Your wallet is the account, and a session key it grants signs trading instructions. Reads are public. Every write is a signed instruction that the chain checks. ## The parts | Part | Use it to | Auth | | ----------------------------------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | | `mog` CLI | Trade, read the account and run strategies from a terminal or an agent | Session key on your machine | | Info endpoint, `POST /indexer/info` | Read markets, prices, candles, orders, positions, fills and payouts | None. Reads are public. | | Stream, `/indexer/ws` | Follow prices, fills and order updates live | None | | Relay, `POST /submit` | Deliver signed orders, cancels, closes and top-ups. The relay pays the network fee. | The signature in each instruction. Browser requests are accepted only from Mog's own sites; servers and the CLI send no origin and are accepted. | | The chain | Send the same signed instructions yourself and pay the network fee | The signature, or the sending wallet | Start with the [quick start](https://docs.testnet.mog.xyz/api/quick-start/). The CLI handles keys, signing, units and retries, so it is the simplest client. ## Two keys | | Wallet (root) | Session key | | ------------ | ----------------------------------------------- | ----------------------------------- | | Signs | Granting and revoking session keys, withdrawals | Orders, cancels, closes, top-ups | | Can withdraw | Yes | No. The contract refuses it. | | Lifetime | Permanent | Expires. At launch, at most 7 days. | A leaked session key can trade the account's balance until it expires or the wallet revokes it. It can never move money out. See [Session keys](https://docs.testnet.mog.xyz/account/session-keys/). ## Networks | | Mainnet | Testnet | | ------------- | ---------------------------------- | ------------------------------------------ | | Chain | Robinhood Chain, id 4663 | Robinhood Chain testnet, id 46630 | | API host | `https://api.mog.xyz` | `https://api.testnet.mog.xyz` | | Info endpoint | `https://api.mog.xyz/indexer/info` | `https://api.testnet.mog.xyz/indexer/info` | | Stream | `wss://api.mog.xyz/indexer/ws` | `wss://api.testnet.mog.xyz/indexer/ws` | | CLI | `mog network mainnet` | the default | ## Units - Money, prices and ids are decimal strings of whole numbers, so no precision is lost. Prices and most money values carry 18 decimals. Trading-balance units carry 6. - Times are Unix milliseconds. Signed deadlines are Unix seconds in chain time. - Lists page by cursor: pass the last row's cursor to get the next page. A page shorter than its limit is the last. ## Reference - [Errors](https://docs.testnet.mog.xyz/api/reference/errors/): relay refusal codes and CLI exit codes. - [Permissions](https://docs.testnet.mog.xyz/api/reference/permissions/): who may call each part of the venue. --- # CLI quick start Source: https://docs.testnet.mog.xyz/api/quick-start/ Markdown: https://docs.testnet.mog.xyz/api/quick-start.md Reviewed protocol version: 11.0.0 Protocol review date: 2026-10-30 Scope: reviewed public documentation. Numerical examples use illustrative or launch settings; they are not live quotes or a guarantee of current deployed parameters. Consult the app for current market and position values. The `mog` CLI trades from a terminal. A person can use it by hand, and an agent or a strategy can use it unattended. It never prompts: every input is a flag or an environment variable. ## Install | Platform | Command | | ------------ | -------------------------------------------------------------------------------------------- | | macOS, Linux | `brew install mog-xyz/tap/mog` | | Windows | `scoop bucket add mog-xyz https://github.com/Mog-xyz/homebrew-tap`, then `scoop install mog` | A new install starts on testnet. `mog network mainnet` switches to mainnet. ## Connect ```bash mog connect ``` The CLI makes a session key and opens the app's connect page. Your wallet signs one grant there. The private key stays on your machine. The CLI stores it with owner-only permissions. Set `MOG_PASSPHRASE` to encrypt it. For an agent that has no browser, `mog session new --account 0xYOUR_WALLET` prints the request for your wallet to sign. Your wallet key never reaches the machine that trades. ## Fund and trade ```bash mog deposit # your deposit address and a QR code mog markets mog price BTC mog long BTC 10 --lev 50 --dry-run mog long BTC 10 --lev 50 mog positions mog close BTC --fraction 50% ``` An order fills at the next attested price, not the price you see when you send it. A market order usually fills within a few seconds. See [Positions and leverage](https://docs.testnet.mog.xyz/trading/positions-and-leverage/#from-order-to-fill). `--dry-run` signs and sends nothing. It shows the order the CLI would sign. ## Machine output Add `--json` to any command. The output is one object: ```json { "ok": true, "data": { } } { "ok": false, "error": { "code": "…", "message": "…", "retryable": false, "exit": 4 } } ``` Progress goes to stderr. `mog schema` prints every command and exit code as JSON. Read the exit code before you retry: see [Errors](https://docs.testnet.mog.xyz/api/reference/errors/#cli-exit-codes). Exit code 6 means a signed instruction may already be on chain. ## Agents `mog skill install` adds the agent guide for Claude Code. `mog skill show` prints it for any other agent. ## Next - Run `mog doctor` when something fails. It checks the network, the keys and the endpoints. - Learn the [fees](https://docs.testnet.mog.xyz/trading/fees/) and the [close curve](https://docs.testnet.mog.xyz/trading/pnl-and-closing/) before you automate. A strategy that trades often pays the open fee every time. --- # Errors Source: https://docs.testnet.mog.xyz/api/reference/errors/ Markdown: https://docs.testnet.mog.xyz/api/reference/errors.md Reviewed protocol version: 11.0.0 Protocol review date: 2026-10-30 Scope: reviewed public documentation. Numerical examples use illustrative or launch settings; they are not live quotes or a guarantee of current deployed parameters. Consult the app for current market and position values. ## CLI exit codes Every `mog` command exits with one of these codes. With `--json`, the same number is in `error.exit`. | Code | Meaning | Retry | | ---- | -------------------------------------------------------------------------- | ------------------------------------------ | | 0 | Done | — | | 1 | An unexpected fault in the CLI | Report it | | 2 | Bad arguments. Nothing was signed or sent. | Fix the command | | 3 | No usable session key, or a wallet signature is missing. Nothing was sent. | Fix the key | | 4 | The venue or the relay refused. Nothing changed. | Read `error.code` first | | 5 | A service did not answer. Nothing was sent. | Safe | | 6 | A signed instruction may be on chain, or may still land | **Wait for the deadline, then read state** | After exit 6, the first signed instruction can still land until its deadline. Anyone who holds its bytes can deliver it, the relay included. Find that time in this order: - `error.details.liveUntil` or `error.details.deadline`, when present. - A wallet-signed instruction (withdraw, give up a claim, grant or revoke a key): `mog pending show ` prints its deadline. The id is `error.details.pending`. - A trading instruction signed by the CLI's session key: 5 minutes after the CLI signed it. The CLI signs a few seconds after the command starts, so wait at least 6 minutes from the start. Do not sign a new instruction for the same decision before then. After it, run `mog orders` or `mog positions`, and sign again only if the first instruction did not apply. A second signature is a second instruction, so an early retry can open a second position. ## Relay refusals `POST /submit` answers a refusal with a JSON body: `error`, `code`, and `preBroadcast`. `preBroadcast: true` means this request sent nothing. An earlier delivery of the same signed bytes may still be on its way, so treat it like exit 6 when you sent those bytes before. Some refusals add `index`, the failing instruction, and `retryAfterMs`. ### Fix the request | Code | HTTP | Meaning | | ------------------------------------------------ | ---- | ---------------------------------------------------------------------------------------- | | `ORIGIN_NOT_ALLOWED` | 403 | A browser request from a site the relay does not serve. Send from your server instead. | | `BAD_BODY`, `BAD_JSON`, `BAD_INTENT` | 400 | The body is not `{ "intents": [ … ] }` | | `TOO_MANY_INTENTS` | 400 | Too many instructions in one request | | `BODY_TOO_LARGE` | 413 | The body is too large | | `BAD_TARGET`, `WRONG_TARGET`, `UNKNOWN_SELECTOR` | 400 | The instruction is not a signed entry point of that contract | | `BAD_CALLDATA` | 400 | The call data is malformed | | `BAD_SIGNATURE` | 400 | The signature is malformed | | `MIXED_TARGETS`, `SINGLE_NOT_BATCHABLE` | 400 | Trading instructions batch together. Key and withdrawal instructions go one per request. | | `FORM_RETIRED` | 400 | The instruction uses an old signed format. Sign it again with the current one. | | `EXPIRED` | 400 | The signed deadline is behind the chain clock. Sign again. | ### The instruction cannot apply | Code | HTTP | Meaning | | ----------------------- | ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `NOT_AUTHORIZED` | 403 | The signer is not the account or a live session key of it. With `retryAfterMs`, the relay has not seen the key yet: a key registered seconds ago needs one more moment. Send the same instruction again after `retryAfterMs`. | | `NONCE_USED` | 409 | This signed instruction already applied, or its nonce was spent | | `INTENT_WOULD_FAIL` | 400 | A dry run on the chain failed. `revert` names the reason. | | `BELOW_SPONSORED_MIN` | 402 | Below the smallest amount the relay pays gas for. An order: raise the margin, or send it yourself. A withdrawal or a claim give-up: take the whole balance or claim, or send it yourself. | | `UNFUNDED` | 402 | The relay grants session keys only to accounts with a funded balance | | `TOP_UP_NOT_ACCEPTED` | 409 | The market's prices are behind. Send the same instruction again later. | | `RENOUNCE_NOT_ACCEPTED` | 409 | The delivery's work budget left cash waiting to be paid out. Send the same signed instruction again with a larger budget (`--max-steps` in the CLI), or later. | ### Wait, then send the same instruction | Code | HTTP | Meaning | | ---------------------------------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `RATE_LIMITED` | 429 | A request window is spent. `window` names which: your address (each instruction in a batch counts), your signer, or all callers. | | `ROOT_BUDGET_SPENT` | 429 | The account has used the relay's daily network-fee budget. Send it yourself, or wait for `retryAfterMs`. | | `RETRY_CAP_SPENT` | 429 | The relay delivered this signed instruction its daily maximum of times | | `INTENT_IN_FLIGHT` | 429 | An instruction in the request is part of a delivery the relay has sent and not yet confirmed. Do not send it again: wait for that delivery, then read state. The message says "wait for that transaction". If the message says "did not reach the node; send it again", the earlier delivery failed, and you can send the same request again after `retryAfterMs`. | | `GAS_ABOVE_CEILING` | 503 | The network fee is above the relay's ceiling | | `BUSY` | 503 | The relay is at capacity | | `CHAIN_UNREACHABLE`, `CHAIN_READ_FAILED` | 503 | The chain did not answer. The relay sent nothing. | ### Unknown outcome | Code | HTTP | Meaning | | ------------- | ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `SEND_FAILED` | 502 | With `preBroadcast: true`, the relay sent nothing. With `preBroadcast: null`, the network may hold the transaction: treat it like exit 6 and wait for the deadline before you sign again. | A signed instruction can apply only once. Sending the same signed bytes again never applies it twice. Signing a new instruction for the same order can. --- # Permissions Source: https://docs.testnet.mog.xyz/api/reference/permissions/ Markdown: https://docs.testnet.mog.xyz/api/reference/permissions.md Reviewed protocol version: 11.0.0 Protocol review date: 2026-10-30 Scope: reviewed public documentation. Numerical examples use illustrative or launch settings; they are not live quotes or a guarantee of current deployed parameters. Consult the app for current market and position values. Mog's contracts enforce every permission. No server can grant a permission or take one away. ## Your keys | Action | Wallet (root) | Session key | | -------------------------------- | ------------------------------------------------------ | ------------------------------------------------------ | | Place, cancel, close, top up | Yes | Yes | | Name a builder on an order | Yes, but not the account or any live session key of it | Yes, but not the account or any live session key of it | | Withdraw | Yes | No | | Grant or revoke session keys | Yes | No | | Give up a queued claim | Yes | No | | Mark its own unused nonces spent | Yes | Yes | A session key expires. At launch it lasts at most 7 days. A revoked key cannot be granted again. ## Anyone Anyone may send these calls. Each one pays the rightful party or advances shared state. None of them pays the caller. | Call | Effect | | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | Deliver a signed instruction | Applies the signer's order, cancel, close or top-up. The signature decides; the sender does not. | | Deposit | Adds the sender's own USDG to an account | | Collect for an account | Pays that account's settled claims into its own balance | | Pay a builder | Pays that builder's earnings into its own balance. Only while the venue is not paused and every market is at rest. | | Distribute | Pays the buyback and operations allocations to their payee addresses, which governance sets under the 24-hour delay. Only while the venue is not paused and every market is at rest. | | Void pending orders | On a paused or delisted market, voids pending orders and refunds their collateral and open fee to each owner | | Apply prices | Settles a market up to its latest posted prices | | Post prices | Accepted only with the market's oracle signature | | Record a builder balance | Records the sender's own MOG balance | | Sweep a deposit address | Moves USDG from an account's deposit address into that account | ## Mog's roles | Role | Can | Cannot | | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | | Oracle signer | Sign the prices for its markets | Send funds, change settings | | Guardian | Pause one market or the whole venue, and cancel a queued governance action | Stop withdrawals, deposits, collections, cancels, closes or price posting | | Governance, immediately | Change a market's risk settings: close-curve width, liquidation buffer, leverage limits, pace, side cap, and the drift and volatility charges. Change the curve exponent, the fade time and the mint fade time. Replace a market's oracle signer. The drift and volatility charges, the side cap and the fade time apply to open positions from the next price update, so they change what open positions are paid. | Change fees, payees or code | | Governance, after a 24-hour delay | Change fees and payees, change session-key lifetime, delist a market, upgrade the contracts | Act before the delay ends | | Lister | List a new market. A new market opens paused. | Change an existing market | A pause stops new orders, top-ups and fills on its market, or on every market for a venue-wide pause. Pending orders on a paused market can be voided by anyone, with a refund. A venue-wide pause also stops builder payments, distributions and giving up queued claims. A pause never stops a trader from cancelling, closing or withdrawing. See [Risk](https://docs.testnet.mog.xyz/risk/) for what these roles mean for your funds. ## Rate limits on the public endpoints The public endpoints limit requests by address. Limits can change without notice while this page is in testing. A refusal returns HTTP 429 with `Retry-After`. See [Errors](https://docs.testnet.mog.xyz/api/reference/errors/#wait-then-send-the-same-instruction). | Endpoint | Limit per address | Notes | | ----------------------------------- | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | | Relay, `POST /submit` | 120 instructions a minute | Each instruction in a batch counts. Each signer also has its own limit of 60 instructions a minute. | | Info endpoint, `POST /indexer/info` | 3,000 cost a minute | Each type costs by what it reads: one record 1, one account's list 5, and a scan across all accounts 20. Writes such as `profileSet` and `follow` cost 20. | | Stream, `/indexer/ws` | 16 open connections | | An IPv6 caller counts by its /48 prefix at the relay. Callers behind one shared address, such as an office network, share its limits. One `mog algo run --every 1s` spends about 600 info cost a minute, so several runs fit behind one address.